From aae5f7229c476d606c9bde7ae95b143fd26cfbd8 Mon Sep 17 00:00:00 2001
From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com>
Date: Fri, 26 Jun 2020 08:23:39 +0200
Subject: [PATCH] [samd51] Manifest assigned timers priority (#18402)

---
 Marlin/src/HAL/SAMD51/timers.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Marlin/src/HAL/SAMD51/timers.cpp b/Marlin/src/HAL/SAMD51/timers.cpp
index fa2d4d3e68..a404e35dac 100644
--- a/Marlin/src/HAL/SAMD51/timers.cpp
+++ b/Marlin/src/HAL/SAMD51/timers.cpp
@@ -36,15 +36,15 @@
 // --------------------------------------------------------------------------
 
 const tTimerConfig TimerConfig[NUM_HARDWARE_TIMERS+1] = {
-  { {.pTc=TC0},  TC0_IRQn, TC_PRIORITY(0) },  // 0 - stepper
+  { {.pTc=TC0},  TC0_IRQn, TC_PRIORITY(0) },  // 0 - stepper (assigned priority 2)
   { {.pTc=TC1},  TC1_IRQn, TC_PRIORITY(1) },  // 1 - stepper (needed by 32 bit timers)
-  { {.pTc=TC2},  TC2_IRQn, TC_PRIORITY(2) },  // 2 - tone (framework)
-  { {.pTc=TC3},  TC3_IRQn, TC_PRIORITY(3) },  // 3 - servo
-  { {.pTc=TC4},  TC4_IRQn, TC_PRIORITY(4) },  // 4 - software serial
+  { {.pTc=TC2},  TC2_IRQn, 5              },  // 2 - tone (reserved by framework and fixed assigned priority 5)
+  { {.pTc=TC3},  TC3_IRQn, TC_PRIORITY(3) },  // 3 - servo (no interrupts used)
+  { {.pTc=TC4},  TC4_IRQn, TC_PRIORITY(4) },  // 4 - software serial (no interrupts used)
   { {.pTc=TC5},  TC5_IRQn, TC_PRIORITY(5) },
   { {.pTc=TC6},  TC6_IRQn, TC_PRIORITY(6) },
   { {.pTc=TC7},  TC7_IRQn, TC_PRIORITY(7) },
-  { {.pRtc=RTC}, RTC_IRQn, TC_PRIORITY(8) }   // 8 - temperature
+  { {.pRtc=RTC}, RTC_IRQn, TC_PRIORITY(8) }   // 8 - temperature (assigned priority 6)
 };
 
 // --------------------------------------------------------------------------