Core 0 panic'ed (IllegalInstruction) due to xTaskCreatePinnedToCore

Mykyta_Mar
Posts: 3
Joined: Fri Dec 08, 2023 9:28 am

Core 0 panic'ed (IllegalInstruction) due to xTaskCreatePinnedToCore

Postby Mykyta_Mar » Thu Jan 18, 2024 10:56 am

Hi, I trying to start a task on core 0, but it leads to core panic.
//my task:

TaskHandle_t gh_xTask_1 = NULL;
static volatile uint64_t idle1Calls = 0;

static void idle_task_1()
{
idle1Calls++;
}

//task initialization:
xTaskCreatePinnedToCore(idle_task_0, "perfC0", 2048, NULL, 1, &gh_xTask_1, 0);

Error:
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x4200b9d8: 990020c0 00f01d1c 71008136
0x4200b9d8: idle_task_0 at C:/Users/Mykyta/Projekt/1/components/HardwareLayer/esp32-perfmon/perfmon.c:29

Core 0 register dump:
PC : 0x4200b9dd PS : 0x00050030 A0 : 0x00000000 A1 : 0x3fcc5500
0x4200b9dd: idle_task_0 at C:/Users/Mykyta/Projekt/1/components/HardwareLayer/esp32-perfmon/perfmon.c:30

A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x3fc9d660 A13 : 0x00000001
A14 : 0x00000000 A15 : 0x3fc9d1c4 SAR : 0x00000000 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000


Backtrace: 0x4200b9da:0x3fcc5500
0x4200b9da: idle_task_0 at C:/Users/Mykyta/Projekt/1/components/HardwareLayer/esp32-perfmon/perfmon.c:29





ELF file SHA256: 7b3be57266324e0e

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x40375b47
0x40375b47: esp_restart_noos_dig at C:/Users/Mykyta/esp_n/esp-idf/components/esp_system/port/esp_system_chip.c:57 (discriminator 1)

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: Core 0 panic'ed (IllegalInstruction) due to xTaskCreatePinnedToCore

Postby ESP_Dazz » Thu Jan 18, 2024 2:13 pm

Task functions must never return. Add a `vTaskDelete(NULL);` at the end of your task function.

See https://www.freertos.org/a00125.html for more details.

Who is online

Users browsing this forum: tomy983 and 212 guests