mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Fix reset to bootloader command.
* Set RTC magic only for boards that need it.
This commit is contained in:
parent
1c4a5dd96a
commit
dbc467f928
@ -1 +1 @@
|
||||
Subproject commit fb2cbcd6ce2d4e6d9e89ecf93ad74b0ce89b34b4
|
||||
Subproject commit 93cc3d48ae8eaed1f64957f82c96473c2510ca09
|
||||
@ -14,9 +14,6 @@
|
||||
#include "py/gc.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/obj.h"
|
||||
#include "py/lexer.h"
|
||||
#include "py/parse.h"
|
||||
#include "py/compile.h"
|
||||
#include "py/runtime.h"
|
||||
#include "pendsv.h"
|
||||
|
||||
@ -375,12 +372,11 @@ void usbdbg_control(void *buffer, uint8_t request, uint32_t length)
|
||||
break;
|
||||
|
||||
case USBDBG_SYS_RESET_TO_BL:{
|
||||
#if defined(RTC_BASE)
|
||||
RTC_HandleTypeDef RTCHandle;
|
||||
RTCHandle.Instance = RTC;
|
||||
HAL_RTCEx_BKUPWrite(&RTCHandle, RTC_BKP_DR0, 0xDF59);
|
||||
#endif
|
||||
#if defined(MICROPY_RESET_TO_BOOTLOADER)
|
||||
MICROPY_RESET_TO_BOOTLOADER();
|
||||
#else
|
||||
NVIC_SystemReset();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user