I'm having big trouble creating anything useful now. I'm working on updating and extending old code that used to work. The new parts are around UART communications. I cannot get it to start because the code immediately triggers an interrupt watchdog. I have no idea why and where. It happens silently and I only know by asking after the next reboot. There is nothing in the serial console, it simply starts over with the "ets" line.
How can I find out what the problem is? I think I checked all my tasks and timers. I'm not dealing with interrupts directly. All loops have a long delay in them (100 ms) but it needs to go away eventually.
I can locate the bug to starting a task. If I'm not starting it, the app stays there sitting and doing nothing. But also not rebooting all the time. If I start that task, it reboots after a fraction of a second. The task does nothing but write a log message anymore, everything else is commented out.
Maybe this part of the code helps:
Code: Select all
void main()
{
int helloDelay = 1000;
ESP_LOGI(TAG, "Sending Hello in %d ms", helloDelay);
timerHandle = xTimerCreate("hello", pdMS_TO_TICKS(helloDelay), pdFALSE, NULL, sendHello);
configASSERT(xTimerStart(timerHandle, 0));
while (true)
{
vTaskDelay(pdMS_TO_TICKS(100));
}
}
void sendHello(const TimerHandle_t unusedParameters)
{
ESP_LOGI(TAG, "sendHello");
vTaskDelay(pdMS_TO_TICKS(100));
}
I'm using VSCode with PlatformIO and its integrated serial monitor.