Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RH_ASK: Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed) ESP32 VSC Platformio #39

Open
petervflocke opened this issue Jan 12, 2020 · 2 comments

Comments

@petervflocke
Copy link

petervflocke commented Jan 12, 2020

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

@petervflocke
Copy link
Author

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.

@rkopka42
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants