cdjq / DFRobot_Geiger

MIT License
1 stars 3 forks source link

Lib on ESP8266 #1

Open superfluent opened 2 years ago

superfluent commented 2 years ago

Lib does not work on ESP3266 with Arduino IDE

Message:

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3584, room 16 tail 0 chksum 0xb0 csum 0xb0 v2843a5ac ~ld ISR not in IRAM!

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

Abort called

stack>>>

ctx: cont sp: 3ffffed0 end: 3fffffc0 offset: 0000 3ffffed0: 00001f08 feefeffe feefeffe feefeffe
3ffffee0: 000000fe 00000000 00000000 00000000
3ffffef0: 00000000 00000000 00000000 00ff0000
3fffff00: 5ffffe00 5ffffe00 feefeffe 00000000
3fffff10: 00000002 00000003 3ffee6f8 40209d86
3fffff20: 40100402 0001c200 00000000 40209d98
3fffff30: 00000003 4020ada9 3ffee6f8 4020a2a5
3fffff40: 00000000 00000001 3ffee998 3ffeea20
3fffff50: 00000000 00000001 3ffee998 3ffeea20
3fffff60: 3fffdad0 00000000 3ffee6f8 4020a354
3fffff70: 0001c200 0000001c 00000000 40207e82
3fffff80: 3fffdad0 00000000 3ffee998 40201064
3fffff90: feefeffe feefeffe feefeffe feefeffe
3fffffa0: 3fffdad0 00000000 3ffee9e0 40209764
3fffffb0: feefeffe feefeffe 3ffe84fc 40100cfd
<<<stack<<<

AndyW71Home commented 11 months ago

I think this can be fixed with a one-line edit.

Change line 23 in DFRobot_Geiger.cpp from: void Geigeisr(){ to: void IRAM_ATTR Geigeisr(){ That should make it compatible with recent versions of the esp8266 board library. (See e.g. here for the same problem elsewhere.)

Alternatively, you can revert to esp8266 board library version 2.4.2 which does not throw the "ISR not in IRAM!" error. That may cause problems with other libraries though, as 2.4.2 is quite old now.