diff options
author | robert-hh <robert@hammelrath.com> | 2023-08-16 16:00:43 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-09-01 00:27:13 +1000 |
commit | ce38784fa8e8abc57f7d99ce10739c4f1b577565 (patch) | |
tree | 12cf0c6b6a6ba77660e5e9c189341fbd5fd15efa /py/modmicropython.c | |
parent | 3f5976e14a1e0f94f9af414bd99789ebf30a865d (diff) |
mimxrt/machine_uart: Fix and complete UART.deinit and uart_deinit_all.
The code did not check at deinit whether a UART was initialized. That did
not matter for all MCU's except MIMXRT1176, which crashes at the second
soft reset in a row.
But since it is a general problem to use UART methods of a UART which has
been deinitialized, checks were added to all applicable methods for a clear
response instead of e.g. a crash.
Deinitialize UART using software reset. It resets the UART but keeps it
accessible for software, avoiding an exception when UART registers are
accessed after a DeInit.
Signed-off-by: robert-hh <robert@hammelrath.com>
Diffstat (limited to 'py/modmicropython.c')
0 files changed, 0 insertions, 0 deletions