UART2 does not receive anything
Posted: Thu Nov 10, 2022 10:05 pm
Hello,
I've assembled an ESP32WROOM module on a breakout board and set up some tests. I'd like to wire it up to an RS-485 transceiver chip for bus communication.
My first efforts were to get UART input working with the USB serial console UART0, the one that is used to program the device. That worked well. I could type commands in the serial port monitor of VSCode (Platform IO) and my code would react and do something, then log a message that I could see.
Now I've changed this to accept commands on UART2 and also send the response there. This is wired on different pins. The UART0 log is still active and running in parallel as set up during boot.
The problem is that I cannot receive any data from the RS-485 line. I've tried two different pins for RXD (default 16 and the adjacent number 5) but none work. I'm following the example code here, but for UART_NUM_2.
My code also regularly sends a counter over the RS-485 line as well as logging it and I can see both. So UART2/RS-485 sending works, but receiving does not.
I've checked that the DE signal isn't always-on by removing that pin and leaving it with its pulldown resistor. That stopped the sending but receiving still didn't work.
What should I look at to find out what's wrong?
I've assembled an ESP32WROOM module on a breakout board and set up some tests. I'd like to wire it up to an RS-485 transceiver chip for bus communication.
My first efforts were to get UART input working with the USB serial console UART0, the one that is used to program the device. That worked well. I could type commands in the serial port monitor of VSCode (Platform IO) and my code would react and do something, then log a message that I could see.
Now I've changed this to accept commands on UART2 and also send the response there. This is wired on different pins. The UART0 log is still active and running in parallel as set up during boot.
The problem is that I cannot receive any data from the RS-485 line. I've tried two different pins for RXD (default 16 and the adjacent number 5) but none work. I'm following the example code here, but for UART_NUM_2.
My code also regularly sends a counter over the RS-485 line as well as logging it and I can see both. So UART2/RS-485 sending works, but receiving does not.
I've checked that the DE signal isn't always-on by removing that pin and leaving it with its pulldown resistor. That stopped the sending but receiving still didn't work.
What should I look at to find out what's wrong?