mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-01-09 00:07:48 -07:00
Merge ab19a2821e into 8b58aa1302
This commit is contained in:
commit
7203c96ac1
1 changed files with 4 additions and 1 deletions
|
|
@ -384,7 +384,10 @@ gpio_pwm_setup(uint8_t pin, uint32_t cycle_time, uint32_t val)
|
|||
}
|
||||
// Enable PWM output
|
||||
p->timer->CR1 |= TIM_CR1_CEN;
|
||||
#if CONFIG_MACH_STM32H7 || CONFIG_MACH_STM32G0
|
||||
// Advanced timers (TIM1/TIM8) require MOE (Main Output Enable) bit
|
||||
// For non-advanced timers, MOE is a NOOP
|
||||
#if CONFIG_MACH_STM32F0 || CONFIG_MACH_STM32F1 || CONFIG_MACH_STM32F4 || \
|
||||
CONFIG_MACH_STM32H7 || CONFIG_MACH_STM32G0
|
||||
p->timer->BDTR |= TIM_BDTR_MOE;
|
||||
#endif
|
||||
return channel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue