2013-06-17 09:30 AM
I build my own STM32F405RG Stamp and try now to get the USB FS running. For to make good progress I use the libraries, which are available for the stm32F407 Discovery.
I use Atollic True Studio Lite and ST-Link/V2 SWD. When I debug the USB example then I get a unexpected Interrupt and the program execution hangs in a endlos loop. The Equipment Manager in Windows shows that a new USB is connected but with problem uknown. When I stop the debug seccsion, then the equipment manager shwos a working USB ''STM Device in DFU Mode''. It is sure there is a problem. Is theis problem knowing or how can I debug this problem. Martin2013-06-18 08:32 AM
> The Equipment Manager in Windows shows that a new USB is connected but with problem uknown. When I stop the debug seccsion, then the equipment manager shwos a working USB ''STM Device in DFU Mode''.
Sound like you are debugging USB enumeration process. When the enumeration code (ie. handlers of Standard Device Requests) is paused by debugger, timeout occurs no the host, because the device doesn't return expected response in time (within 50ms or 500ms). And then, host goes out of normal enumeration sequence, it tries to recover the device. You may step through process of single transaction on the firmware, but you can't trace entire enumeration sequence. To see enumeration sequence, a) hardware bus analyzer or software sniffer, or b) so-called ''printf'' debug - over USART or semi-hosting. Tsuneo