ESP32 crash when sending large data through shared uart.
ESP32 crash when sending large data through shared uart.
Hi, I'm trying develop a project with my ESP32-S3 as the main controller and an LTE daughterboard to connect the internet. I'm facing an issue with system crash, when I try to send a large amount of data (>2KB). On the daughterboard side, the data transfer is based on ITC frame link layer protocol, which sends any amount of data in frames. I'm using the UART 0 as the shared uart for communication and shows the following error. Any suggestions on this?
- Attachments
-
- Screenshot 2024-06-03 100012.png (40.62 KiB) Viewed 1212 times
-
- Posts: 1734
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: ESP32 crash when sending large data through shared uart.
Check in your code where and why you may be passing an invalid pointer (likely NULL) around.Any suggestions on this?
Re: ESP32 crash when sending large data through shared uart.
esp_err_t itc_frame_send_and_receive(itc_link_layer_handler_t *ctx, uint8_t *txbuffer, uint16_t *tx_length, uint8_t *rxbuffer, uint16_t *rx_length)
{
uint16_t frame_size = 0;
int i = 0;
uint16_t data_field_from_frame = 0;
if (ctx == NULL || txbuffer == NULL || tx_length == NULL || rxbuffer == NULL || rx_length == NULL) {
printf("Error: Null pointer argument\n");
return ESP_FAIL;
}
I'm making sure that the pointer are not NULL at the start of the function, also as I mentioned, the function works as expected for data less than 2KB. Problem is I cannot give anymore resources to this task, moreover, the ITC frame link layer protocol is setup to send the data in defined size (512 bytes) frames, regardless of the total size.
{
uint16_t frame_size = 0;
int i = 0;
uint16_t data_field_from_frame = 0;
if (ctx == NULL || txbuffer == NULL || tx_length == NULL || rxbuffer == NULL || rx_length == NULL) {
printf("Error: Null pointer argument\n");
return ESP_FAIL;
}
I'm making sure that the pointer are not NULL at the start of the function, also as I mentioned, the function works as expected for data less than 2KB. Problem is I cannot give anymore resources to this task, moreover, the ITC frame link layer protocol is setup to send the data in defined size (512 bytes) frames, regardless of the total size.
-
- Posts: 1734
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: ESP32 crash when sending large data through shared uart.
So what's happening in line 242 of itc_frame_link_layer_prot.c?
Re: ESP32 crash when sending large data through shared uart.
EXCVADDR (which I understand to be the address resulting in LoadProhibited) is 0x8, which is an invalid address but your NULL checks will have no effect.
Who is online
Users browsing this forum: No registered users and 92 guests