LowPowerLab Forum

Hardware support => ESP32 / ESP8266 => Topic started by: peterfosseus on July 21, 2019, 12:35:36 AM

Title: ISR not in IRAM!
Post by: peterfosseus on July 21, 2019, 12:35:36 AM
Hi,

On my ESP8266 WEMOS D1 Mini, using ESP Board Library from http://arduino.esp8266.com/stable/package_esp8266com_index.json, version 2.5.2.
I was getting ISR not in IRAM!, according to a discussion at https://community.blynk.cc/t/error-isr-not-in-iram/37426, according to Amorphous
"... need to add ICACHE_RAM_ATTR in front of your ISR function to solve this issue." [https://community.blynk.cc/u/Amorphous]
I edited RFM69.cpp and changed line 374 from:
void RFM69::isr0() { _haveData = true; }
to
ICACHE_RAM_ATTR void RFM69::isr0() { _haveData = true; }

It seems to compile and run now.
Hope this helps someone.

-pete
Title: Re: ISR not in IRAM!
Post by: Felix on July 21, 2019, 06:48:30 PM
Thanks, saw your comment in the Git issue thread, I will add this soon.
Regards!
Title: Re: ISR not in IRAM!
Post by: Robert on September 30, 2019, 06:16:38 AM
I confirm this is working.

In order to keep the library compatible with Moteino (AVR) and ESP8266 I did the following modification to the ISR handling function (according the the RFM69 Library version):

#if defined (ESP8266)
ICACHE_RAM_ATTR void RFM69::isr0() { <what ever is specified in the current version> }
#else
void RFM69::isr0() { <what ever is specified in the current version> } 
#endif

Robert