ESP_Angus wrote:ESP_Angus wrote:
I'm able to reproduce this. Will let you know once a fix is available.
The problem I was seeing was a stack overflow in the timer task. Can't use printf() in the timer task!
The stack overflow checking methods that work in other tasks don't appear to trigger in the timer task (I saw an interrupt wdt timeout instead). We'll add a kconfig option to set the timer task stack size, or setting "Enable 'nano' formatting options for printf/scanf family" Component Config -> ESP32-specific in menuconfig will work around that.
However, this doesn't sound like the issue you were seeing - as you mentioned it triggering with an empty timer callback. Do you have some code that exhibits that bug?
Hi ESP_Angus,
you were absolutely right, it was a matter of the printf, but honestly I'm still facing strange behaviors related to timer task.
I simply created a queue with xQueueCreate, and then added a specific task blocking on xQueueReceive.
If I send message from any other task, with xQueueSend, everything works fine and first task correctly receive the message.
If I send message from timer task, message is successfully delivered to the task waiting for the queue message, but after message is processed, I get a Panic with a watchdog timeout.
It sounds like something very strange, because there's nothing blocking. Task simply receives message and prints a log (with adeguate amount of stack right now).
Code: Select all
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
Register dump:
PC : 0x400de804 PS : 0x00060b34 A0 : 0x800843b2 A1 : 0x3ffcf3d0
A2 : 0x3ffcef98 A3 : 0x00060b23 A4 : 0x00060b20 A5 : 0x3ffd0480
A6 : 0x00000003 A7 : 0x00060d23 A8 : 0x00000009 A9 : 0x00000009
A10 : 0x00060b23 A11 : 0x00000000 A12 : 0x00060f23 A13 : 0x3ffd0460
A14 : 0x00000003 A15 : 0x00060d23 SAR : 0x00000011 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffd
Backtrace: 0x400de804:0x3ffcf3d0 0x400843b2:0x3ffcf3f0 0x4008375c:0x3ffcf410 0x40085020:0x3ffcf450 0x400de98c:0x3ffcf480 0x40085145:0x3ffcf4a0 0x40085178:0x3ffcf4c0 0x4008527f:0x3ffcf4f0
Why do you think I get a wdt timeout on CPU0 only if I send message from timer task?