mirror of
https://github.com/clockworkpi/DevTerm.git
synced 2025-12-12 18:28:50 +01:00
25 lines
897 B
Diff
25 lines
897 B
Diff
diff --git a/packages/stm32duino/hardware/STM32F1/2022.9.26/libraries/USBComposite/USBCompositeSerial.cpp b/packages/stm32duino/hardware/STM32F1/2022.9.26/libraries/USBComposite/USBCompositeSerial.cpp
|
|
index 08349a7..c3ab02f 100644
|
|
--- a/packages/stm32duino/hardware/STM32F1/2022.9.26/libraries/USBComposite/USBCompositeSerial.cpp
|
|
+++ b/packages/stm32duino/hardware/STM32F1/2022.9.26/libraries/USBComposite/USBCompositeSerial.cpp
|
|
@@ -22,7 +22,7 @@
|
|
#include <libmaple/usb.h>
|
|
#include <string.h>
|
|
#include <libmaple/iwdg.h>
|
|
-
|
|
+#include <libmaple/bkp.h>
|
|
#include "usb_composite_serial.h"
|
|
|
|
#define USB_TIMEOUT 50
|
|
@@ -208,6 +208,10 @@ static void ifaceSetupHook(unsigned hook, void *requestvp) {
|
|
|
|
#define RESET_DELAY 100000
|
|
static void wait_reset(void) {
|
|
+ bkp_init();
|
|
+ bkp_enable_writes();
|
|
+ bkp_write(10, 0x424C);
|
|
+ bkp_disable_writes();
|
|
delay_us(RESET_DELAY);
|
|
nvic_sys_reset();
|
|
}
|