UART2 crashes after some use

Radon_ESp32
Posts: 2
Joined: Thu Jul 06, 2017 6:31 am

UART2 crashes after some use

Postby Radon_ESp32 » Thu Jul 06, 2017 8:33 am

I have several UART crashes.
So the application runs on CPU 1 and i am using the UART2.
The application sends several get commands to an open Socket and the
answer is forwarded to the UART2.
Crashes occures after about 110 requests, and as you see on the picture from the scope,
the RTS signal is set, but no data goes out.
After this situation the esp32 crashes.
Blue line is the RTS signal, whereis the red lines are the data itself.
On the left of the picture is an (last) example, where data gets out.
The example in the middle provote the crash, the RTCS signal is set successfully,
but no data was sended in the gab between (no red bytes).
Uart2 sending example is:

len = uart_write_bytes(m_UartNumber, (char*)pData, bufSize);
ERR = uart_wait_tx_done(m_UartNumber, 15); //here there is never a error!


-UART2 is using
-Uart thread stacksize is 2600
-UART2 config is:
uart_config_t uart_config;
uart_config.baud_rate = 2 * 115200;
uart_config.data_bits = UART_DATA_8_BITS;
uart_config.parity = UART_PARITY_EVEN;
uart_config.stop_bits = UART_STOP_BITS_1;
uart_config.flow_ctrl = UART_HW_FLOWCTRL_DISABLE;
uart_config.rx_flow_ctrl_thresh = 10;
uart_param_config(m_UartNumber, &uart_config);


My suspicion was, that we run into the rundom address error, which is described in
the errata sheets.

Thanks for helping
Attachments
esp32_Uart_RTS_Data_Scope_Diagramm.png
esp32_Uart_RTS_Data_Scope_Diagramm.png (146.46 KiB) Viewed 6871 times

EndlessDelirium
Posts: 8
Joined: Wed May 10, 2017 1:12 pm

Re: UART2 crashes after some use

Postby EndlessDelirium » Wed Jul 19, 2017 7:26 am

Have you checked the crash output? Furthermore, is it possible that you simply try to send an array of zero bytes and your application crashes elsewhere? Lastly, regarding your suspicion that this is caused by Errata 3.10, does the crash still occur if you select "Run FreeRTOS only on first core" in make menuconfig?

Radon_ESp32
Posts: 2
Joined: Thu Jul 06, 2017 6:31 am

Re: UART2 crashes after some use

Postby Radon_ESp32 » Wed Jul 19, 2017 11:36 am

Hi
Thank you for answering.
Nop, at minimum 5 Byte are always sending. It could not be, that we send zero byte.
Strange thing is, when i comment out some WIFI code, the application runs (I testet it for
about a few hours). But when i include same code (e.g. getSocketError()), than the
crash occures. It seemd like a inconsistancy....

EndlessDelirium
Posts: 8
Joined: Wed May 10, 2017 1:12 pm

Re: UART2 crashes after some use

Postby EndlessDelirium » Thu Jul 20, 2017 1:49 am

This is gonna be difficult without more detailed information about the crash. Try to get the crash dump as described in the manual: https://esp-idf.readthedocs.io/en/v2.0/core_dump.html

Who is online

Users browsing this forum: No registered users and 181 guests