2024-05-07 04:50 AM - edited 2024-05-07 05:35 AM
Hi, I need to use USB in 2 modes:
1. See SD card files interfaced to controller through computer via USB
2. Transfer SD card files to "data storage device (USB stick)" via USB
Any examples for same? Display menu should handle above operations.
Since the implementation is new to me what middleware's are needed?
a. FATFS: SD card
b. FATFS: USB Disk
c. FreeRTOS: is CMSIS needed with FreeRTOS
What USB be configured to:
i. OTG/ dual
ii. Host
iii. Device
Please check and guide.
Solved! Go to Solution.
2024-05-09 06:08 AM
Have you checked examples? In Host mode, there are two examples using RTOS and without RTOS to transfer your files to mass storage device using MSC class
STM32CubeF4/Projects/STM324x9I_EVAL/Applications/USB_Host/MSC_RTOS at master · STMicroelectronics/STM32CubeF4 (github.com) They should be helpful!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-05-08 07:15 AM
Hi @GauravK
First, using the same PHY, you need a hardware configuration supporting USB dual role OTG.
We can provide you with some examples but which STM32 product are you using? Below an example showing how to use SD card with FatFS stack
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-05-08 10:23 AM - edited 2024-05-08 10:24 AM
Thanks getting reply from experts does help.
The eval board is Nucleo-F439ZI. A external HS PHY will be used. Initially I can try with in-built FS OTG dual role.
2024-05-09 06:08 AM
Have you checked examples? In Host mode, there are two examples using RTOS and without RTOS to transfer your files to mass storage device using MSC class
STM32CubeF4/Projects/STM324x9I_EVAL/Applications/USB_Host/MSC_RTOS at master · STMicroelectronics/STM32CubeF4 (github.com) They should be helpful!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.