2020-05-18 11:23 PM
I'm programming a firmware with USB CDC support on an STM32F405. I noticed that when I connect the board to my system without working firmware running, all USB devices start glitching out. Every second, the mouse cursor stops moving for a moment. This also happens if I start a debug session, when the debugger has stopped the firmware before MX_USB_DEVICE_Init() got called. This goes on for a minute and then stops. Unfortunately, the macOS logs show no USB related errors.
Has anybody seen this behaviour and maybe knows a workaround? Is something wrong with my board?
2020-05-19 01:35 AM
Which OTG module on the STM32?
Post schematic of the USB portion of your hardware.
Doesn't your mcu go into boot mode, i.e. hour is BOOT0 pin connected?
Does this happen also when a hub is inserted between the STM32 and the host?
JW
2020-05-19 11:55 AM
If it starts happening before MX_USB_DEVICE_Init() is even called, it's hard to to place blame on the STM chip. At that point, the PC shouldn't even detect a device on the line at that point. Perhaps it's pulling too much power, or there is some other hardware issue.