Closed
Description
Board
ESP32 Dev Module
Device Description
LAN8720 module and TFT controlled over SPI attached
Hardware Configuration
no
Version
latest master (checkout manually)
IDE Name
platformio with arduino
Operating System
no os
Flash frequency
standard settings
PSRAM enabled
no
Upload speed
115200
Description
my program regularly sends big data packets (about 2000 characters long) using udp. this works fine, but every few hours, the esp32 crashes and reboots.
i stripped down the code and found that this happens on sending the udp packet.
i reduced functionality below to just the part that has been isolated and is responsible for the crash.
the sketch below cannot run. it just shows the part of the program that crashes.
the crash happens while executing the function sendToUdp.
Sketch
WiFiUDP Udp;
char udpData[2048];
unsigned int localUdpPort = 12331;
IPAddress broadcastUdpIp = IPAddress(192,168,1,255);
unsigned int broadcastUdpPort = 12333;
void setupUdp() {
Udp.begin(localUdpPort); // Enable UDP listening to receive data
}
void sendToUdp(const char *UDP_packet) {
Udp.beginPacket(broadcastUdpIp, broadcastUdpPort);
Udp.write((const uint8_t*)UDP_packet, strlen(UDP_packet));
Udp.endPacket();
}
void sendDataFromUdp() {
sendToUdp(udpData]);
}
void setup() {
...
setupUdp();
...
}
void loop() {
...
strncpy(udpData,"...an array of chars which is about 2000 characters long...",2048);
...
sendDataFromUdp();
...
}
Debug Message
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4008a15d PS : 0x00060e30 A0 : 0x800d6b0e A1 : 0x3ffb2690
A2 : 0xd8148d30 A3 : 0xd8148d2c A4 : 0x000000ff A5 : 0x0000ff00
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000000 A9 : 0x3ffb2650
A10 : 0x00000001 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x00000023
A14 : 0x007bf178 A15 : 0x003fffff SAR : 0x0000000a EXCCAUSE: 0x0000001c
EXCVADDR: 0xd8148d30 LBEG : 0x4008a15d LEND : 0x4008a16d LCOUNT : 0xffffffff
Backtrace:0x4008a15a:0x3ffb26900x400d6b0b:0x3ffb26a0 0x400d6b5f:0x3ffb26d0 0x400d73f4:0x3ffb26f0 0x400e1301:0x3ffb2820
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.