2024-08-22 02:02 PM
Hello!
I'm facing an odd problem with STM32H750VB MCU and the USB Host routine on a custom board. I'm working with the latest HAL (v1.11.2) at 400 MHz and USB using the 48 MHz internal RC, "host only" mode + FatFs "read-only". The software is quite simple: it detects a flash drive, mounts it and try to open a text file. If so, the file is closed, the flash drive is unmonted and then, the board is reset by "HAL_NVIC_SystemReset".
The issue lies on this: after the board reboot with the flash drive still connected to the USB, the software detects it but doesn't enumerate it. It waits up to 30 seconds for the enumeration and then, a new reset is triggered, After that, it works! Keeping it cycling, the 1st reset works, the 2nd reset don't, the 3rd reset works, the 4th don't, and so on... Within this 30 seconds waiting, if I remove the flash drive from USB and plug it again, works flawless.
Do you guys have any ideia about this behavior? I also tried to "DeInit" the USB host and disabled USB voltage detector before the reset, without success.
Thanks a lot!