Closed
Description
In the example "Esp32RotaryEncoderBasics.ino" the lambda function for calling the ISR is not put into IRAM.
rotaryEncoder.setup([]{rotaryEncoder.readEncoder_ISR();});
Having the complete ISR call in IRAM is something I have painfully learned. My solution is to wrap the call in a plain function like
void IRAM_ATTR readEncoderWrapper_ISR(){ rotaryEncoder.readEncoder_ISR(); }
and set the library up with
rotaryEncoder.setup(readEncoderWrapper_ISR);
This discussion helped me to understand.
I hope this helps.
p.s. thanks for your ai-esp32-rotary-encoder library!
Metadata
Metadata
Assignees
Labels
No labels