Skip to content

Commit 4ffd7ae

Browse files
tpruvotNight69
authored andcommitted
🔨 Set Longer3D timers in variant (MarlinFirmware#22632)
1 parent b6dc453 commit 4ffd7ae

File tree

3 files changed

+225
-218
lines changed

3 files changed

+225
-218
lines changed

buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ WEAK const PinMap PinMap_PWM[] = {
154154
{PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 3, 0)}, // TIM1_CH3
155155
{PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 4, 0)}, // TIM1_CH4
156156
#endif // if 0
157+
{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 1, 0)}, // TIM2_CH1 Part Fan
157158
{PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 1, 0)}, // TIM4_CH1 TFT Backlight
158159
{PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 2, 0)}, // TIM4_CH2 Servo connector
159160
{NC, NP, 0}

buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ extern "C" {
117117
#define PIN_WIRE_SCL PB10
118118

119119
// Timer Definitions
120-
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
121-
#ifndef TIMER_TONE
122-
#define TIMER_TONE TIM6
123-
#endif
124-
#ifndef TIMER_SERVO
125-
#define TIMER_SERVO TIM7
126-
#endif
120+
// Leave TIMER 2 for optional Fan PWM
121+
#define TEMP_TIMER 3
122+
// Leave TIMER 4 for TFT backlight PWM or Servo freq...
123+
#define STEP_TIMER 5
124+
#define TIMER_TONE TIM6
125+
#define TIMER_SERVO TIM7
126+
#define TIMER_SERIAL TIM8
127127

128128
// UART Definitions
129129
// Define here Serial instance number to map on Serial generic name

0 commit comments

Comments
 (0)