Skip to content

Commit

Permalink
Fix timer15-ch2 config for FAN1 pwm; enable timer15-ch2 output.
Browse files Browse the repository at this point in the history
  • Loading branch information
aegean-odyssey committed Aug 24, 2021
1 parent c4cfdc4 commit dad62e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions marlin_changes/HAL_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ int HAL_tim15_init(void)
TIM15->PSC = (TIM15_PRESCALE -1);
TIM15->CCMR1 |= (TIM_CCMR1_OC2M_2 | TIM_CCMR1_OC2M_1 | TIM_CCMR1_OC2PE);
TIM15->CCER |= TIM_CCER_CC2E;
TIM15->BDTR |= TIM_BDTR_MOE;
TIM15->CCR2 = 0; // pwm off
TIM15->CR1 |= (TIM_CR1_ARPE | TIM_CR1_CMS_0 | TIM_CR1_CEN);
TIM15->EGR |= TIM_EGR_UG;
Expand Down

0 comments on commit dad62e8

Please sign in to comment.