diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2018-02-10 22:09:03 +0100 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-02-10 23:13:38 +0100 |
commit | 8c2ae4a4701439e98569dc2f2acee7016b4c0f20 (patch) | |
tree | 835e57a8f18b7a8259f24bbd5d8a3c784e843688 /keyboards/clueboard | |
parent | fca31693df15f62cc3fd5851a0d1bae40eb179c2 (diff) | |
download | qmk_firmware-8c2ae4a4701439e98569dc2f2acee7016b4c0f20.tar.gz qmk_firmware-8c2ae4a4701439e98569dc2f2acee7016b4c0f20.tar.xz |
Fix reset for STM32 devices
Diffstat (limited to 'keyboards/clueboard')
-rw-r--r-- | keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c | 4 | ||||
-rw-r--r-- | keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h | 4 | ||||
-rw-r--r-- | keyboards/clueboard/60/rules.mk | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c index 897f20a88..4331155df 100644 --- a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c +++ b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c @@ -62,13 +62,15 @@ const PALConfig pal_default_config = { }; #endif +void enter_bootloader_mode_if_requested(void); + /** * @brief Early initialization code. * @details This initialization must be performed just after stack setup * and before any other initialization. */ void __early_init(void) { - + enter_bootloader_mode_if_requested(); stm32_clock_init(); } diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h index 7405c0ea9..e09112eb9 100644 --- a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h +++ b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h @@ -1164,14 +1164,14 @@ /* * USB bus activation macro, required by the USB driver. */ -// #define usb_lld_connect_bus(usbp) +// #define usb_lld_connect_bus(usbp) #define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) // #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) /* * USB bus de-activation macro, required by the USB driver. */ // #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)) +#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) // #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) #if !defined(_FROM_ASM_) diff --git a/keyboards/clueboard/60/rules.mk b/keyboards/clueboard/60/rules.mk index e0c4b8502..3664b6d2c 100644 --- a/keyboards/clueboard/60/rules.mk +++ b/keyboards/clueboard/60/rules.mk @@ -37,7 +37,7 @@ USE_FPU = yes OPT_DEFS = # Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000 -R +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave # Build Options # comment out to disable the options. |