ESP32 WiFi unexpected error and question about speed

seppel123
Posts: 10
Joined: Fri Jan 14, 2022 2:08 pm

ESP32 WiFi unexpected error and question about speed

Postby seppel123 » Fri Jan 21, 2022 8:58 am

Hi Im trying to make a spi to wifi bridge.
My Hardware is a ESP-wrover-kit and Im using the ESP IDF together with eclipse.
To get a start i used the WiFi tester example and combined it with the tcp server example.
With this i got a sending speed from around 0.5 MB/s.
Than i checked the sdkconfig and set cpu clock to 240Mhz.
Makes it a bit better speed now ~0.6 MB/s.
Than i googled around a bit and found this settings:
https://github.com/espressif/esp-idf/bl ... ults.esp32
which i configured with my Project that brings me to ~0.7 MB/s thats not perfect but ok for me.
My Problem now iss when i try to send 2MB in 1440 byte packages the Firmware crashen with the error:
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

Core 0 register dump:
PC : 0x400eb720 PS : 0x00060330 A0 : 0x800eb7fc A1 : 0x3ffbef30
0x400eb720: ip4_netif_exist at C:/esp-idf2/components/lwip/lwip/src/core/ipv4/ip4.c:132

A2 : 0x3ffbba8c A3 : 0x3ffbbaa4 A4 : 0x3ffbdfc4 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000001 A8 : 0x05439479 A9 : 0x00000001
A10 : 0x62713cb9 A11 : 0x6732a8c0 A12 : 0x05439479 A13 : 0x3ffbdf78
A14 : 0x00000001 A15 : 0x00000000 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x05439564 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000

Backtrace:0x400eb71d:0x3ffbef30 0x400eb7f9:0x3ffbef50 0x400e6a88:0x3ffbef70 0x400e766d:0x3ffbef90 0x400f27a0:0x3ffbefc0 0x400f3411:0x3ffbefe0 0x400e0461:0x3ffbf000 0x400e0508:0x3ffbf020 0x4008bff1:0x3ffbf050
0x400eb71d: ip4_netif_exist at C:/esp-idf2/components/lwip/lwip/src/core/ipv4/ip4.c:130

0x400eb7f9: ip4_route_src at C:/esp-idf2/components/lwip/lwip/src/core/ipv4/ip4.c:180 (discriminator 2)

0x400e6a88: tcp_route at C:/esp-idf2/components/lwip/lwip/src/core/tcp_out.c:139 (discriminator 4)

0x400e766d: tcp_output at C:/esp-idf2/components/lwip/lwip/src/core/tcp_out.c:1290

0x400f27a0: lwip_netconn_do_writemore at C:/esp-idf2/components/lwip/lwip/src/api/api_msg.c:1837

0x400f3411: lwip_netconn_do_write at C:/esp-idf2/components/lwip/lwip/src/api/api_msg.c:1940 (discriminator 2)

0x400e0461: tcpip_thread_handle_msg at C:/esp-idf2/components/lwip/lwip/src/api/tcpip.c:168

0x400e0508: tcpip_thread at C:/esp-idf2/components/lwip/lwip/src/api/tcpip.c:154

0x4008bff1: vPortTaskWrapper at C:/esp-idf2/components/freertos/port/xtensa/port.c:168
So i dont know what happened here and maybe someone can help. The Project is in the attachment.
And if someone got maybe a example project what can do what i need (receive data on spi and send it to a wifi tcp socket client as fast as possible i would be happy if u can share it with me.

Greetings
seppel :)
Attachments
WifiTester.7z
(12.33 MiB) Downloaded 80 times

seppel123
Posts: 10
Joined: Fri Jan 14, 2022 2:08 pm

Re: ESP32 WiFi unexpected error and question about speed

Postby seppel123 » Thu Jan 27, 2022 10:00 am

Mh no one who can help me here?

greyarea
Posts: 4
Joined: Mon Jan 31, 2022 2:10 pm

Re: ESP32 WiFi unexpected error and question about speed

Postby greyarea » Mon Jan 31, 2022 2:17 pm

Couple of things

Your problems seems suspiciously aligned to the 2MB flash limit you have configured in sdkconfig. You should be seeing warnings like this if you monitor the chip on startup:

Code: Select all

W (286) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
Also, place line feeds before the beginning of your functions makes it easier to read.

seppel123
Posts: 10
Joined: Fri Jan 14, 2022 2:08 pm

Re: ESP32 WiFi unexpected error and question about speed

Postby seppel123 » Wed Feb 09, 2022 1:58 pm

HI thank you for your replie and sorry for the missing line feeds i will do it better next time if i upload code.

The other point you mentioned was the flash size i changed it to 4 mb but than i cant upload the binary to the chip. Eclipse is just compiling it and stops than. why is the flash size crashing my app? i not making a 2 mb array. i just sending 1400 bytes array until i sended the array that much that i sended 2 mb in total. can you tell me whats your idea here?

seppel123
Posts: 10
Joined: Fri Jan 14, 2022 2:08 pm

Re: ESP32 WiFi unexpected error and question about speed

Postby seppel123 » Wed Feb 09, 2022 2:43 pm

in debugging i can see that the error come from ip4.c line 132 its in the function bool ip4_netif_exist(const ip4_addr_t *src, const ip4_addr_t *dest) maybe this helps to help me what i m doing wrong

seppel123
Posts: 10
Joined: Fri Jan 14, 2022 2:08 pm

Re: ESP32 WiFi unexpected error and question about speed

Postby seppel123 » Thu Feb 10, 2022 1:31 pm

ok found my problem i overflowed a array by myself.

Who is online

Users browsing this forum: A001FF, ge.etude, Google [Bot], hamid.a203 and 42 guests