Author Topic: ISR not in IRAM!  (Read 840 times)

peterfosseus

  • NewMember
  • *
  • Posts: 1
ISR not in IRAM!
« 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

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6489
  • Country: us
    • LowPowerLab
Re: ISR not in IRAM!
« Reply #1 on: July 21, 2019, 06:48:30 PM »
Thanks, saw your comment in the Git issue thread, I will add this soon.
Regards!

Robert

  • Jr. Member
  • **
  • Posts: 56
  • Country: be
Re: ISR not in IRAM!
« Reply #2 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