我正在尝试习惯使用 PICO 中的两个内核,但收到此错误消息。
Guru Medita
tion Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400ebf1c: 00000090 1d004136 000000f0
Core 1 register dump:
PC : 0x400ebf23 PS : 0x00050030 A0 : 0x00000000 A1 : 0x3ffb9470
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000014 A13 : 0x00000004
A14 : 0x3ffb950c A15 : 0x80000001 SAR : 0x00000000 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace:0x400ebf20:0x3ffb9470
ELF file SHA256: 0000000000000000
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:12812
load:0x40080400,len:3032
entry 0x400805e4
这是我正在使用的代码。闪烁的 LED 只是我知道草图加载到 PICO 的方式。
#define LED_PIN (G25)
// create tasks for specific cores
TaskHandle_t Task1;
void setup()
{
Serial.begin(115200);
while (!Serial);
delay(1000);
Serial.println("================");
Serial.println("CODE_TESTING");
Serial.println("================");
Serial.println("ESP32_PICO");
Serial.println("================");
Serial.println("TIMERS_AND_CORES");
Serial.println("================");
delay(1000);
pinMode(LED_PIN, OUTPUT);
//create a task that will be executed in the Task1code() function, with priority 1 and executed on core 0
xTaskCreatePinnedToCore(
startInputTimer, /* Task function. */
"Task1", /* name of task. */
1000, /* Stack size of task */
NULL, /* parameter of the task */
2, /* priority of the task */
&Task1, /* Task handle to keep track of created task */
1); /* pin task to core 0 */
delay(500);
}
void startInputTimer(void * pvParameters)
{
}
void loop()
{
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN, LOW);
delay(1000);
}
任何人都可以解释我做错了什么以获得此错误消息吗?我的代码基于我在网上找到的几个例子。PICO 大约每秒重置一次。我正在运行更多代码来查找错误,但将其缩减为我在此处发布的内容,这似乎是由于 xTaskCreatePinnedToCore() 函数而发生的。