AnsweredAssumed Answered

STMF327-DISCO and "MSC_Standalone" example don't work (Bug in USBH MSC lib v3.2.1)?

Question asked by gorup.crt on Jul 15, 2015
Latest reply on Jul 29, 2015 by Amel N
Hello,

during the last two days I am trying to run the "MSC_Standalone" example application from Cube F7 1.1 HAL packege on STM32F7-Discovery using latest IAR compiler (7.40.3). The application is is quite simple (read/write and list files from USB Flash drive), but I didn't manage to get it working.

Based on the information on the display it seems that the enumeration and MSC part pass fine (Serial number detected, number of supported LUNs = 1, vendor = Generic, class = 0x08, ...). However, the example fails later on during first occurrence of f_write or f_read with FR_INVALID_OBJECTS error code. During debugging I have found out that MSC_Handle is left cycling in in MSC_IDLE state with error MSC_NOT_READY. If I change the error state into MSC_OK the FatFS starts working (reading, writting, listing files) just fine. Could this be a bug somewhere in USBH_MSC_Process function?

I have also tried the FreeRTOS flavor of the same example from the same HAL release, but the problem is the same. I have also tried several different USB Flash drives, but with no luck. The problem seems similar to this one, but this should be solved long time ago. I have also tried various optimization parameters (like described in previous post) but the result is the same. 

Has somebody tried the MSC host examples for STM32F7-DISCO?

Thanks, Črt

Outcomes