dmitrystu / libusb_stm32

Lightweight USB device Stack for STM32 microcontrollers
Apache License 2.0
696 stars 160 forks source link

STM32WB55: fix suspend event bug #106

Closed nminaylov closed 2 years ago

nminaylov commented 2 years ago

I've found strange bug in WB55 USB controller: sometimes it stops getting wakeup event after entering suspended state first time. It seems to be some hardware issue, this bug also presents in HAL USB driver an even in built-in DFU bootloader. It can be fixed by clearing suspend interrupt flag before setting suspend command (which is wrong according to the datasheet, but it works)