This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

in msp430 microprocessor, how to save data to USB stick or other outside storage

Other Parts Discussed in Thread: MSP430FG4619, MSP430F6635

I use MSP430FG4619 in my current design, I want to save data to USB stick or other outside storage, such as SD card, how to do it? also I find MSP430f6635 has USB module, but looks like it is not for USB stick, it is for connection with computer to commnuicate, like RS232 function, is it correct?

  • USB is one of the hardest interfaces I ever found.
    The documentation PDFs have minimum 1000 pages+.

    The protocol timing is very critical and uses a lot of ressources.
    Try to use SD card interfaces with SPI protocol - will shorten your development times a few month less and save many nerves.

    There are 3 different USB interface types,
    a) server/host
    b) peripheral
    c) OTG (USB "on the go") which is little bit of host and peripheral in one box (couldn't get any harder).

    USB was developped mainly from Intel and I think they blew up hardware and software to sell specific processors for that job. Unfortunately Intel did loose the touch to reality and today they are not very present in this market except the chipsets for x86 mainboards.

    :-o

  • jim wang2 said:

    I use MSP430FG4619 in my current design, I want to save data to USB stick or other outside storage, such as SD card, how to do it? also I find MSP430f6635 has USB module, but looks like it is not for USB stick, it is for connection with computer to commnuicate, like RS232 function, is it correct?

    MSP430 (that have USB hardware module or by software bit-banging) can be used only as USB device / peripheral, not as USB master / host. If you want to save collected data, and internal MSP430 flash is not big enough, external flash (or SD card) can be used.
    MSP430 can be used as USB stick (and there is open source example for this in TI MSP430 USB Dev Pack), with plugging to PC, but USB stick can't be plugged to MSP430.

    Karl Dahlmann said:

    USB is one of the hardest interfaces I ever found.
    The documentation PDFs have minimum 1000 pages+.

    Not at all, and there are simplified description...

    USB in a NutShell (http://www.beyondlogic.org/usbnutshell)

    Karl Dahlmann said:

    The protocol timing is very critical and uses a lot of ressources.


    If this is related to USB, than is is not important to MSP430 devices with USB hardware module, because all processing is done in parallel with main CPU. Some calculation related to my USB stack running on MSP430F550x ...

    http://forum.43oh.com/topic/3931-native-usb-port-on-lm4f120-board/?p=37130

  • zrno soli said:
    If this is related to USB, than is is not important to MSP430 devices with USB hardware module, because all processing is done in parallel with main CPU. Some calculation related to my USB stack running on MSP430F550x ...

    Well this depends on what you do and what you want. If you just want to transfer some data blocks via USB it maybe more easy but I would say most developers just copy or recycle existing code examples to emulate a HID or BOM device. This is not what I understand in full implemented USB. I wanted to do a project about 2 years ago using FTDI controllers with isochronous transfers but after a few weeks I throwed this idea.

    There are much more implications than using own PID or VIDs. Most USB implementers do not allow to use PIDs and/or VIDs for free and require a kind of license when using them official.

  • Hi Jim,

    You, can also try other TI microcontroller, which has support for saving data to USB stick. Tiva ARM kits has example program for saving data to USB stick. You, would just need to modify the example program to your preference.

    -ke

  • Markel Robregado said:
    You, can also try other TI microcontroller, which has support for saving data to USB stick. Tiva ARM kits has example program for saving data to USB stick. You, would just need to modify the example program to your preference.

    If primary objective is to save data on USB stick by all means then yes - this is way to go. Otherwise use another storage like SD card. For small amounts of data EEPROM or SPI flash chips are good alternatives.

  • Karl Dahlmann said:

    Well this depends on what you do and what you want. If you just want to transfer some data blocks via USB it maybe more easy but I would say most developers just copy or recycle existing code examples to emulate a HID or BOM device. This is not what I understand in full implemented USB. I wanted to do a project about 2 years ago using FTDI controllers with isochronous transfers but after a few weeks I throwed this idea.

    I was looking for fast transfer (large block of data) between uC/PC, and found it in CDC/Bulk (up to 1 MB/s) low cost MSP430F550x family. Made mine own stack for this. Never used HID or something else because don't need it. Of course, if you want to build some "special" interface based on USB, that include also writing customized drivers on PC side, things become more complicated.

    Karl Dahlmann said:

    There are much more implications than using own PID or VIDs. Most USB implementers do not allow to use PIDs and/or VIDs for free and require a kind of license when using them official.

    http://www.ti.com/lit/an/slaa457/slaa457.pdf

    VIDs are assigned by the USB Implementers Forum (USB-IF), which is the standards body that oversees USB. The vendor can choose to obtain the VID by joining the USB-IF or to license a VID without joining. At the time of writing, the former costs $4000 annually, and the latter costs $3500 for a two-year license. (See http://www.usb.org/developers/vendor for more information.)


    Alternatively, TI will license a PID to MSP430 customers for use with the MSP430 VID (0x2047) as part of its VID-sharing program. The license is free, with the basic stipulation that it only be used with TI USB devices. The program is intended to ensure that all MSP430 customers have easy access to a VID when going to market. To obtain a copy of the license, look for the link for this program at http://www.ti.com/msp430usb.

**Attention** This is a public forum