Closed
Description
Board
ESP32 Dev Module
Device Description
ESP WROOM32
Hardware Configuration
no
Version
v3.2.0
IDE Name
Visual Micro
Operating System
Windows 11
Flash frequency
80 Mhz
PSRAM enabled
no
Upload speed
115200
Description
Timer interrupts do not call the ISR.
Sketch
void IRAM_ATTR onTimer()
{
InterruptCounter++;
}
void setup()
{
setup_serial_port();
#ifdef ESP_VERSION_2_0_14 // For ESP32, timer interrupts only work with ESP Version 2.0.14
// Full API: timer 0, prescaler 80 (1 µs tick), count up
timer = timerBegin(0, 80, true);
timerAttachInterrupt(timer, &onTimer, true);
// Trigger every 500,000 µs = 500 ms
timerAlarmWrite(timer, 500000, true);
timerAlarmEnable(timer);
#else
timer = timerBegin(10);
timerAttachInterrupt(timer, &onTimer);
timerStart(timer);
#endif
}
Debug Message
no error message
Other Steps to Reproduce
with ESP VERSION 2.0.14 it works (see the scetch above)
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Metadata
Metadata
Assignees
Labels
No labels