Skip to main content
Best answer by spacemonochrome

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

 

 

3 replies

Technical Moderator
August 26, 2025

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"".ThanksImen"
spacemonochrome
spacemonochromeAuthorBest answer
Associate
August 27, 2025

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
August 27, 2025

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.