Working on ESP32-S3, but the priority must be set with 0, otherwise the CPU will falt to reset。
kylongmu opened this issue · comments
`
xTaskCreatePinnedToCore(
taskModbus,
"taskModbus",
1 << 14,
NULL,
0, //Must be 0
NULL,
0); //ARDUINO_RUNNING_CORE is 1
}
void taskModbus(void* parameter) {
Serial1.begin(9600, SERIAL_8N2, RX_PIN, TX_PIN);
mb.begin(&Serial1);
mb.slave(Hreg_file[0]);
mb.addHreg(0, 0, 16);
mb.addHreg(Hreg_address, 0, Hreg_size);
//Serial.printf("Running task taskModbus%d\n", xPortGetCoreID());
while (1) {
mb.task();
yield();
}
Serial.println("Ending task taskModbus");
vTaskDelete(NULL);
}
`
When the priority set to others, CPU reboot with this output:
E (10135) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (10135) task_wdt: - IDLE (CPU 0)
E (10135) task_wdt: Tasks currently running:
E (10135) task_wdt: CPU 0: taskModbus
E (10135) task_wdt: CPU 1: IDLE
E (10135) task_wdt: Aborting.
abort() was called at PC 0x420122b4 on core 0
Is there any work in progress here? I came to this issue aswell.
Waiting of -s3 board to arrive