ESP32 Interrupt/millis() issues #1929
Labels
Category: Plugin
Related to supported sensors
Platform: ESP32
ESP32 classic and ESP32-xx based devices
Type: Bug
Considered a bug
Projects
I am using an Espeasy to read some flow meters, the esp8266 works perfectly fine for this, and doesn't have this bug. However I needed more I/O, and tried to use the ESP32 with the same devices. They are hall effect flow sensors with 800 pulses/Liter. Any time there is flow on the flow meter using ht Generic Pulse Counter plugin the ESP32 will crash, and reboot
with this message:
Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed)
I researched this and found that I can get them to count pulses and not crash by adding IRAM_ATTR to the pulse check ISR, and removing the call to the millis() function, however this also removes any debouncing.
Simply adding the IRAM_ATTR will still crash on the flow meter calling the interrupt, the millis() function removal was also necessary.
System configuration
Hardware:
Lolin D32
ESP Easy version: latest git esp32test_1M8_partition, built using platformio.
The text was updated successfully, but these errors were encountered: