mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
bootloader/stm32: Keep SysTick active during flash deinit/mmap.
Needed to reset delay.
This commit is contained in:
parent
91b8293c62
commit
8cb6bf61e7
@ -112,11 +112,6 @@ int port_init(void) {
|
||||
}
|
||||
|
||||
int port_deinit(void) {
|
||||
// Disable SysTick and its IRQ.
|
||||
NVIC_DisableIRQ(SysTick_IRQn);
|
||||
NVIC_ClearPendingIRQ(SysTick_IRQn);
|
||||
SysTick->CTRL &= ~(SysTick_CTRL_ENABLE_Msk);
|
||||
|
||||
// Disable USB IRQ.
|
||||
HAL_NVIC_DisableIRQ(OMV_USB_IRQN);
|
||||
NVIC_ClearPendingIRQ(OMV_USB_IRQN);
|
||||
@ -147,6 +142,11 @@ int port_deinit(void) {
|
||||
spi_flash_deinit();
|
||||
#endif
|
||||
|
||||
// Disable SysTick and its IRQ.
|
||||
NVIC_DisableIRQ(SysTick_IRQn);
|
||||
NVIC_ClearPendingIRQ(SysTick_IRQn);
|
||||
SysTick->CTRL &= ~(SysTick_CTRL_ENABLE_Msk);
|
||||
|
||||
// Turn off LED.
|
||||
port_pin_write(OMV_BOOT_LED_PIN, true);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user