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.

CCS/SW-EK-LM4F232: qs-logger.c - Data logger Quickstart application for EK-LM4F232.

Part Number: SW-EK-LM4F232

Tool/software: Code Composer Studio

Hello

this is my first time to deal with FATFS & data logger applications so I have imported the qs-logger - Data logger Quickstart application for EK-LM4F232 to the CCS and tried to understand how the application works,

in the USB module files, the application has initialized the USB hardware but when the application works with f_open, f_write i don't see the code that deal with USB hardware, only in he comments it mention that the entire buffer will be written to the USB stick file.

So i want to know how the USB hardware is being called to write to usb stick.

BR

Hani

  • The call to USBHMSCDriveOpen() in line 364 of usbstick.c initializes the global structure g_psMSCInstance which is used by the FATFS routines to know it is writing to a USB stick.

    The port between the USB library utilities and the FATFS third party software is in: C:\ti\TivaWare_C_Series-2.1.4.178\third_party\fatfs\port\fat_usbmsc.c.

  • Hello Bob

    during the FileInit method, the coder didn't refer to the the global structure g_psMSCInstance, he referred to the g_sFatFs address.

    Still i didn't get how the connection between the FATFS and USB, also i will modify the code to exchange the data with SD Card instead USB.

    BR

    Hani

  • g_psMSCInstance is used by disk_initialize() which is called by chk_mounted(), which is called by f_open() (among other functions).