cancel
Showing results for 
Search instead for 
Did you mean: 

DISC1-F407: ControllersTech USB Flash MSC Example not working

spacemonochrome
Associate

https://controllerstech.com/stm32-usb-host-msc/

I downloaded the app from this site, and the project from 2020 works. However, even though I followed the same tutorial, my code doesn't work in the 2025 version.

1 ACCEPTED SOLUTION

Accepted Solutions
spacemonochrome
Associate

This solved. F407-DISC USB MSC Host 2020 old version usbh_platform.c

if GPIO_Output PC0 state = 1 > GPIO_PIN_Set

if GPIO_Output PC0 state = 0 > GPIO_PIN_Reset

 

but the 2025 new version its reversed

if GPIO_Output PC0 state = 0 > GPIO_PIN_Set

if GPIO_Output PC0 state = 1 > GPIO_PIN_Reset

spacemonochrome_0-1756285213123.png

 

I Chance usbh_platform.c and this problem solved

 

spacemonochrome_1-1756285023874.png

 

spacemonochrome_0-1756284782628.png

 

 

View solution in original post

3 REPLIES 3
Imen.D
ST Employee

Hello @spacemonochrome 

Do you have an error message? where the code hangs/stop?

Are you using latest firmware package and tools version?

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
spacemonochrome
Associate

This solved. F407-DISC USB MSC Host 2020 old version usbh_platform.c

if GPIO_Output PC0 state = 1 > GPIO_PIN_Set

if GPIO_Output PC0 state = 0 > GPIO_PIN_Reset

 

but the 2025 new version its reversed

if GPIO_Output PC0 state = 0 > GPIO_PIN_Set

if GPIO_Output PC0 state = 1 > GPIO_PIN_Reset

spacemonochrome_0-1756285213123.png

 

I Chance usbh_platform.c and this problem solved

 

spacemonochrome_1-1756285023874.png

 

spacemonochrome_0-1756284782628.png

 

 

Andrew Neil
Super User

Thanks for posting the solution!

 


@spacemonochrome wrote:

https://controllerstech.com/stm32-usb-host-msc/

I downloaded the app from this site


Note that it's a third-party site - nothing to do with ST.

You need to report problems with their materials to them:

https://controllerstech.com/contact-us/

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.