From b58b87066f353b56308647710c703964460ae657 Mon Sep 17 00:00:00 2001 From: c0smic Date: Thu, 18 Jun 2026 04:49:14 -0400 Subject: [PATCH] fix(serial): move serial command handler to PRO_CPU (core 0) On dual-core ESP32, the serial command handler task was pinned to core 1 which is the Arduino UI core. Moving it to core 0 (PRO_CPU) keeps background processing off the UI core, preventing input stutter during serial command execution. --- src/core/serialcmds.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/serialcmds.cpp b/src/core/serialcmds.cpp index 007e5452c..18cd62236 100644 --- a/src/core/serialcmds.cpp +++ b/src/core/serialcmds.cpp @@ -76,10 +76,9 @@ void startSerialCommandsHandlerTask(bool initQueues) { 2, // Priority of the task &serialcmdsTaskHandle, // Task handle (optional, can be NULL). #if SOC_CPU_CORES_NUM > 1 - 1 // Core where the task should run. By default, all your Arduino code runs on Core 1 and the Wi-Fi - // and RF functions + 0 // PRO_CPU - background tasks run on core 0, UI runs on core 1 (Arduino default) #else - 0 // Core where the task should run. ESP32-C5 has only one core + 0 // Single core - doesn't matter #endif ); // (these are usually hidden from the Arduino environment) use the Core 0. if (!serialcmdsTaskHandle) { Serial.println("Failed to create Serial Commands Handler task"); }