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 Stick data logging problem



Hello, I'm using the TIVA Launchpad. I would like to build a simple application in which I can connect a flash stick (pen drive) on to the launchpad and write a simple .txt file with the ADC data being logged into it.

I know that Launchpad has the problem where I can use the board in either debug mode or device mode.

So, to use the USB peripheral in debug mode, I figured that I have to provide PB1 (VBUS USB) with the required 5V.

So, is it possible to simply short the VBUS of the board with PB1 (using a simple jumper wire) or do I have to do it using a 0 ohm resistor (which the electronics store guy has never heard about) ? Are there any other hardware modifications I need to make?

Can someone please direct me to a simple code which can accomplish my task? (preferably nothing too complicated, would be easier to understand a code which performs just my required task)(also, i'm a newbie)

Regards

Ashwin V

  • Hi Ashwin,

    Ashwin V said:
    I would like to build a simple application in which I can connect a flash stick (pen drive) on to the launchpad and write a simple .txt file

    There is a qs-logger example program for EK-LM4F232, that you can review. There is an option to store temperature data to USB stick. 

    Ashwin V said:
    So, to use the USB peripheral in debug mode, I figured that I have to provide PB1 (VBUS USB) with the required 5V.

    I am not sure what you are trying to say. But, there is a switch that you can set the power select to Debug Mode. See, link below.

    http://www.ti.com/lit/ug/spmu286a/spmu286a.pdf

    -kel

        

  • Hello Markel,

    What I meant was that I wanted to power the board using my PC (i.e. in Debug mode). At the same time, I want to connect a flash stick to the board without switching to the 'Device mode'. So, I need to supply 5V to the USB VBUS. How do I do that?

    Regads,

    Ashwin V

  • Also, qs-logger is very complicated with a lot of functionality. I would very much appreciate a sample code that only "logs a text/csv file into a usb stick" and nothing more. I find qs-logger very difficult to understand.

  • Hi Ashwin,

    Ashwin V said:
    What I meant was that I wanted to power the board using my PC (i.e. in Debug mode).

         

         There is some mention about this at  the Tiva Launchpad User's Guide, under "USB Connectivity", 

    -kel

  • Hi Markel,

    That helped a lot. I found what I was looking for. Than solves one problem. I'll try to analyze qs-logger now and hopefully understand it.

    -Regards and Thanks

    Ashwin V

  • Ashwin V said:
    That helped a lot. I found what I was looking for. Than solves one problem. I'll try to analyze qs-logger now...

    Guys - that was an effective collaboration - you've both demonstrated the value of this type forum.  Kudos to you both!

    Ashwin - please accept that these new MCUs are amazingly powerful - and complex.  They're far above Arduino/similar class - and "rushed learning" or strict "copy/past" (minus real comprehension) - is not the best ticket to your (hoped for) long-term success.  Stated simply - "rush" is your enemy - you must set realistic achievement goals - and this vendor (aided by guys like Markel) has done a particularly good job in organizing this foum & staffing it with those skilled and caring.  (with the occasional intrusion of opinionated outsiders)

    There are many code examples - the detailed MCU data manual - and the always, immensely helpful - Peripheral Library User Guide.  And - a clearly presented post here - which gains best response when you demonstrate you've made real effort - not simply passing your "homework" along to be done (for free) by others...

    Bon chance mon ami...