Possible bug in crosscore_int.c missing IRAM_ATTR in function esp_crosscore_isr_handle_yield

slivingston
Posts: 6
Joined: Fri Nov 03, 2017 12:54 am

Possible bug in crosscore_int.c missing IRAM_ATTR in function esp_crosscore_isr_handle_yield

Postby slivingston » Tue Jun 12, 2018 6:41 pm

I can reproduce an unexpected exception trying to use esp-idf ota ops. My code is calling esp_ota_begin() which in turn erases a partition of the flash. The other core at this time is handling an rf protocol with interrupts, which are marked with IRAM_ATTR to ensure that they run from ram.

However, the exception is occurring in esp-idf code, specifically esp_crosscore_isr_handle_yield in crosscore_int.c (see below). I find that if I add the IRAM_ATTR attribute to the function esp_crosscore_isr_handle_yield() which is called from esp_crosscore_isr(), I can no longer reproduce the crash. Is this a bug due to the missing attribute?

Code: Select all

Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed)
Register dump:
PC      : 0x400d1bd8  PS      : 0x00060034  A0      : 0x40082c48  A1      : 0x3ffc0bf0  
0x400d1bd8: esp_crosscore_isr_handle_yield at ..../firmware/esp-idf/components/esp32/./crosscore_int.c:48

0x40082c48: _xt_lowint1 at ..../firmware/esp-idf/components/freertos/./xtensa_vectors.S:1105

A2      : 0x3ffc5604  A3      : 0x3ffc10e0  A4      : 0x00000001  A5      : 0x4008bd58  
0x4008bd58: _frxt_int_enter at  ..../firmware/esp-idf/components/freertos/./portasm.S:119

A6      : 0x3ff42000  A7      : 0x700000bb  A8      : 0x80081f42  A9      : 0x3ffc0bd0  
A10     : 0x00000000  A11     : 0x00000000  A12     : 0x8008b5f1  A13     : 0x3ffe8e20  
A14     : 0x00000001  A15     : 0x00000000  SAR     : 0x00000017  EXCCAUSE: 0x00000007  
EXCVADDR: 0x00000000  LBEG    : 0x400012e5  LEND    : 0x40001309  LCOUNT  : 0x80121969  

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Possible bug in crosscore_int.c missing IRAM_ATTR in function esp_crosscore_isr_handle_yield

Postby ESP_Angus » Wed Jun 13, 2018 1:32 am

Hi silvingstone,

Looks like a bug. I noticed you also opened this as a Github Issue. I've replied to you there:
https://github.com/espressif/esp-idf/issues/2055

(Please don't report the same thing in two places at the same time, it's confusing! :).)

Angus

Who is online

Users browsing this forum: Baidu [Spider], MicroController and 217 guests