Skip to main content
Explorer II
August 26, 2025
Solved

DISC1-F407: ControllersTech USB Flash MSC Example not working

  • August 26, 2025
  • 3 replies
  • 343 views

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.

    This topic has been closed for replies.
    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?

    spacemonochromeAuthorAnswer
    Explorer II
    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

     

     

    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/