Merge pull request #1166 from openmv/cyw43_softreset

Fix CYW43/LWIP and soft-reset bugs.
This commit is contained in:
Ibrahim Abd Elkader 2021-02-13 02:04:21 +02:00 committed by GitHub
commit 5e024e22db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -523,8 +523,8 @@ soft_reset:
#if LWIP_MDNS_RESPONDER
mdns_resp_init();
#endif
systick_enable_dispatch(SYSTICK_DISPATCH_LWIP, mod_network_lwip_poll_wrapper);
}
systick_enable_dispatch(SYSTICK_DISPATCH_LWIP, mod_network_lwip_poll_wrapper);
#endif
#if MICROPY_PY_NETWORK_CYW43
@ -722,6 +722,12 @@ soft_reset:
}
} 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
// Note: FS IRQ is disable, since we're going for a soft-reset.
irq_set_base_priority(IRQ_PRI_FLASH+1);
@ -745,9 +751,6 @@ soft_reset:
#ifdef IMLIB_ENABLE_DMA2D
imlib_draw_row_deinit_all();
#endif
#if MICROPY_PY_LWIP
gc_sweep_all();
#endif
first_soft_reset = false;
goto soft_reset;
}