MicroPython_ESP32_psRAM_LoBo icon indicating copy to clipboard operation
MicroPython_ESP32_psRAM_LoBo copied to clipboard

Machine UART deinit() method always returns ValueError exception

Open miketeachman opened this issue 6 years ago • 0 comments

The UART deinit() method always returns ValueError: Cannot stop UART task

Caused by a bug in the C implementation in function=machine_uart_deinit(), file=machine_uart.c.

Fixed by changing test for tmo With bug:

if (tmo) {
   mp_raise_ValueError("Cannot stop UART task!");
}

With fix:

if (!tmo) {
   mp_raise_ValueError("Cannot stop UART task!");
}

thanks !

miketeachman avatar Apr 04 '19 17:04 miketeachman