Ethernet Stack Overflow

ardiehl
Posts: 7
Joined: Fri Oct 27, 2017 10:44 pm

Ethernet Stack Overflow

Postby ardiehl » Sat Feb 10, 2018 7:49 pm

the stack for emacT seems to be to small (2k). The ethernet sample works but in my software i always got stack overflow. I had to change the stacksize to 3k and it seems to work. I had that problem with git versions from december 2017 up to the latest one Feb 2018.

esp-idf/components/ethernet/emac_main.c, line 1105 from
xTaskCreate(emac_task, "emacT", 2048, NULL, EMAC_TASK_PRIORITY, &emac_task_hdl);
to
xTaskCreate(emac_task, "emacT", 3072, NULL, EMAC_TASK_PRIORITY, &emac_task_hdl);
fixed it. btw, i'm using the 8720 phy.

D (135819) emac: External clock input 50MHz on GPIO0
I (135819) emac: mac version 1137a
I (135819) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
D (135829) intr_alloc: Connected src 38 to int 18 (cpu 0)
I (135839) emac: emac start !!!
***ERROR*** A stack overflow in task emacT has been detected.
abort() was called at PC 0x4008dba4 on core 0
0x4008dba4: vApplicationStackOverflowHook at /home/ad/esp32/esp-idf/components/esp32/./panic.c:648

Backtrace: 0x4008d9e8:0x3ffe8a00 0x4008db8b:0x3ffe8a20 0x4008dba4:0x3ffe8a40 0x4008a9a4:0x3ffe8a60 0x4008c29c:0x3ffe8a80 0x4008c252:0x3ffe9278
0x4008d9e8: invoke_abort at /home/ad/esp32/esp-idf/components/esp32/./panic.c:648
0x4008db8b: abort at /home/ad/esp32/esp-idf/components/esp32/./panic.c:648
0x4008dba4: vApplicationStackOverflowHook at /home/ad/esp32/esp-idf/components/esp32/./panic.c:648
0x4008a9a4: vTaskSwitchContext at /home/ad/esp32/esp-idf/components/freertos/./tasks.c:4420
0x4008c29c: _frxt_dispatch at /home/ad/esp32/esp-idf/components/freertos/./portasm.S:406
0x4008c252: _frxt_int_exit at /home/ad/esp32/esp-idf/components/freertos/./portasm.S:206

aubanvmk
Posts: 1
Joined: Tue Jul 24, 2018 9:58 pm

Re: Ethernet Stack Overflow

Postby aubanvmk » Tue Jul 24, 2018 10:01 pm

Same Problem.

xTaskCreate(emac_task, "emacT", 2048, NULL, EMAC_TASK_PRIORITY, &emac_task_hdl);
Change task stack size to 2096 and it work fine.

With 2048 i have a error stack overflow for task.

Auban

Who is online

Users browsing this forum: No registered users and 255 guests