|
@@ -47,6 +47,20 @@ typedef uint16_t hal_timer_t;
|
47
|
47
|
#define STEP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
|
48
|
48
|
#define TEMP_TIMER_CHAN 1 // Channel of the timer to use for compare and interrupts
|
49
|
49
|
|
|
50
|
+/**
|
|
51
|
+ * Note: Timers may be used by platforms and libraries
|
|
52
|
+ *
|
|
53
|
+ * FAN PWMs:
|
|
54
|
+ * With FAN_SOFT_PWM disabled the Temperature class uses
|
|
55
|
+ * FANx_PIN timers to generate FAN PWM signals.
|
|
56
|
+ *
|
|
57
|
+ * Speaker:
|
|
58
|
+ * When SPEAKER is enabled, one timer is allocated by maple/tone.cpp.
|
|
59
|
+ * - If BEEPER_PIN has a timer channel (and USE_PIN_TIMER is
|
|
60
|
+ * defined in tone.cpp) it uses the pin's own timer.
|
|
61
|
+ * - Otherwise it uses Timer 8 on boards with STM32_HIGH_DENSITY
|
|
62
|
+ * or Timer 4 on other boards.
|
|
63
|
+ */
|
50
|
64
|
#if defined(MCU_STM32F103CB) || defined(MCU_STM32F103C8)
|
51
|
65
|
#define STEP_TIMER_NUM 4 // For C8/CB boards, use timer 4
|
52
|
66
|
#else
|
|
@@ -58,7 +72,11 @@ typedef uint16_t hal_timer_t;
|
58
|
72
|
|
59
|
73
|
#if MB(BIGTREE_SKR_MINI_E3, BIGTREE_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE)
|
60
|
74
|
// SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM.
|
61
|
|
- #define SERVO0_TIMER_NUM 8
|
|
75
|
+ #ifdef STM32_HIGH_DENSITY
|
|
76
|
+ #define SERVO0_TIMER_NUM 8 // tone.cpp uses Timer 4
|
|
77
|
+ #else
|
|
78
|
+ #define SERVO0_TIMER_NUM 3 // tone.cpp uses Timer 8
|
|
79
|
+ #endif
|
62
|
80
|
#else
|
63
|
81
|
#define SERVO0_TIMER_NUM 1 // SERVO0 or BLTOUCH
|
64
|
82
|
#endif
|