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.

DK-TM4C123G: Issue with USB mass storage connection in qs-logger example

Part Number: DK-TM4C123G

Hi there, please forgive me as I am relatively new to TI development and my background is primarily mechanical.

I have been trying to run the qs-logger example and save data to a usb mass storage device but currently I am getting a g_iState value indicating no device is attached.  

I am especially confused because I was able to successfully run the "usb_stick_update" example and load the "usb_stick_demo" .bin file from the same USB drive.  I had initially thought it was some type of USB driver issue but because the other demo worked I am not sure.

Some things to note include:

  1. I was able to successfully download the Data Logger Serial Port driver but it took significant work, maybe some type of USB recognizing driver was missed?
  2. The power select jumper is in the ICDI position, as from my understanding the the DK-TM4C is acting as a host.
  3. I have the device driver libraries correctly attached to the best of my understanding, and I have downloaded the most recent update of Tivaware/drivers from the ti site.
  4. I tried a different USB stick to no avail, I also reformatted USB to FAT32 and FAT

I have looked through all the data sheets and I genuinely don't know what I am missing for this.  I am getting frustrated because I am just trying to understand the example and can't get it to work.

 

  • I was unable to duplicate your issue. I just retested the qs-logger demo by importing the project to CCSv7 from:
    C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\dk-tm4c123g\qs-logger\ccs
    I compiled and programmed the demo into my DK-4C123G. I attached an off-the-shelf 8GB USB memory stick to the USB OTG port (bottom of the board) with a micro USB to USB A female OTG adapter cable. I configured the demo to log the magnetic X Y and Z values and started the demo. After running the demo I read the USB stick on a PC and saw that the demo created the file LOG0000.CSV.
  • Thanks for attempting to recreate my issue. Did you need to specify any path variables in order to get the qs-logger example to work?

    I am especially confused now because the usb_host_msc example worked perfectly, so I can definitely access the USB device via the DK-TM4C. Can you describe to me the exact sequence with which you connected the USB stick in the qs-logger? Is there some ON/OFF component to confirm data storage that I am missing?

    Thank you,

    Garrett Kryt
  • I did not specify any path variables, as this entire operation occurs on the DK-TM4C123G. Once the TM4C123 is programmed, I only use the In-circuit debug interface to power the DK-TM4C123G board.
    I plugged the cable and the USB stick into the USB OTG connector with the board unpowered. I plugged in the In-circuit debugger USB cable for power. I then did "CONFIG" -> "CHANNELS" and selected some channels to log using the push buttons on the DK-TM4C123G board. I selected "STORAGE" -> "USB". Then selected "START" ->. After some time, I pressed the "<-" button to stop the logging. I removed the USB stick from the DK-TM4C123G board and put it in my PC and was able to see the new CSV file created on the USB stick.

  • Thank you. It is worth noting that on my DK-TM4C board the USB OTG connector is slightly askew. Is it possible that I have a defective board or is the fact that I can run the usb_host_msc and view files on the USB indicating that communication is working correctly?

    Please advise,
    Garrett
  • I would expect that if usb_host_msc runs, then qs-logger would work as well. Just to be sure it is not something in the .out file, try programming my .out file into your device.

    /cfs-file/__key/communityserver-discussions-components-files/908/qs_2D00_logger.out

  • The .out file did not work for me. I did also get an error when loading your .out file:

    "CORTEX_M4_0: Trouble Reading Memory Block at 0x7327b66b on Page 0 of Length 0x4: Debug Port error occurred."

    At this point I don't know what to do. I have wasted two days on this and am more confused about USB communication than when I began. Should I attempt to return the board at this point?
  • I too am at a loss. If now you can no longer program a .out file, it looks like an intermittent problem or one that is getting progressively worse. If you have already tried different USB cables and a different USB port, then I agree the hardware is suspect.

  • Thank you for your help, I have opened a service request with TI to try and get the board repaired/replaced.  I will also continue to troubleshoot this problem over the weekend.  I will update here when I have achieved a result.

  • I was never able to get the data logger function to write to the USB. At this point I am assuming that the hardware was the issue. I ended up writing a function that wrote to the SD card instead.