ISR not in IRAM error
-
Hello,
I'm trying to setup an ESP8266 (bare ESP-12E) based gateway using the RFM69 radio module.
However when I start the gateway, I get the error messageISR not in IRAM
I'm using mysensors 2.3.1, with versio 2.5.2 of the ESP8266 board library.
I'm wiring it up to an RFM69W exactly as in the wiring diagram on the Connecting the Radio page, with the exception of NSS being connected to pin 5 not 15.
The power supply I'm using has more than enough headroom, its a bench supply and shows about 60mA pulled at startup.My gateway sketch & serial output is below.
Any ideas greatly appreciated!!
SDK:2.2.1(cfd48f3)/Core:2.5.2=20502000/lwIP:STABLE-2_1_2_RELEASE/glue:1.1-7-g82abda3/BearSSL:a143020 53 MCO:BGN:INIT GW,CP=RRNGE---,REL=255,VER=2.3.1 211 TSF:LRT:OK 226 TSM:INIT 240 TSF:WUR:MS=0 ISR not in IRAM! Abort called >>>stack>>> ctx: cont sp: 3ffffd00 end: 3fffffd0 offset: 01b0 3ffffeb0: 00000000 00000000 4bc6a7f0 00000000 3ffffec0: 00000000 00000080 40100246 00000031 3ffffed0: 00000000 00000105 3ffee590 4010054e 3ffffee0: 00000000 00000105 3ffee590 40202e6d 3ffffef0: 00020401 40040203 33060305 0008d907 3fffff00: 42190009 07264025 dc291028 2d2f882e 3fffff10: 90376430 8f3c4238 306f123d 400000ff 3fffff20: 00000064 00000246 00000246 40208120 3fffff30: 00000000 4bc6a7f0 000000f0 00000102 3fffff40: 3ffee578 3ffee41f 00000000 40202ef0 3fffff50: 00000000 00000000 4bc6a7f0 40202f13 3fffff60: 00000000 00000000 00000000 40201db5 3fffff70: 00000000 00a7fd40 00000000 4020363d 3fffff80: 3ffee578 3ffee41f 00000000 4020368b 3fffff90: 600002ff 00020000 3ffee578 3ffee3c8 3fffffa0: 3fffdad0 3ffee41f 3ffee806 40203c45 3fffffb0: feefeffe 00000000 3ffee3c0 40203cac 3fffffc0: feefeffe feefeffe 3ffe8524 4010010d <<<stack<<< Repeats here ad infinium...
/* * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2018 Sensnology AB * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik EKblad * Contribution by a-lurker and Anticimex, * Contribution by Norbert Truchsess <norbert.truchsess@t-online.de> * Contribution by Ivo Pullens (ESP8266 support) * * DESCRIPTION * The EthernetGateway sends data received from sensors to the WiFi link. * The gateway also accepts input on ethernet interface, which is then sent out to the radio network. * * VERA CONFIGURATION: * Enter "ip-number:port" in the ip-field of the Arduino GW device. This will temporarily override any serial configuration for the Vera plugin. * E.g. If you want to use the default values in this sketch enter: 192.168.178.66:5003 * * LED purposes: * - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs in your sketch, only the LEDs that is defined is used. * - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly * - ERR (red) - fast blink on error during transmission error or receive crc error * * See https://www.mysensors.org/build/connect_radio for wiring instructions. * * If you are using a "barebone" ESP8266, see * https://www.mysensors.org/build/esp8266_gateway#wiring-for-barebone-esp8266 * * Inclusion mode button: * - Connect GPIO5 (=D1) via switch to GND ('inclusion switch') * * Hardware SHA204 signing is currently not supported! * * Make sure to fill in your ssid and WiFi password below for ssid & pass. */ // Enable debug prints to serial monitor #define MY_DEBUG // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h #define MY_BAUD_RATE 9600 // For RFM69 #define MY_RADIO_RFM69 //#define MY_RFM69_FREQUENCY RFM69_868MHZ // Set your frequency here #define MY_RFM69_IRQ_PIN 4 #define MY_RFM69_IRQ_NUM MY_RFM69_IRQ_PIN #define MY_RFM69_CS_PIN 5 // NSS. Use MY_RFM69_SPI_CS for older versions (before 2.2.0) #define MY_GATEWAY_ESP8266 #define MY_WIFI_SSID "<snip>" #define MY_WIFI_PASSWORD "<snip>" // The port to keep open on node server mode #define MY_PORT 5003 // How many clients should be able to connect to this gateway (default 1) #define MY_GATEWAY_MAX_CLIENTS 2 #include <ESP8266WiFi.h> #include <MySensors.h> void setup() { // Setup locally attached sensors } void presentation() { // Present locally attached sensors here } void loop() { // Send locally attached sensors data here }
Edit:
Below is a screenshot of my current upload options
-
@adamant According to this post: https://community.blynk.cc/t/error-isr-not-in-iram/37426/15
could you try the following:- For the old RFM69 driver (you seem to be using this one):
Change the following line https://github.com/mysensors/MySensors/blob/development/hal/transport/RFM69/driver/old/RFM69_old.cpp#L464
from
void RFM69::isr0()
to
ICACHE_RAM_ATTR void RFM69::isr0()
- For the new RFM69 driver (for reference):
Change the following line https://github.com/mysensors/MySensors/blob/development/hal/transport/RFM69/driver/new/RFM69_new.cpp#L245
from
LOCAL void RFM69_interruptHandler(void)
to
ICACHE_RAM_ATTR void RFM69_interruptHandler(void)
- For the old RFM69 driver (you seem to be using this one):
-
@yveaux Hello, thanks so much for your help on this!
Changing those functions has helped me get past the error, however I now have a different issue.
Using the the same sketch and setup, on the old driver the gateway crashes with a Soft WDT reset shortly after it initializes the radio:50 MCO:BGN:INIT GW,CP=RRNGE---,REL=255,VER=2.3.1 101 TSF:LRT:OK 117 TSM:INIT 131 TSF:WUR:MS=0 156 TSM:INIT:TSP OK 177 TSM:INIT:GW MODE 199 TSM:READY:ID=0,PAR=0,DIS=0 231 MCO:REG:NOT NEEDED scandone 259 TSM:READY:NWD REQ Soft WDT reset >>>stack>>> ctx: cont sp: 3ffffc40 end: 3fffffd0 offset: 01b0 3ffffdf0: 000003e7 3ffee488 00000a91 402017ee 3ffffe00: 3ffee319 00000001 00000040 40201664 3ffffe10: 3ffee319 000000ff 3ffee488 000003e7 3ffffe20: 3ffee319 000000ff 3ffee488 40201bd5 3ffffe30: 00000a8a 00000007 00000001 00418937 3ffffe40: 00000000 3ffee71c 4023d1ac 000009c2 3ffffe50: 000000ff 3ffee488 00000002 40201428 3ffffe60: 3ffee319 00000007 00000005 000000c8 3ffffe70: 3a4d5354 44414552 574e3a59 000000ff 3ffffe80: 3fffdad0 3ffee46c 3ffee319 40201ced 3ffffe90: 6d616461 37393931 00000100 402022d7 3ffffea0: 00000001 3ffef9fc 00000000 40207afc 3ffffeb0: 000003fd 4023202b 00000000 40100584 3ffffec0: 00000001 3ffee317 00000001 40202754 3ffffed0: e260f400 00f2597d 3fffff00 3ffffef0 3ffffee0: 00000000 4bc6a7f0 3fffff10 3fffff00 3ffffef0: 00000004 00000000 4bc6a7f0 00000000 3fffff00: 6d616461 00418937 00000000 3ffee2c0 3fffff10: 3fffdad0 3ffee319 000000ff 40202420 3fffff20: 3fffdad0 00000103 3ffee35c 402028d4 3fffff30: 00000000 00000000 000001f4 40201dc5 3fffff40: 3fffdad0 00000103 000001f4 4020364d 3fffff50: 00000000 00000103 000001f4 402039df 3fffff60: 3fffdad0 00000103 000001f4 40203a03 3fffff70: 3fffdad0 3ffee317 3ffee6cc 40203a62 3fffff80: 3ffee470 3ffee317 00000000 402036a4 3fffff90: 600002ff 00020000 3ffee470 3ffee2c0 3fffffa0: 3fffdad0 3ffee317 3ffee6fe 40203b50 3fffffb0: feefeffe 00000000 3ffee2b8 40203bb4 3fffffc0: feefeffe feefeffe 3ffe851c 40100129 <<<stack<<<
However, using the new driver, I get past that point and the gateway initializes fine. But unfortunately, the sensor node never connects. It just constantly sits waiting to find a parent node:
16 MCO:BGN:INIT NODE,CP=RPNNA---,REL=255,VER=2.3.1 26 TSM:INIT 27 TSF:WUR:MS=0 29 TSM:INIT:TSP OK 31 TSM:FPAR 36 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2045 !TSM:FPAR:NO REPLY 2048 TSM:FPAR 2054 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 4061 !TSM:FPAR:NO REPLY 4063 TSM:FPAR 4069 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 6076 !TSM:FPAR:NO REPLY 6078 TSM:FPAR 6083 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 8091 !TSM:FPAR:FAIL 8092 TSM:FAIL:CNT=1 8094 TSM:FAIL:DIS 8096 TSF:TDI:TSL
I'm pretty confident my antenna setups are correct - single core wire, each one a straight piece 82mm long.
-
@adamant are you using the new driver on the node? Gateway and nodes must use the same driver.
What does the gateway log say?
-
@mfalkvidd Yeah, I reflashed the node & gateway each time to match.
The gateway has the same sketch as in post 1, just with#define MY_RFM69_NEW_DRIVER
added, and the sensor node is the simple repeater sketch:/* * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2018 Sensnology AB * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * Example sketch showing how to create a node that repeats messages * from nodes far from gateway back to gateway. * It is important that nodes that has enabled repeater mode calls * process() frequently. Repeaters should never sleep. */ // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_RFM69 #define MY_RFM69_NEW_DRIVER // Enabled repeater feature for this node #define MY_REPEATER_FEATURE #include <MySensors.h> void setup() { } void presentation() { //Send the sensor node sketch version information to the gateway sendSketchInfo("Repeater Node", "1.0"); } void loop() { }
-
Hi,
i have the same problem. Using the 2.4.2 of the ESP8266 board library works fine. All later versions not.
Ther is an other Problme with the ESP Gateway. The Wifi reconnect after a soft reboot or pushing the reset switch is not working.
The gateway is trying to reconnect until it gets power on / off .a Modification of the MyGatewayTransportEthernet.cpp helps. Wifi will be always disconnected with the boot process.
#if defined(MY_GATEWAY_ESP8266) || defined(MY_GATEWAY_ESP32)
#if defined(MY_WIFI_SSID)
// Turn off access point
WiFi.mode(WIFI_STA);
#if defined(MY_HOSTNAME)
#if defined(MY_GATEWAY_ESP8266)
WiFi.hostname(MY_HOSTNAME);
#elif defined(MY_GATEWAY_ESP32)
WiFi.setHostname(MY_HOSTNAME);
#endif
#endif
#ifdef MY_IP_ADDRESS
WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
#endif
GATEWAY_DEBUG(PSTR("GWT:TIN:Disconnect Wifi..\n")); //----------- added
WiFi.persistent(false); // --------------------------------------------------------------------added
WiFi.disconnect(); //-------------------------------------------------------------------------- added
GATEWAY_DEBUG(PSTR("GWT:TIN:Delay 500 ms...\n"));
delay(500);
(void)WiFi.begin(MY_WIFI_SSID, MY_WIFI_PASSWORD, 0, MY_WIFI_BSSID);
while (WiFi.status() != WL_CONNECTED) {
wait(500);
GATEWAY_DEBUG(PSTR("GWT:TIN:CONNECTING_wait_500ms...\n"));
}
GATEWAY_DEBUG(PSTR("GWT:TIN:IP: %s\n"), WiFi.localIP().toString().c_str());
#endifHave a nice day
Stefan
-
@stefan_ne I entered two issues for the issues described above: https://github.com/mysensors/MySensors/issues/1335 and https://github.com/mysensors/MySensors/issues/1334
Please enter another issue for your case, or issue a pull request.
-
Hello,
Just jumping in here to say that a combination of using the new driver, and downgrading to ESP8266 ver 2.5.0 has fixed this for me. The other issue I was having was total user error, a bad solder joint was giving me strange results.Thanks for your help!!
-
@adamant thanks for reporting back!
Does this mean that https://github.com/mysensors/MySensors/issues/1335 can be closed?
-
Hi,
I don't think so, in time we have just some workarounds
Have a nice day
Stefan
-
@stefan_ne I would like @AdamAnt to confirm if https://github.com/mysensors/MySensors/issues/1335 is still relevant or not.
The op of this thread had 2 issues. I entered them in GitHub, then he hinted the second issue (#1335) was solved by fixing a bad solder joint.
So, unless somebody confirms #1335 is still relevant, I will close it.
#1334 is of course still to be solved.
-
I had the same error and realized it was caused in combination with an interrupt routine . Having read the answers above I tried only to introduce
this directive
ICACHE_RAM_ATTR void Interrupt_routine()
{ ...code...
}... and it was all fine