Jump to content
Sign in to follow this  
larsie

MSP430 with USB support?

Recommended Posts

With the example code from TI there is basically nothing more to do for a serial interface but implementing a handler to process the received characters. You have a serial interface running in less than 30 minutes.

 

However, if the only thing you need is a serial-to-usb type of connection, I would go for an FTDI FT232R. There are SSOP packages available, and the PC drivers are easier to handle and especially to distribute. If this is a project you are not only doing for yourself, the Windows drivers with WHQL certificates are invaluable (asking your customer to ignore a driver warning is just unprofessional...). The higher cost for the extra IC is somewhat mitigated by the fact that you can use a Value Line MSP (if it is enough for whatever you are doing) and that you don't necessarily need a crystal oscillator.

 

We did an in-house project which required USB with an F5510 to get a feel for it, and our conclusion was, that there is no real benefit as long as you just need something a little more modern than an RS232 cable ;-)

 

Cheers

TomKraut

Share this post


Link to post
Share on other sites
No easy-solder packages...

LQFP is literally breeze to solder even with a heated copper rod. You are afraid only until you try it :). I can pretty much guarantee you can't even push DIP20 legs in their holes by the time I finish soldering an LQFP100, and you can't even begin to imagine how shaky my hands are and how bad my eyesight is. Just try it.

Share this post


Link to post
Share on other sites

Soldering the package might be a breeze, but getting the USB working can be difficult. TI has a Windows-based configurator program that can dump out a mostly-working driver to your specifications, but I've found the CDC (i.e. virtual COM port) to be a giant pain to implement. In my tests, sometimes it works, sometimes it doesn't -- although I will admit that the USB port is hooked up to a Linux host, which has not been TI's forte in past USB device driver attempts. When it doesn't work, it will also crash your firmware because it will get stuck in a Suspend-Reset loop.

 

I'm hoping that it's something I'm doing wrong, but, in any case, I'd recommend HID over CDC if you can manage that.

Share this post


Link to post
Share on other sites

I've been thinking of trying to port V-USB to the MSP430. So we could have USB via Software.

 

Can't stand the virtual COM port's myself, half the time they work half the time they don't. Would love to try something else in interfacing with a computer. Serial just is a lot of trouble.

Share this post


Link to post
Share on other sites

To close the loop on this, some time ago I managed to get a generally stable & workable CDC-only implementation of the MSP430 USB firmware working. I've tested mostly on Mac & Linux. It's also trimmed-down to under 3.5KB, and I expect I could get it down to maybe 2.7KB if I really tried. The team that coded the MSP USB library has __atrocious__ coding style. The code is on GitHub as part of my OpenTag project. The platform is a 5509-based stick.

Share this post


Link to post
Share on other sites
To close the loop on this, some time ago I managed to get a generally stable & workable CDC-only implementation of the MSP430 USB firmware working. I've tested mostly on Mac & Linux. It's also trimmed-down to under 3.5KB, and I expect I could get it down to maybe 2.7KB if I really tried. The team that coded the MSP USB library has __atrocious__ coding style. The code is on GitHub as part of my OpenTag project. The platform is a 5509-based stick.

I done my in assembler, stable & workable CDC, and it is under 2.7KB, on MSP430F5508. Unfortunately (under Win32) there is problem (can transfer only one packet per frame if the packet size is less than 64 bytes) with (original) usbser.sys, and now I am trying with winusb.sys.

Share this post


Link to post
Share on other sites
I done my in assembler, stable & workable CDC, and it is under 2.7KB, on MSP430F5508. Unfortunately (under Win32) there is problem (can transfer only one packet per frame if the packet size is less than 64 bytes) with (original) usbser.sys, and now I am trying with winusb.sys.

 

I don't understand exactly what you mean -- maybe it's the nomenclature you are using. A packet is fragmented into one or more frames. Therefore, a frame is part of a packet.

- Do you mean that you cannot use packets smaller than 64 bytes? RX or TX?

- Do you mean that you cannot use packets bigger than 64 bytes? RX or TX?

 

If you understand this, and the issue is truly that you cannot transfer more than one packet per frame, there is no problem -- this is the way USB-CDC works.

 

Also: Did you use the TI USB Library C code as a starting point, or did you do it from the beginning in assembly? If you used the TI USB library at all, I remember that I had to fix some bugs in the transfer management.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×