Skip to main content
Visitor II
June 2, 2025
Solved

USB MSC not working on STM32U5G9J-DK1, but same configuration works on DK2

  • June 2, 2025
  • 2 replies
  • 846 views

Hi,

I'm working on a USB Mass Storage Class (MSC) application using the STM32U5 series. I have a working firmware that correctly enumerates as a USB MSC device on STM32U5G9J-DK2 - Windows detects it and loads the built-in USBSTOR.SYS driver as expected. The configurations I've used are similar to the DFU example provided for the same board on STMCube IDE.

However, when I flash the code with similar configurations to the STM32U5G9J-DK1, it fails to enumerate properly. In Windows Device Manager, I get:

 

Windows has stopped this device because it has reported problems. (Code 43)

 

The USB device returned an invalid USB device descriptor.

How can I fix this?

    This topic has been closed for replies.
    Best answer by FBL

    Hi @Riya_L 

    I have tested the DFU example on two boards: U5G9-DK1 MB1829-B01 and on U5G9-DK2 MB1918-B01 without issues.

    FBL_0-1749752208613.png

    The elf files that you shared must have something messing in the configuration. You need to share your source code to help you identify the issue. At this level, you should not have issues on both boards.

    Ensure the USBC_5V jumper is fitted to provide Vbus 5V.

    2 replies

    Technical Moderator
    June 2, 2025

    Hello @Riya_L & welcome to ST Community

    Would you attach your firmware to check the issue on my end? For mass storage application, there should not be big difference in HW. Would you check your option bytes?

    STM32U5G9 DK1 schematic MB1829 introduces additional features like VBUS sensing, UCPD dead battery level shifting, and ADC flexibility to monitor VBUS voltage. The DK2 MB1918 is simpler, focusing on basic USB type C and sinking 5V only. 

    Riya_LAuthor
    Visitor II
    June 3, 2025

    Hi,
    I compared the option byte settings for DK1 and DK2 and found no differences in boot configuration, read protection, or other relevant parameters.
    I have attached the firmware for the example that worked on DK2. 
    The image below shows how the DK2 device in DFU mode is recognized in Device Manager:

    Riya_L_0-1748931320608.png


    I had just changed the mode from DFU to MSC and that worked fine on the same board (DK2):

    Riya_L_1-1748931507261.png

    For DK1, this is what I found:

    Riya_L_2-1748932473597.png

     

    Technical Moderator
    June 3, 2025

    Hi @Riya_L 

    Could you verify the board revision? Additionally, could you attach the non-functional MSC example on DK1 to address the original question?

    FBLAnswer
    Technical Moderator
    June 12, 2025

    Hi @Riya_L 

    I have tested the DFU example on two boards: U5G9-DK1 MB1829-B01 and on U5G9-DK2 MB1918-B01 without issues.

    FBL_0-1749752208613.png

    The elf files that you shared must have something messing in the configuration. You need to share your source code to help you identify the issue. At this level, you should not have issues on both boards.

    Ensure the USBC_5V jumper is fitted to provide Vbus 5V.