Standard logger in combination with UART

kluverp
Posts: 26
Joined: Mon Jun 18, 2018 7:08 am

Standard logger in combination with UART

Postby kluverp » Mon Jun 18, 2018 12:07 pm

Hi All,

I have a display connected to the UART of the ESP32. All works well, but I noticed when I call:
uart_set_pin(UART_NUM_1, ECHO_TEST_TXD, ECHO_TEST_RXD, ECHO_TEST_RTS, ECHO_TEST_CTS);

The default logging macros like "ESP_LOGI()" no longer output any data to the serial console. I only see the data that is send to the display.

How can I both output the data that is send to the display user the UART and show the default Logging data? I want to be able to debug both data that goes to the screen and the rest of the application itself.

Thanks!

kluverp
Posts: 26
Joined: Mon Jun 18, 2018 7:08 am

Re: Standard logger in combination with UART

Postby kluverp » Thu Jul 26, 2018 5:35 am

I found the problem:

The Serial monitor uses UART0 to output to screen.
In my codebase I found that when the UART for the display was initialized, it was done on UART1, BUT with the same GPIO pins as are used by UART0.

Thus causing the Serial monitor to cease to function. Silly mistake.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 96 guests