sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.9k stars 658 forks source link

Regular crashes on ESP32 #394

Open DriekdeGadgetfreak opened 3 years ago

DriekdeGadgetfreak commented 3 years ago

According to the expressif documentation:

If the ISR is placed into IRAM, all constant data used by the ISR and functions called from ISR (including, but not limited to, const char arrays), must be placed into DRAM using DRAM_ATTR.

So:

static const RCSwitch::Protocol proto[] and const unsigned int RCSwitch::nSeparationLimit = 4300;

should be changed to:

static const DRAM_ATTR RCSwitch::Protocol proto[] and const DRAM_ATTR unsigned int RCSwitch::nSeparationLimit = 4300;

1technophile commented 3 years ago

For the protocol you have it already into the master below: https://github.com/sui77/rc-switch/commit/ebe91719936265540adcb9766f6ed6e09befe48f

DriekdeGadgetfreak commented 3 years ago

AH, id not see that! Thanx.