mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1166 from openmv/cyw43_softreset
Fix CYW43/LWIP and soft-reset bugs.
This commit is contained in:
commit
5e024e22db
@ -523,8 +523,8 @@ soft_reset:
|
|||||||
#if LWIP_MDNS_RESPONDER
|
#if LWIP_MDNS_RESPONDER
|
||||||
mdns_resp_init();
|
mdns_resp_init();
|
||||||
#endif
|
#endif
|
||||||
systick_enable_dispatch(SYSTICK_DISPATCH_LWIP, mod_network_lwip_poll_wrapper);
|
|
||||||
}
|
}
|
||||||
|
systick_enable_dispatch(SYSTICK_DISPATCH_LWIP, mod_network_lwip_poll_wrapper);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MICROPY_PY_NETWORK_CYW43
|
#if MICROPY_PY_NETWORK_CYW43
|
||||||
@ -722,6 +722,12 @@ soft_reset:
|
|||||||
}
|
}
|
||||||
} while (openmv_config.wifidbg == true);
|
} while (openmv_config.wifidbg == true);
|
||||||
|
|
||||||
|
#if MICROPY_PY_LWIP
|
||||||
|
// Must call GC sweep here to close open sockets.
|
||||||
|
gc_sweep_all();
|
||||||
|
systick_disable_dispatch(SYSTICK_DISPATCH_LWIP);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Disable all other IRQs except Systick and Flash IRQs
|
// Disable all other IRQs except Systick and Flash IRQs
|
||||||
// Note: FS IRQ is disable, since we're going for a soft-reset.
|
// Note: FS IRQ is disable, since we're going for a soft-reset.
|
||||||
irq_set_base_priority(IRQ_PRI_FLASH+1);
|
irq_set_base_priority(IRQ_PRI_FLASH+1);
|
||||||
@ -745,9 +751,6 @@ soft_reset:
|
|||||||
#ifdef IMLIB_ENABLE_DMA2D
|
#ifdef IMLIB_ENABLE_DMA2D
|
||||||
imlib_draw_row_deinit_all();
|
imlib_draw_row_deinit_all();
|
||||||
#endif
|
#endif
|
||||||
#if MICROPY_PY_LWIP
|
|
||||||
gc_sweep_all();
|
|
||||||
#endif
|
|
||||||
first_soft_reset = false;
|
first_soft_reset = false;
|
||||||
goto soft_reset;
|
goto soft_reset;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user