arpruss / USBComposite_stm32f1

USB Composite library for STM32F1 (HID, Serial, MIDI and XBox360 controller)
Other
381 stars 76 forks source link

modify bootloader reset sequence #72

Closed f3sty closed 4 years ago

f3sty commented 4 years ago

Currently the 'reset to bootloader' function doesn't work too well with the HID bootloader. The bootloader doesn't wait for an upload to start after a reset unless a 'magic word' is written to the register BKP_10 prior to reset (see http://stm32duinoforum.com/forum/viewtopic_f_16_t_1549.html).

This patch sets the backup register value to 0x424C, which signals the bootloader to stop and wait for an upload.