💡 Comment variant timers

This commit is contained in:
Scott Lahteine 2022-02-04 12:39:30 -06:00
parent f42c1b4cae
commit d4801461f5
21 changed files with 54 additions and 56 deletions

View File

@ -74,10 +74,10 @@
#define MCU_STEP_TIMER 4 #define MCU_STEP_TIMER 4
#define MCU_TEMP_TIMER 2 #define MCU_TEMP_TIMER 2
#elif defined(STM32F401xC) || defined(STM32F401xE) #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 #define MCU_TEMP_TIMER 10
#elif defined(STM32F4xx) || defined(STM32F7xx) || defined(STM32H7xx) #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. #define MCU_TEMP_TIMER 14 // TIM7 is consumed by Software Serial if used.
#endif #endif

View File

@ -107,8 +107,8 @@ extern "C" {
// TIM9 - STEP_TIMER // TIM9 - STEP_TIMER
// TIM10 - TEMP_TIMER // TIM10 - TEMP_TIMER
// TIM11 - // TIM11 -
#define TIMER_SERVO TIM2 #define TIMER_SERVO TIM2 // TIMER_SERVO must be defined in this file
#define TIMER_TONE TIM5 #define TIMER_TONE TIM5 // TIMER_TONE must be defined in this file
// UART Definitions // UART Definitions
#define SERIAL_UART_INSTANCE 1 #define SERIAL_UART_INSTANCE 1

View File

@ -245,9 +245,9 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c
#define TIMER_TONE TIM7 #define TIMER_TONE TIM7 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM5 #define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM2 #define TIMER_SERIAL TIM2 // TIMER_SERIAL must be defined in this file
// UART Definitions // UART Definitions
// Define here Serial instance number to map on Serial generic name // Define here Serial instance number to map on Serial generic name

View File

@ -245,9 +245,9 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c
#define TIMER_TONE TIM7 #define TIMER_TONE TIM7 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM5 #define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM8 #define TIMER_SERIAL TIM8 // TIMER_SERIAL must be defined in this file
// UART Definitions // UART Definitions
// Define here Serial instance number to map on Serial generic name // Define here Serial instance number to map on Serial generic name

View File

@ -255,9 +255,9 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c
#define TIMER_TONE TIM10 #define TIMER_TONE TIM10 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM5 #define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM7 #define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file
// UART Definitions // UART Definitions
//#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below //#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below

View File

@ -165,9 +165,9 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pin. See PinMap_PWM. // Do not use timer used by PWM pin. See PinMap_PWM.
#define TIMER_TONE TIM6 #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM5 #define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM7 #define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file
// UART Definitions // UART Definitions
//#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header //#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header

View File

@ -165,9 +165,9 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pin. See PinMap_PWM. // Do not use timer used by PWM pin. See PinMap_PWM.
#define TIMER_TONE TIM6 #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM5 #define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM7 #define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file
// UART Definitions // UART Definitions
//#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header //#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header

View File

@ -255,9 +255,9 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c
#define TIMER_TONE TIM2 #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_SERVO TIM5 // Only 1 Servo PIN on SKR-PRO, so use the same timer as defined in PeripheralPins
#define TIMER_SERIAL TIM7 #define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file
// UART Definitions // UART Definitions
//#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below //#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below

View File

@ -157,9 +157,9 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c // Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c
#define TIMER_TONE TIM2 #define TIMER_TONE TIM2 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM5 #define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM7 #define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file
// UART1 for TFT port // UART1 for TFT port
#define ENABLE_HWSERIAL1 #define ENABLE_HWSERIAL1

View File

@ -126,10 +126,10 @@ extern "C" {
// Timer Definitions // Timer Definitions
#ifndef TIMER_TONE #ifndef TIMER_TONE
#define TIMER_TONE TIM3 #define TIMER_TONE TIM3 // TIMER_TONE must be defined in this file
#endif #endif
#ifndef TIMER_SERVO #ifndef TIMER_SERVO
#define TIMER_SERVO TIM2 #define TIMER_SERVO TIM2 // TIMER_SERVO must be defined in this file
#endif #endif
// UART Definitions // UART Definitions

View File

@ -121,9 +121,9 @@ extern "C" {
#define TEMP_TIMER 3 #define TEMP_TIMER 3
// Leave TIMER 4 for TFT backlight PWM or Servo freq... // Leave TIMER 4 for TFT backlight PWM or Servo freq...
#define STEP_TIMER 5 #define STEP_TIMER 5
#define TIMER_TONE TIM6 #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM7 #define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM8 #define TIMER_SERIAL TIM8 // TIMER_SERIAL must be defined in this file
// UART Definitions // UART Definitions
// Define here Serial instance number to map on Serial generic name // Define here Serial instance number to map on Serial generic name

View File

@ -133,10 +133,10 @@ extern "C" {
// Timer Definitions (optional) // Timer Definitions (optional)
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
#ifndef TIMER_TONE #ifndef TIMER_TONE
#define TIMER_TONE TIM6 #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file
#endif #endif
#ifndef TIMER_SERVO #ifndef TIMER_SERVO
#define TIMER_SERVO TIM7 #define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file
#endif #endif
// UART Definitions // UART Definitions

View File

@ -177,8 +177,8 @@ extern "C" {
// Timer Definitions (optional) // Timer Definitions (optional)
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
#define TIMER_TONE TIM6 #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM7 #define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file
// UART Definitions // UART Definitions
// Define here Serial instance number to map on Serial generic name // Define here Serial instance number to map on Serial generic name

View File

@ -299,10 +299,10 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c // 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 // 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 // UART Definitions
// Define here Serial instance number to map on Serial generic name // Define here Serial instance number to map on Serial generic name

View File

@ -134,15 +134,15 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
#ifndef TIMER_TONE #ifndef TIMER_TONE
#define TIMER_TONE TIM6 #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file
#endif #endif
#ifndef TIMER_SERVO #ifndef TIMER_SERVO
#define TIMER_SERVO TIM7 #define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file
#endif #endif
#ifndef TIMER_SERIAL #ifndef TIMER_SERIAL
#define TIMER_SERIAL TIM9 #define TIMER_SERIAL TIM9 // TIMER_SERIAL must be defined in this file
#endif #endif
// UART Definitions // UART Definitions

View File

@ -153,13 +153,13 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
#ifndef TIMER_TONE #ifndef TIMER_TONE
#define TIMER_TONE TIM6 #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file
#endif #endif
#ifndef TIMER_SERVO #ifndef TIMER_SERVO
#define TIMER_SERVO TIM7 #define TIMER_SERVO TIM7 // TIMER_SERVO must be defined in this file
#endif #endif
#ifndef TIMER_SERIAL #ifndef TIMER_SERIAL
#define TIMER_SERIAL TIM5 #define TIMER_SERIAL TIM5 // TIMER_SERIAL must be defined in this file
#endif #endif
// UART Definitions // UART Definitions

View File

@ -185,10 +185,10 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c // 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 // 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 // UART Definitions
// Define here Serial instance number to map on Serial generic name // Define here Serial instance number to map on Serial generic name

View File

@ -93,17 +93,15 @@ extern "C" {
#define PIN_SPI_MISO PA6 #define PIN_SPI_MISO PA6
#define PIN_SPI_SCK PA5 #define PIN_SPI_SCK PA5
// Timer Definitions // Timer Definitions
#define TIMER_TONE TIM2 #define TIMER_TONE TIM2 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM5 #define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM11 #define TIMER_SERIAL TIM11 // TIMER_SERIAL must be defined in this file
// UART Definitions // UART Definitions
//#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below //#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below
#define ENABLE_HWSERIAL2 #define ENABLE_HWSERIAL2
// Define here Serial instance number to map on Serial generic name (if not already used by SerialUSB) // 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) #define SERIAL_UART_INSTANCE 1 //1 for Serial = Serial1 (USART1)
@ -148,4 +146,4 @@ extern "C" {
#define SERIAL_PORT_HARDWARE_OPEN Serial2 #define SERIAL_PORT_HARDWARE_OPEN Serial2
#endif #endif
#endif /* _VARIANT_ARDUINO_STM32_ */ #endif /* _VARIANT_ARDUINO_STM32_ */

View File

@ -133,9 +133,9 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Do not use timer used by PWM pin. See PinMap_PWM. // Do not use timer used by PWM pin. See PinMap_PWM.
#define TIMER_TONE TIM6 #define TIMER_TONE TIM6 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM5 #define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM7 #define TIMER_SERIAL TIM7 // TIMER_SERIAL must be defined in this file
// UART Definitions // UART Definitions
//#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header //#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header

View File

@ -183,7 +183,7 @@ extern "C" {
// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.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 // FANs may require PWM timers 3 10 11 13
// The LED/RGB connectors timer 4 // 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 #ifndef TIMER_TONE
#define TIMER_TONE TIM8 // TIM3 or TIM8 for SPEAKER compat on the lerdge K (PC6) #define TIMER_TONE TIM8 // TIM3 or TIM8 for SPEAKER compat on the lerdge K (PC6)
#endif // TIM4 for that on the Lerdge S (PD11) #endif // TIM4 for that on the Lerdge S (PD11)

View File

@ -103,8 +103,8 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
#define TIMER_TONE TIM5 #define TIMER_TONE TIM5 // TIMER_TONE must be defined in this file
#define TIMER_SERVO TIM4 #define TIMER_SERVO TIM4 // TIMER_SERVO must be defined in this file
// UART Definitions // UART Definitions
// Define here Serial instance number to map on Serial generic name // Define here Serial instance number to map on Serial generic name