From c367533b0ab4fbed013a1223638e6b059e1f8590 Mon Sep 17 00:00:00 2001 From: Flokke Date: Thu, 7 May 2026 09:38:28 +0200 Subject: [PATCH] Move beepTask and rfDecodeTask to Core 0 to keep Core 1 free for the main loop --- src/InterruptHandler.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/InterruptHandler.cpp b/src/InterruptHandler.cpp index cab37be..b9722b8 100644 --- a/src/InterruptHandler.cpp +++ b/src/InterruptHandler.cpp @@ -30,10 +30,9 @@ void InterruptHandler_Init(void) beepSemaphore = xSemaphoreCreateBinary(); rfEventQueue = xQueueCreate(RF_QUEUE_SIZE, sizeof(RfEvent_t)); - /* beepTask: replaces beep logic that was in timerIsr — high priority so it responds within one tick */ - xTaskCreatePinnedToCore(beepTask, "beepTask", 2048, NULL, 5, NULL, 1); - /* rfDecodeTask: replaces receiver ISR calls that were in pinLevelChangeIsr */ - xTaskCreatePinnedToCore(rfDecodeTask, "rfTask", 3072, NULL, 4, NULL, 1); + /* beepTask and rfDecodeTask do little work per activation — pin to Core 0 to keep Core 1 free for the main loop */ + xTaskCreatePinnedToCore(beepTask, "beepTask", 2048, NULL, 5, NULL, 0); + xTaskCreatePinnedToCore(rfDecodeTask, "rfTask", 3072, NULL, 4, NULL, 0); attachInterrupt(digitalPinToInterrupt(DIN_FUNK), pinLevelChangeIsr, CHANGE);