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/gc.h"
|
||||||
#include "py/mphal.h"
|
#include "py/mphal.h"
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
#include "py/lexer.h"
|
|
||||||
#include "py/parse.h"
|
|
||||||
#include "py/compile.h"
|
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "pendsv.h"
|
#include "pendsv.h"
|
||||||
|
|
||||||
@ -375,12 +372,11 @@ void usbdbg_control(void *buffer, uint8_t request, uint32_t length)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case USBDBG_SYS_RESET_TO_BL:{
|
case USBDBG_SYS_RESET_TO_BL:{
|
||||||
#if defined(RTC_BASE)
|
#if defined(MICROPY_RESET_TO_BOOTLOADER)
|
||||||
RTC_HandleTypeDef RTCHandle;
|
MICROPY_RESET_TO_BOOTLOADER();
|
||||||
RTCHandle.Instance = RTC;
|
#else
|
||||||
HAL_RTCEx_BKUPWrite(&RTCHandle, RTC_BKP_DR0, 0xDF59);
|
|
||||||
#endif
|
|
||||||
NVIC_SystemReset();
|
NVIC_SystemReset();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user