AnsweredAssumed Answered

STM32F746G USB Device MSC with FatFs_uSD

Question asked by johnson.julia on Sep 14, 2016
Hardware used:

Nucelo Board -- STMF746ZG - Nucleo 144

I have been trying to adapt the USBD_MSC code written for the STM32F746G Discovery Board for the Nucleo 144. Running the USBD_MSC example works great, and I can see what was written to a uSD card using the seperate FatFs_uSD example application.

I started with the USBD_MSC example and added the required drivers for FatFs_uSD. When I run just the functions for a USB Device, windows shows me the (F:) drive with the .txt file in it. 

However, when I click on the .txt file, things get stuck. I've paused the code at this point, and noticed it's stuck at line 2204 of the stm32f7xx_hal_sd.c waiting for the SD transfer to complete. This causes it to timeout and then fail.

Any help with this issue is very much appreciated.
Do I need to configure the Nucleo - 144 as a USB OTG device? So it is a USB Host when it is writing to the uSD and a USB device when it is seen by the computer?

Outcomes