Skip to content

Commit

Permalink
stm32/main: Deinitialize SPI and I2C on soft-reset.
Browse files Browse the repository at this point in the history
Following UART, CAN, Timer, etc.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
  • Loading branch information
iabdalkader authored and dpgeorge committed Dec 9, 2024
1 parent 405aa69 commit 89191b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/stm32/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,10 @@ void stm32_main(uint32_t reset_mode) {
soft_timer_deinit();
timer_deinit();
uart_deinit_all();
spi_deinit_all();
#if MICROPY_PY_PYB_LEGACY && MICROPY_HW_ENABLE_HW_I2C
pyb_i2c_deinit_all();
#endif
#if MICROPY_HW_ENABLE_CAN
can_deinit_all();
#endif
Expand Down

0 comments on commit 89191b0

Please sign in to comment.