|
合宙ESP32C3模块,运行其它程序正常,上传简单的多任务程序就不断重启,不知何因,请大神指点,谢谢。
TaskHandle_t *task1;
void setup() {
// put your setup code here, to run once:
//创建任务
//指定在核心0上执行Task1_blink任务
xTaskCreatePinnedToCore(
Task1_blink, //任务对应的函数
"blink", //任务名
10240, //栈大小。(This stack size can be checked & adjusted by reading the Stack Highwater)
NULL, //传给任务函数的参数
0, //任务优先级。(Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest.)
task1, //用来返回任务handle
//NULL,
0 //指定CPU核心,tskNO_AFFINITY表示不指定,数字代表核心ID
);
}
void loop() {
// put your main code here, to run repeatedly:
}
/*---------------------- 定义任务 ---------------------*/
void Task1_blink(void *pvParameters) // This is a task.
{
(void) pvParameters;
vTaskDelay(5000);
}
串口监控器输出信息:
assert failed: prvTaskExitError port.c:165 (uxCriticalNesting == ~0UL)
Core 0 register dump:
MEPC : 0x403818a4 RA : 0x4038392a SP : 0x3fc94440 GP : 0x3fc89e00
TP : 0x3fc8d0ac T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x3fc945a6 S1 : 0x00000081 A0 : 0x3fc94498 A1 : 0x3fc89ca5
A2 : 0x00000001 A3 : 0x00000029 A4 : 0x00000001 A5 : 0x3fc8c000
A6 : 0x7a797877 A7 : 0x76757473 S2 : 0x3fc94498 S3 : 0x00000001
S4 : 0x3fc94498 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001801 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
3fc94440: 0xa5a5a5a5 0xa5a5a5a5 0x3c0243a4 0x403881ee 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x3fc89ca4
3fc94460: 0x00353631 0xa5a5a5a5 0x00000000 0x00000000 0xa5000000 0x3fc8a4d4 0x3c0243a4 0x3fc8a4b8
3fc94480: 0x3c0243f8 0x3fc8a4e4 0x3fc94460 0x3fc8a4e8 0x3c0243b8 0x3fc89ca4 0x65737361 0x66207472
3fc944a0: 0x656c6961 0x70203a64 0x61547672 0x78456b73 0x72457469 0x20726f72 0x74726f70 0x313a632e
3fc944c0: 0x28203536 0x72437875 0x63697469 0x654e6c61 0x6e697473 0x3d3d2067 0x55307e20 0xa500294c
3fc944e0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
ELF file SHA256: 0000000000000000
Rebooting...
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xf (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381708
SPIWP:0xee
modeIO, clock div:1
load:0x3fcd6100,len:0x38c
load:0x403ce000,len:0x6a8
load:0x403d0000,len:0x236c
SHA-256 comparison failed:
Calculated: 86b6856493d23fe741a1623c3d149a38bdf91ca0101173d85f25c3fdb6d605ee
Expected: e7bbd322b12b609ed444a0547cebdc54bbcf46aefed1e04449d9827791f3e8ab
Attempting to boot anyway...
entry 0x403ce000
assert failed: prvTaskExitError port.c:165 (uxCriticalNesting == ~0UL)
Core 0 register dump:
MEPC : 0x403818a4 RA : 0x4038392a SP : 0x3fc94440 GP : 0x3fc89e00
TP : 0x3fc8d0ac T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x3fc945a6 S1 : 0x00000081 A0 : 0x3fc94498 A1 : 0x3fc89ca5
A2 : 0x00000001 A3 : 0x00000029 A4 : 0x00000001 A5 : 0x3fc8c000
A6 : 0x7a797877 A7 : 0x76757473 S2 : 0x3fc94498 S3 : 0x00000001
S4 : 0x3fc94498 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001801 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
3fc94440: 0xa5a5a5a5 0xa5a5a5a5 0x3c0243a4 0x403881ee 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x3fc89ca4
3fc94460: 0x00353631 0xa5a5a5a5 0x00000000 0x00000000 0xa5000000 0x3fc8a4d4 0x3c0243a4 0x3fc8a4b8
3fc94480: 0x3c0243f8 0x3fc8a4e4 0x3fc94460 0x3fc8a4e8 0x3c0243b8 0x3fc89ca4 0x6573
|
|