Closed olekhov closed 1 year ago
Ok, I've found the fix.
For working USB one needs to configure proper clocks. The example configures clock at 48MHz.
Default value for USB Prescaler is 1.5. This results in invalid clock configuration. For 48MHz the prescaler should have value of 1. For 1.5 the running speed should be 72MHz.
Hello. I am trying to enable USB serial CDCACM device on Leaflabs Maple Mini board. It is very similar to Blue Pill board with few differences.
Board LED is connected to PB1.
There is no pull-up resistor on D+ pin, there is more complicated circuit:
DISC
pin is connected to PB9. Original examples configure PB9 to push-pull output and drive it low to enable USB CDCACMAlso, there is bootloader on the chip. It starts on reset and configures USB to enable DFU firmware update. I want to keep bootloader.
When I plug board to USB, first it is booted into bootloader, device is recognized as
1eaf:0003
, the LED blinks several times and bootloader awaits for DFU. If no dfu is presented, board continues boot to firmware.When firmware configures USB, it is not accepted by the host. syslog shows these messages:
my current efforts are here