Open kylongmu opened 6 months ago
Is there any work in progress here? I came to this issue aswell.
Waiting of -s3 board to arrive
Hello,
yield();
with vTaskDelay(pdMS_TO_TICKS(100));
yield();
will only allow higher priority tasks to run, but the watchdog runs in the idle task (priority 0) so it won't get a chance to run if the taskModbus has a higher priority.yield();
function.
`
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