Skip to content

Commit

Permalink
fixed PWM_TIM intialization on power on
Browse files Browse the repository at this point in the history
  • Loading branch information
dzid26 committed Sep 27, 2024
1 parent 18e010c commit 60b24f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions firmware/src/BSP/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ static void A4950_init(void)
tim_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;
tim_OCInitStructure.TIM_OutputNState = TIM_OutputState_Disable;
tim_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High;
tim_OCInitStructure.TIM_OCNPolarity = TIM_OCNPolarity_Low; //not used, but need for a reliable TIM1 initialization
tim_OCInitStructure.TIM_OCIdleState = TIM_OCIdleState_Reset; //Motor coasting when idle is set to reset
tim_OCInitStructure.TIM_OCNIdleState = TIM_OCNIdleState_Reset;
tim_OCInitStructure.TIM_Pulse = 0;
Expand Down

0 comments on commit 60b24f8

Please sign in to comment.