0

I'm trying to use a flow meter with Wemos Mini. Most tutorials are using Arduino boards ( which code and HW work OK ), but since I want this device to send alerts over the internet when abnormal usage/leakage is detected, I want to use Wemos Mini using How to Use Water Flow Sensor - Arduino Tutorial. On top of if will add my code for notifications using Telegram.

BUT - after uploading the original code (before adding Telegram changes ), an error occurs during code run : ISR not in IRAM!

I tried to change Pin - but still getting this error,

asked Aug 30, 2019 at 5:29
2
  • Hve you seen this issue on github? They state, that you can avoid this error by prepending ICACHE_RAM_ATTR to ISR functions. Maybe you can try this. Commented Aug 30, 2019 at 7:14
  • this is an error in the original code and new versions of core check if the ISR handler is in IRAM, because without ICACHE_RAM_ATTR the handler sometimes worked and sometimes not Commented Aug 30, 2019 at 7:19

2 Answers 2

1

This happens because of conflicts between Serial and external interrupts Put ICACHE_RAM_ATTR before your interrupt function, like this ICACHE_RAM_ATTR void ISR()

answered May 18, 2021 at 11:45
-1

For WEMOS or NODEMCU you must predefine interupt routine for example

void ICACHE_RAM_ATTR ServiceLimitSwitchUpperShield_12_D6();

//it is solve problem for ATTACHINTERRUPT - you must predefine this method before use setup (very important ) Then this message error ISR not IRAM will be not displayed .

In a setup you can for example define attachInterrupt(digitalPinToInterrupt(12), ServiceLimitSwitchUpperShield_12_D6 , FALLING );

Look for page https://community.blynk.cc/t/error-isr-not-in-iram/37426/23

answered May 24, 2023 at 16:39
1
  • this is not true Commented May 24, 2023 at 17:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.