diff --git a/Marlin/src/HAL/STM32/timers.cpp b/Marlin/src/HAL/STM32/timers.cpp index fe27ca1016..a1e3372bbb 100644 --- a/Marlin/src/HAL/STM32/timers.cpp +++ b/Marlin/src/HAL/STM32/timers.cpp @@ -74,10 +74,10 @@ #define MCU_STEP_TIMER 4 #define MCU_TEMP_TIMER 2 #elif defined(STM32F401xC) || defined(STM32F401xE) - #define MCU_STEP_TIMER 9 + #define MCU_STEP_TIMER 9 // STM32F401 has no TIM6, TIM7, or TIM8 #define MCU_TEMP_TIMER 10 #elif defined(STM32F4xx) || defined(STM32F7xx) || defined(STM32H7xx) - #define MCU_STEP_TIMER 6 // STM32F401 has no TIM6, TIM7, or TIM8 + #define MCU_STEP_TIMER 6 #define MCU_TEMP_TIMER 14 // TIM7 is consumed by Software Serial if used. #endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h index 0c66ae89b8..ca7a53d782 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h @@ -107,8 +107,8 @@ extern "C" { // TIM9 - STEP_TIMER // TIM10 - TEMP_TIMER // TIM11 - -#define TIMER_SERVO TIM2 -#define TIMER_TONE TIM5 +#define TIMER_SERVO TIM2 // TIMER_SERVO must be defined in this file +#define TIMER_TONE TIM5 // TIMER_TONE must be defined in this file // UART Definitions #define SERIAL_UART_INSTANCE 1 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h index 5657450100..068d0b9ee5 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h @@ -245,9 +245,9 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c -#define TIMER_TONE TIM7 -#define TIMER_SERVO TIM5 -#define TIMER_SERIAL TIM2 +#define TIMER_TONE TIM7 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERIAL TIM2 // TIMER_SERIAL must be defined in this file // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h index 646d635679..edc1c91c53 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h @@ -245,9 +245,9 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c -#define TIMER_TONE TIM7 -#define TIMER_SERVO TIM5 -#define TIMER_SERIAL TIM8 +#define TIMER_TONE TIM7 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERIAL TIM8 // TIMER_SERIAL must be defined in this file // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h index 41e4641102..2c70693991 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h @@ -255,9 +255,9 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c -#define TIMER_TONE TIM10 -#define TIMER_SERVO TIM5 -#define TIMER_SERIAL TIM7 +#define TIMER_TONE TIM10 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file // UART Definitions //#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h index 0147ece0ab..1870e77929 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h @@ -165,9 +165,9 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pin. See PinMap_PWM. -#define TIMER_TONE TIM6 -#define TIMER_SERVO TIM5 -#define TIMER_SERIAL TIM7 +#define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file // UART Definitions //#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h index f512a311e3..424538b395 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h @@ -165,9 +165,9 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pin. See PinMap_PWM. -#define TIMER_TONE TIM6 -#define TIMER_SERVO TIM5 -#define TIMER_SERIAL TIM7 +#define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file // UART Definitions //#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h index 11ebf561f3..b5cf0bad9d 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h @@ -255,9 +255,9 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c -#define TIMER_TONE TIM2 -#define TIMER_SERVO TIM5 // Only 1 Servo PIN on SKR-PRO, so use the same timer as defined in PeripheralPins -#define TIMER_SERIAL TIM7 +#define TIMER_TONE TIM2 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM5 // Only 1 Servo PIN on SKR-PRO, so use the same timer as defined in PeripheralPins +#define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file // UART Definitions //#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h index 74f29514a8..285ad662e0 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h @@ -157,9 +157,9 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c -#define TIMER_TONE TIM2 -#define TIMER_SERVO TIM5 -#define TIMER_SERIAL TIM7 +#define TIMER_TONE TIM2 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file // UART1 for TFT port #define ENABLE_HWSERIAL1 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h index 333bb02e5a..8f17d052bb 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h @@ -126,10 +126,10 @@ extern "C" { // Timer Definitions #ifndef TIMER_TONE - #define TIMER_TONE TIM3 + #define TIMER_TONE TIM3 // TIMER_TONE must be defined in this file #endif #ifndef TIMER_SERVO - #define TIMER_SERVO TIM2 + #define TIMER_SERVO TIM2 // TIMER_SERVO must be defined in this file #endif // UART Definitions diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h index 56ae719077..e64272745b 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h @@ -121,9 +121,9 @@ extern "C" { #define TEMP_TIMER 3 // Leave TIMER 4 for TFT backlight PWM or Servo freq... #define STEP_TIMER 5 -#define TIMER_TONE TIM6 -#define TIMER_SERVO TIM7 -#define TIMER_SERIAL TIM8 +#define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file +#define TIMER_SERIAL TIM8 // TIMER_SERIAL must be defined in this file // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h index 496d8817a1..e01d67fd59 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h @@ -133,10 +133,10 @@ extern "C" { // Timer Definitions (optional) // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin #ifndef TIMER_TONE - #define TIMER_TONE TIM6 + #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file #endif #ifndef TIMER_SERVO - #define TIMER_SERVO TIM7 + #define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file #endif // UART Definitions diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h index fb878f8b78..330a7efbf8 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h @@ -177,8 +177,8 @@ extern "C" { // Timer Definitions (optional) // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin -#define TIMER_TONE TIM6 -#define TIMER_SERVO TIM7 +#define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h index 3eed147309..df8bf064fc 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h @@ -299,10 +299,10 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c -#define TIMER_TONE TIM6 +#define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file // Do not use basic timer: OC is required -#define TIMER_SERVO TIM2 //TODO: advanced-control timers don't work +#define TIMER_SERVO TIM2 // TODO: advanced-control timers don't work // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h index f00cc5f612..855616f66b 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h @@ -134,15 +134,15 @@ extern "C" { // Timer Definitions // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin #ifndef TIMER_TONE -#define TIMER_TONE TIM6 + #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file #endif #ifndef TIMER_SERVO -#define TIMER_SERVO TIM7 + #define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file #endif #ifndef TIMER_SERIAL -#define TIMER_SERIAL TIM9 + #define TIMER_SERIAL TIM9 // TIMER_SERIAL must be defined in this file #endif // UART Definitions diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h index 94fa79c065..ba145d058c 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h @@ -153,13 +153,13 @@ extern "C" { // Timer Definitions // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin #ifndef TIMER_TONE - #define TIMER_TONE TIM6 + #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file #endif #ifndef TIMER_SERVO - #define TIMER_SERVO TIM7 + #define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file #endif #ifndef TIMER_SERIAL - #define TIMER_SERIAL TIM5 + #define TIMER_SERIAL TIM5 // TIMER_SERIAL must be defined in this file #endif // UART Definitions diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h index fd9a5c7741..2bfce85e21 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h @@ -185,10 +185,10 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c -#define TIMER_TONE TIM6 +#define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file // Do not use basic timer: OC is required -#define TIMER_SERVO TIM1 //TODO: advanced-control timers don't work +#define TIMER_SERVO TIM1 // TODO: advanced-control timers don't work // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h index bcd5aa378e..d4982113a0 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h @@ -93,17 +93,15 @@ extern "C" { #define PIN_SPI_MISO PA6 #define PIN_SPI_SCK PA5 - // Timer Definitions -#define TIMER_TONE TIM2 -#define TIMER_SERVO TIM5 -#define TIMER_SERIAL TIM11 +#define TIMER_TONE TIM2 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERIAL TIM11 // TIMER_SERIAL must be defined in this file // UART Definitions //#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below #define ENABLE_HWSERIAL2 - // Define here Serial instance number to map on Serial generic name (if not already used by SerialUSB) #define SERIAL_UART_INSTANCE 1 //1 for Serial = Serial1 (USART1) @@ -148,4 +146,4 @@ extern "C" { #define SERIAL_PORT_HARDWARE_OPEN Serial2 #endif -#endif /* _VARIANT_ARDUINO_STM32_ */ \ No newline at end of file +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h index 4bd5b63dfe..4f77dc688f 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/variant.h @@ -133,9 +133,9 @@ extern "C" { // Timer Definitions // Do not use timer used by PWM pin. See PinMap_PWM. -#define TIMER_TONE TIM6 -#define TIMER_SERVO TIM5 -#define TIMER_SERIAL TIM7 +#define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file // UART Definitions //#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header diff --git a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h index d82f000655..e7bc7c0bc1 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h @@ -183,7 +183,7 @@ extern "C" { // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c // FANs may require PWM timers 3 10 11 13 // The LED/RGB connectors timer 4 -// Beware: STEP_TIMER default is 6 and TEMP_TIMER 14 for the F407 +// Beware: MCU_TIMER_STEP default is 6 and MCU_TIMER_TEMP 14 for the F407 #ifndef TIMER_TONE #define TIMER_TONE TIM8 // TIM3 or TIM8 for SPEAKER compat on the lerdge K (PC6) #endif // TIM4 for that on the Lerdge S (PD11) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h index 2fee15ba3b..30c3d95349 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h @@ -103,8 +103,8 @@ extern "C" { // Timer Definitions // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin -#define TIMER_TONE TIM5 -#define TIMER_SERVO TIM4 +#define TIMER_TONE TIM5 // TIMER_TONE must be defined in this file +#define TIMER_SERVO TIM4 // TIMER_SERVO must be defined in this file // UART Definitions // Define here Serial instance number to map on Serial generic name