PaulStoffregen / Encoder

Quadrature Encoder Library for Arduino
http://www.pjrc.com/teensy/td_libs_Encoder.html
540 stars 239 forks source link

Fixed ESP8266 resets #49

Closed lrademacher closed 3 years ago

lrademacher commented 4 years ago

Added ISR attribute ICACHE_RAM_ATTR in case ESP8266 is defined.

Tested with NodeMCU v0.9 and Arduino Uno (If nothing was broken due to the change)

MrHaroldA commented 4 years ago

Yep, this fixed the crashes on my Wemos D1 Mini Pro, and my Arduino Nano and Mini Pro were unaffected. Thanks, @RLars !

Bidulglloq commented 4 years ago

Perpetual reboot is still there for ESPs... (memos D1 mini pro) The latest version is still 1.4.1 Anyone (besides Paul) can commit these changes?

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

load 0x4010f000, len 1392, room 16 
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
ely-az commented 4 years ago

This fixed my constant reset issues! Thanks RLars. I wish he would commit this fix.

khvalera commented 3 years ago

I get error: ets Jan 8 2013, rst cause: 4, boot mode: (3,6)

wdt reset load 0x4010f000, len 3584, room 16 tail 0 chksum 0xb0 csum 0xb0 v2843a5ac ~ ld on nodemcu esp8266

JAndrassy commented 3 years ago

it would be better to rename the macro to something less generic to avoid potential conflict. I would use ENCODER_ISR_ATTR

lrademacher commented 3 years ago

it would be better to rename the macro to something less generic to avoid potential conflict. I would use ENCODER_ISR_ATTR

Proposal adopted

JAndrassy commented 3 years ago

@PaulStoffregen this is third or fourth PR in this repo to solve the required linker attribute for ESP8266 and ESP32 interrupt handlers. this PR is the cleanest and changes only the necessary minimum. could you please merge it?