RH_ASK: Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed) ESP32 VSC Platformio
petervflocke opened this issue · 2 comments
RH_ASK together with WiFi in some cases leads to Guru Meditation Error (Cache disabled but cached memory region accessed)
Solution: add ESP32 handling
#define INTERRUPT_ATTR IRAM_ATTR
for RH_PLATFORM == RH_PLATFORM_ESP32
by changing in RH_ASK.cpp file
FROM:
#if (RH_PLATFORM == RH_PLATFORM_ESP8266)
// interrupt handler and related code must be in RAM on ESP8266,
// according to issue #46.
#define INTERRUPT_ATTR ICACHE_RAM_ATTR
#else
#define INTERRUPT_ATTR
#endif
TO:
#if (RH_PLATFORM == RH_PLATFORM_ESP8266)
// interrupt handler and related code must be in RAM on ESP8266,
// according to issue #46.
#define INTERRUPT_ATTR ICACHE_RAM_ATTR
#elif (RH_PLATFORM == RH_PLATFORM_ESP32)
#define INTERRUPT_ATTR IRAM_ATTR
#else
#define INTERRUPT_ATTR
#endif
If this is a correct way to solve it, please include in your next version.
(For me it solved it, I can observer a stable run for some longer time)
By the way I do expect same problem (and solution) for the module CC110, which I want o use in the next (hardware) release in my project.
A more detailed description is here: espressif/arduino-esp32#3634
Best
Peter
Update:
I needed to add DRAM_ATTR
to the table symbols[]
definition. This and the latter change are done in RH_ASK.cpp.
// :PP: added DRAM_ATTR
#if (RH_PLATFORM == RH_PLATFORM_ESP8266)
#define D_A DRAM_ATTR
#elif (RH_PLATFORM == RH_PLATFORM_ESP32)
#define D_A DRAM_ATTR
#else
#define D_A
#endif
D_A static uint8_t symbols[] =
{
0xd, 0xe, 0x13, 0x15, 0x16, 0x19, 0x1a, 0x1c,
0x23, 0x25, 0x26, 0x29, 0x2a, 0x2c, 0x32, 0x34
};
Kindly ask you to verify and confirm that this is fine from your point of view. After both changes I haven't observed any further guru mediation.
The DRAM_ATTR part was what really helped me. The IRAM part was already inside the lib, but I still got the Cache panics regularily and I only looked inside the code part.