When I press button getting following error from the code
After that board is rebooting
idf-version 4.2
module - esp32-wrover-I
I have used IO expander to operate button
following is the error code kindly help
D app_button.c: 123: BUTT: INT 55
Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
Core 1 register dump:
PC : 0x400929a6 PS : 0x00060f34 A0 : 0x800913bd A1 : 0x3ffda760
A2 : 0x3ffbd510 A3 : 0x3ffda97c A4 : 0x00000ca3 A5 : 0x3f400bcd
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x3ffda97c A9 : 0x0000000f
A10 : 0x3ffda97c A11 : 0x0000000f A12 : 0x00060f23 A13 : 0x00060f23
A14 : 0x00000001 A15 : 0x3ffb6434 SAR : 0x00000004 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Backtrace:0x400929a3:0x3ffda760 0x400913ba:0x3ffda780 0x40092ff0:0x3ffda7a0 0x40177c43:0x3ffda7e0 0x400f1f17:0x3ffda820 0x400f0071:0x3ffda840 0x400d6add:0x3ffda870 0x400efeb5:0x3ffda890 0x400eff3e:0x3ffda8b0
Core 0 register dump:
PC : 0x400903fa PS : 0x00060034 A0 : 0x80092e24 A1 : 0x3ffbe310
A2 : 0x3ffbd538 A3 : 0x3ffbe360 A4 : 0x0000048a A5 : 0x3f44ab39
A6 : 0x00000800 A7 : 0x00060c23 A8 : 0x0000abab A9 : 0x0000cdcd
A10 : 0x0000abab A11 : 0xb33fffff A12 : 0x00060023 A13 : 0x00060023
A14 : 0x3ffdd0fc A15 : 0x00000000 SAR : 0x00000000 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace:0x400903f7:0x3ffbe310 0x40092e21:0x3ffbe330 0x4008afb7:0x3ffbe360 0x40082611:0x3ffbe390 0x401e818f:0x3ffbbd30 0x400d601d:0x3ffbbd50 0x40090a98:0x3ffbbd70
ELF file SHA256: d222e6faffb6c707
Rebooting...
getting Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
-
- Posts: 44
- Joined: Fri May 13, 2022 12:36 pm
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: getting Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
Not much we can do with that. Can you decode those backtraces? Can you post your code?
-
- Posts: 44
- Joined: Fri May 13, 2022 12:36 pm
Re: getting Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
From back traces what can we analyse I mean these addresses shows what
From where our code crashes or something else ?
Yes part of the source code where my code crashes I can post here ,
static void vButtonPressEventHandler(uint32_t u32GPIONumber)
{
DEBUG_LOGD(UART, TAG, "BUTT: INT %d ",u32GPIONumber);
portENTER_CRITICAL_ISR(&mux);
u32NumberOfButtonInterrupts++;
bLastState = gw_gpio_level_get(u32GPIONumber);
u32InterruptNum = u32GPIONumber;
u32DebounceTimeout = xTaskGetTickCount();
portEXIT_CRITICAL_ISR(&mux);
DEBUG_LOGI(UART, TAG,"after isr");
if (NULL == ButtonPressScanTaskhandle)
{
xEventGroupClearBitsFromISR(xAppEventGroup,
(EVENT_BIT_SOFT_RESET_EVENT | EVENT_BIT_WIFI_CONFIG_EVENT | EVENT_BIT_FACTORY_RESET_EVENT | EVENT_BIT_NONE_EVENT));
if (nlg_task_create(vButtonPressScanTask, (const char *) "vButtonPressScanTask",
SWITCH_PRESS_EVENT_TASK_STACK_SIZE, NULL, SWITCH_PRESS_EVENT_TASK_PRIORITY, &ButtonPressScanTaskhandle)
!= nlg_pass)
{
DEBUG_LOGE(UART, TAG, "Button Scan Events Task creation failed");
}
}
}
int gw_gpio_level_get(uint8_t gpio)
{
#if CONFIG_CPU_NUVOTON
return gpio_get_level_nuc(gpio);
#elif CONFIG_CPU_ESP32
//#ifdef CONFIG_I2C_SERVICE
#if (defined(CONFIG_NLG1100) || defined(CONFIG_NLG1200) \
|| defined(CONFIG_NLG1300) || defined(CONFIG_NLG1213))
if(gpio > MAX_ON_CHIP_GPIO)
{
uint8_t value= 0;
if(gpio < P1_I2C_PORT_GPIO_START)
{
if(i2c_read(I2C_MASTER_NUM,P0_I2C_GET_LEVEL_CMD,&value)== nlg_fail)
return nlg_fail;
value = value & ((0x01) << (gpio - P0_I2C_PORT_GPIO_START));
if(value)
return HIGH;
else
return LOW;
}
else
{
uint8_t value= 0;
if(i2c_read(I2C_MASTER_NUM,P1_I2C_GET_LEVEL_CMD,&value)== nlg_fail)
return nlg_fail;
value = value & ((0x01) << (gpio - P1_I2C_PORT_GPIO_START));
if(value)
return HIGH;
else
return LOW;
}
}}
if (gpio_config_gw(GW_GPIO_NO_55, GW_GPIO_IP, GW_GPIO_INT_ANY_EDGE, GW_GPIO_PU) != true) {
DEBUG_LOGE(UART, TAG, "GPIO configuration for Button is failed");
return GPIO_INIT_ERR;
}
set_gpio_functionality(GW_GPIO_NO_55, MFP6);
From where our code crashes or something else ?
Yes part of the source code where my code crashes I can post here ,
static void vButtonPressEventHandler(uint32_t u32GPIONumber)
{
DEBUG_LOGD(UART, TAG, "BUTT: INT %d ",u32GPIONumber);
portENTER_CRITICAL_ISR(&mux);
u32NumberOfButtonInterrupts++;
bLastState = gw_gpio_level_get(u32GPIONumber);
u32InterruptNum = u32GPIONumber;
u32DebounceTimeout = xTaskGetTickCount();
portEXIT_CRITICAL_ISR(&mux);
DEBUG_LOGI(UART, TAG,"after isr");
if (NULL == ButtonPressScanTaskhandle)
{
xEventGroupClearBitsFromISR(xAppEventGroup,
(EVENT_BIT_SOFT_RESET_EVENT | EVENT_BIT_WIFI_CONFIG_EVENT | EVENT_BIT_FACTORY_RESET_EVENT | EVENT_BIT_NONE_EVENT));
if (nlg_task_create(vButtonPressScanTask, (const char *) "vButtonPressScanTask",
SWITCH_PRESS_EVENT_TASK_STACK_SIZE, NULL, SWITCH_PRESS_EVENT_TASK_PRIORITY, &ButtonPressScanTaskhandle)
!= nlg_pass)
{
DEBUG_LOGE(UART, TAG, "Button Scan Events Task creation failed");
}
}
}
int gw_gpio_level_get(uint8_t gpio)
{
#if CONFIG_CPU_NUVOTON
return gpio_get_level_nuc(gpio);
#elif CONFIG_CPU_ESP32
//#ifdef CONFIG_I2C_SERVICE
#if (defined(CONFIG_NLG1100) || defined(CONFIG_NLG1200) \
|| defined(CONFIG_NLG1300) || defined(CONFIG_NLG1213))
if(gpio > MAX_ON_CHIP_GPIO)
{
uint8_t value= 0;
if(gpio < P1_I2C_PORT_GPIO_START)
{
if(i2c_read(I2C_MASTER_NUM,P0_I2C_GET_LEVEL_CMD,&value)== nlg_fail)
return nlg_fail;
value = value & ((0x01) << (gpio - P0_I2C_PORT_GPIO_START));
if(value)
return HIGH;
else
return LOW;
}
else
{
uint8_t value= 0;
if(i2c_read(I2C_MASTER_NUM,P1_I2C_GET_LEVEL_CMD,&value)== nlg_fail)
return nlg_fail;
value = value & ((0x01) << (gpio - P1_I2C_PORT_GPIO_START));
if(value)
return HIGH;
else
return LOW;
}
}}
if (gpio_config_gw(GW_GPIO_NO_55, GW_GPIO_IP, GW_GPIO_INT_ANY_EDGE, GW_GPIO_PU) != true) {
DEBUG_LOGE(UART, TAG, "GPIO configuration for Button is failed");
return GPIO_INIT_ERR;
}
set_gpio_functionality(GW_GPIO_NO_55, MFP6);
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: getting Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
vButtonPressEventHandler is an interrupt handler I assume? Then, don't try to create a task from an interrupt handler. Create it upfront instead.
-
- Posts: 44
- Joined: Fri May 13, 2022 12:36 pm
Re: getting Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
Thank you for the suggestion , I tried but same situation is there, board still reboots on pushing the button
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: getting Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
Suggest you decode that backtrace then. If you use esp-idf and the built-in serial monitor ('idf.py monitor') it should do that automatically for you.
Who is online
Users browsing this forum: burtrum and 95 guests