RFControl icon indicating copy to clipboard operation
RFControl copied to clipboard

Fixed interrupt handling on ESP8266

Open matthias-bs opened this issue 3 years ago • 0 comments

With ESP8266 Board support package V3.0.0 an exception is issued whenever an interrupt occurs:

[...]
connected...yeey :)
HTTP server started
local ip:
192.168.156.166
*WM: freeing allocated params!
pm open,type:2 0
handleReceive()
ISR not in IRAM!

User exception (panic/abort/assert)
--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Abort called

>>>stack>>>
[...]

This is not specific to RFControl. I found a hint to fix the issue as follows: Change

void handleInterrupt() {

to

void ICACHE_RAM_ATTR handleInterrupt() {

and added some C pre-processing to leave the code untouched for non ESP8266 targets.

matthias-bs avatar Jun 20 '21 21:06 matthias-bs