samd/main: Fix sercom deinit ordering in soft-reset.
If sockets were open when calling soft reset, gc_sweep_all() would try to close them. In case of e.g. the NINA WiFi handler, connected through SPI, spi_transfer() would be called for command exchange with the NINA module. But at that time SerCom was already disabled. Moving sercom_deinit_all() behind gc_sweep_all() solves this issue. Signed-off-by: robert-hh <robert@hammelrath.com>
This commit is contained in:
parent
b7180d53f0
commit
7a847bab1e
@ -84,9 +84,9 @@ void samd_main(void) {
|
||||
adc_deinit_all();
|
||||
pin_irq_deinit_all();
|
||||
pwm_deinit_all();
|
||||
sercom_deinit_all();
|
||||
soft_timer_deinit();
|
||||
gc_sweep_all();
|
||||
sercom_deinit_all();
|
||||
mp_deinit();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user