Problem with a high resolution counter

Kniroxe
Posts: 4
Joined: Mon Sep 16, 2024 11:53 pm

Problem with a high resolution counter

Postby Kniroxe » Tue Sep 17, 2024 12:15 am

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 600 times
imagen_2024-09-16_181358678.png
imagen_2024-09-16_181358678.png (38.96 KiB) Viewed 600 times
imagen_2024-09-16_181309261.png
imagen_2024-09-16_181309261.png (8.34 KiB) Viewed 600 times

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: Problem with a high resolution counter

Postby ESP_Sprite » Tue Sep 17, 2024 3:13 am

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.

Who is online

Users browsing this forum: No registered users and 77 guests