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.

USB - Flash Drive interface



Hello,

I am pretty new to using the TIVA-Launchpad. I was wondering if anyone had a sample code to write into a flash drive connected to the TIVA C Series Launchpad so that i can learn to use the USB peripheral.

I was looking for something in the line of : Writing  ADC data into a text file in a flash-drive that i connect to the launchpad.

Thanks in advance,
Ashwin V

  • There is a host MSC example available for the DK-TM4C123G that should be easily portable to the LaunchPad.  We don't include host examples in TivaWare for the LaunchPad because of the hardware modifications required to get Vbus (and ID if using OTG) from the MCU to the USB connector.  Once you populate a couple resistors, you have to be careful what you do with booster packs since they share pins.  This is documented in the LaunchPad user's manual.

  • Thank You Sir for the quick reply.

    For merely creating and writing a .txt file in a flash drive (but not reading from it.. only one way), do I require OTG or will host control suffice?

    And if I have to build an external circuit, I'm pretty good with circuits and ready to do that. But do I have to purchase any other booster-boards for host controller? Would a simple USB type-A female connector with 5V DC connected to the MCU work?

    (sorry about the questions. I'm new to USB and TIVA.)

  • To access a USB stick, you only need host.  OTG is only needed in situations where the host role changes in the system, and that's very, very rare.  

    You shouldn't have to build an external circuit to get host working.  The basic idea is that because the MCU on the LaunchPad is only 64 pins, there had to be trade-offs to support the new XL booster pack footprint.  To add this support, we needed to use the PB0 and PB1 pins.  Those pins are both used for USB host, which has a 5V output.  So, to protect people from destroying their boards, we chose to make host support optional instead of including the resistors.  To gain this support, you'll only need to add a pair of 0 ohm resistors to the board (described in the user's manual).  Just keep in mind that after you do this, you need to be aware that you have a 5V signal and make sure if you use a booster pack that it won't damage it.

  • Thank You again for the information :)

  • We have got experiment board, which can be used to do many experiments with TIVA and MSP430 Launchpads.

    Hope it will help you. Below is the pic of Experiment Board from iknowvations for your information.