Skip to main content
Senior
August 25, 2025
Solved

"Ux_Host_DualClass" example on STM32N6570-DK

  • August 25, 2025
  • 5 replies
  • 933 views

There is no test.txt file in my USB drive after the example is run.
The board sends this log

**** USB OTG HS Dual_Class Host ****

USB Host library started.

Starting Application
Connect your HID or MSC Device

USB Device Enumeration Failure

Tried to attach the USB drive to both USB connectors.

The last message is sent about 1.5s after the previous ones.

Where can be an issue?

Best answer by FBL

Hi @ERROR 

I flashed you trusted binary as it is and it's working fine on my end! 

Now, I'm suspecting your device or the USB adapter !

5 replies

Technical Moderator
August 26, 2025

Hi @ERROR 


It works on my end ! 

FBL_0-1756215661797.png

It is possible that your device is not working properly! 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
ERRORAuthor
Senior
August 27, 2025

Hi @FBL ,

thank you for your response!

Have you built the firmware with IAR?

I did it with STM32CubeIDE 1.19.0. Could you please try it out too?

I powered up the board from the external power supply via Arduino connector, and from ST-Link USB as well. I tried two USB drives, one keyboard, and one mouse. No enumeration anyway.

Regards!

Technical Moderator
August 27, 2025

Hi @ERROR 

Same behavior on CubeIDE. I've tried with a keyboard, mouse and storage. 

FBL_1-1756285535057.png

FBL_3-1756285665251.png

FBL_2-1756285643947.png

Would you provide more details about your hardware setup?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
ERRORAuthor
Senior
August 27, 2025

@FBL ,

May I ask you share your binary to let me flash my board and check?

Regards!

Technical Moderator
August 27, 2025

Hi @ERROR 

I'm attaching the binary file. Did you select Software reset?

FBL_0-1756304721655.png

Do you use external loader check if it is selected correctly.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
ERRORAuthor
Senior
August 28, 2025

Hi @FBL 

Thank you for your firmware!
Looks like you use a dev mode. I tried to run your ELF in STM32CubeIDE - the enumeration failure is again (i used "software system reset").
Usually, I use a regular mode loading the binary to the flash memory.

I took your ELF and converted it to the binary with the line below

 arm-none-eabi-objcopy -O binary Ux_Host_DualClass.elf Ux_Host_DualClass.bin

Then I signed the binary and loaded it with the STM32CubeProgrammer to the flash memory at 0x70000000 (I use the external loader of course). The corresponding BAT file and converted files are included in the archive attached.
After that I set BOOT1 switch to the "L" position and reset the board. And I have the same "USB Device Enumeration Failure".

Could you please flash your board with BAT files in the FBL_USB directory (your fw), and FBL_USB_MY directory (my fw)?
PS. The USB port looks not damaged, because I successfully run USB devices examples, and the green LD9 lights up when I plug in a USB drive to it.

Regards!

FBLBest answer
Technical Moderator
August 28, 2025

Hi @ERROR 

I flashed you trusted binary as it is and it's working fine on my end! 

Now, I'm suspecting your device or the USB adapter !

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
ERRORAuthor
Senior
August 28, 2025

@FBL ,

That's fine! Definitely, I have some hardware issues.

Thank you very much indeed for your support!

I will try other hubs and something else.

Good luck!