UARTS1 and 2 appear unusable [SOLVED]
Posted: Wed Sep 13, 2017 7:53 am
I have an Espressif ESP32-devkit C board with ESP-WROOM-32. One of the attractions of the ESP32 was the hope that at least one UART aside from that used for USB would be available for general use. This appears not to be the case.
The ESP32 has three UARTs U0, U1 and U2.
U0 is used by the USB interface.
U2 uses pins GPIO17 (txd) and GPIO16 (rxd). The use of these pins is deprecated in the ESP32 datasheet. Section 2.2 Note states "ESP32-D2WD’s pins GPIO16, GPIO17, SD_CMD, SD_CLK, SD_DATA_0 and SD_DATA_1 are used for connecting the embedded flash, and are not recommended for other uses."
U1 uses GPIO9 (rxd) and GPIO10 (txd). Alas GPIO9 has very odd characteristics. If you instantiate it as an input, it reads high. If you connect it to 0V the board reboots. If you instantiate it as an output the board reboots. If you instantiate U1 - you've guessed it - the board reboots. [EDIT] It only reboots if a loopback is installed. But this bodes ill for actually using it.
There is nothing on the board schematic to explain the behaviour of GPIO9 so I'm wondering if the MicroPython firmware is using this pin in some way. If so, it's an unfortunate choice of pin.
Any comments or experience of using the UARTs?
The ESP32 has three UARTs U0, U1 and U2.
U0 is used by the USB interface.
U2 uses pins GPIO17 (txd) and GPIO16 (rxd). The use of these pins is deprecated in the ESP32 datasheet. Section 2.2 Note states "ESP32-D2WD’s pins GPIO16, GPIO17, SD_CMD, SD_CLK, SD_DATA_0 and SD_DATA_1 are used for connecting the embedded flash, and are not recommended for other uses."
U1 uses GPIO9 (rxd) and GPIO10 (txd). Alas GPIO9 has very odd characteristics. If you instantiate it as an input, it reads high. If you connect it to 0V the board reboots. If you instantiate it as an output the board reboots. If you instantiate U1 - you've guessed it - the board reboots. [EDIT] It only reboots if a loopback is installed. But this bodes ill for actually using it.
There is nothing on the board schematic to explain the behaviour of GPIO9 so I'm wondering if the MicroPython firmware is using this pin in some way. If so, it's an unfortunate choice of pin.
Any comments or experience of using the UARTs?