I am trying to mount USB flash disk to my custom IMXRT1176 board. I aim to list all .mp3 binary files in USB stick and later then try to play those files randomly.
I found only one example in SDK named "evkmimxrt1170_host_msd_fatfs_bm_cm7" related with FATFS MSC. However, in above example there is a simple OS used for it, named OSA. But I do not want to use operating system. I need the same example but using only with bare metal.
Is it possible to share with me one example .zip file?
Below is the screenshot of USB folder in MCUXpresso IDE for IMXRT1166;
Below is the screenshot of USB folder in SW4STM32 IDE for STM32F769;
As per my understanding, usb folder in MCUXPresso IDE is based on running over Operating System. But as you see, in STM32F769, USB folder is based on bare metal, no OS.
I tried to download USB and FATFS stack from online SDK Builder. But every time I download it, it is with OAS coded. I could not find bare metal FATFS USB MSC Class folder in Middleware Section.
Solved! Go to Solution.
Hi @burhanhagi ,
USBHostTaskFn is used to receive interrupt message. When interrupt comes, it register a message to OSA. USBHostTaskFn check this message and parse the incoming command. If you don't like this mechanism you just make your own massage channel.
Regards,
Jing
Hi @burhanhagi ,
OSA is not a operation system. It is a middle level between OS and baremetal software. With this level, the baremetal example can port to OS easily.
Regards,
Jing
Hi @jingpan, There is 2 functions in the main function. USB_HostMsdTask(g_MsdFatfsInstance) function is the one what I want to add. However, the first function USBHostTaskFn(g_HostHandle) is related with OSA. See the below please;
USBHostTaskFn(g_HostHandle) inside;
As you see above, that function calls OSA_EventWait(...).
When I comment out the USBHostTaskFn(g_HostHandle) function in the main while loop, the code does nothing.I need the program to execute with only USB_HostMsdTask(g_MsdFatfsInstance). However, without USBHostTaskFn(g_HostHandle) function, I could not achieve it. What could I do? How could I weed out the unwanted OSA lines? Because all usb->host->class->.. files was constructed based on this.
Hi @burhanhagi ,
USBHostTaskFn is used to receive interrupt message. When interrupt comes, it register a message to OSA. USBHostTaskFn check this message and parse the incoming command. If you don't like this mechanism you just make your own massage channel.
Regards,
Jing
Thank you @jingpan