Page 1 of 1

Problem with a high resolution counter

Posted: Tue Sep 17, 2024 12:15 am
by Kniroxe
I am trying to create a counter to generate differents waves for VGA conecction. For this, Im using the gptimer, with the maximun resolution of 40MHz. The problem is that, when I try to use a low alarm count the ESP32 send a error the error "Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)." What happens here? I Just wanted a resolution below of 1 Microsecond for de counter.
imagen_2024-09-16_181247360.png
imagen_2024-09-16_181247360.png (11.57 KiB) Viewed 638 times
imagen_2024-09-16_181358678.png
imagen_2024-09-16_181358678.png (38.96 KiB) Viewed 638 times
imagen_2024-09-16_181309261.png
imagen_2024-09-16_181309261.png (8.34 KiB) Viewed 638 times

Re: Problem with a high resolution counter

Posted: Tue Sep 17, 2024 3:13 am
by ESP_Sprite
You can't. Interrupt overhead is pretty high on the ESP32 chips; if you're firing too many per second, the rest of the code doesn't get execution time and the watchdogs will reset your chip. Instead, the correct strategy is to try and use the peripherals (LCD interface, SPI, RMT, I2S, ...) to do the thing you need without requiring the CPU to bitbang your signals.