2023-10-27 09:50 PM
Hai ,
am trying to make a pwm signal to drive an H bridge driver ,My board is Nucleo-F070RB
I am using the following function
HAL_TIM_PWM_Start_IT(&htim1, TIM_CHANNEL_1);
HAL_TIMEx_PWMN_Start_IT(&htim1, TIM_CHANNEL_1);
HAL_TIM_PWM_Start_IT(&htim1, TIM_CHANNEL_2);
HAL_TIMEx_PWMN_Start_IT(&htim1, TIM_CHANNEL_2);
But not getting any wave
Solved! Go to Solution.
2023-10-28 05:59 AM
htim1.Init.Period = 40; [...] sConfigOC.Pulse = 222; [...] sConfigOC.Pulse = 123; [...]
If TIMx_CCRx > TIMx_ARR, you won't see any pulses.
Generally, whatever the problem is, start with reading out and checking/posting relevant TIM and GPIO registers content.
JW
2023-10-28 05:59 AM
htim1.Init.Period = 40; [...] sConfigOC.Pulse = 222; [...] sConfigOC.Pulse = 123; [...]
If TIMx_CCRx > TIMx_ARR, you won't see any pulses.
Generally, whatever the problem is, start with reading out and checking/posting relevant TIM and GPIO registers content.
JW
2023-10-28 06:33 AM
Thankyou Very much .
I am using channel pin as folows
PA7 TIM1_CH1N
PA8 TIM1_CH1
PA9 TIM1_CH2
PB0 TIM1_CH2N
But not getting signal on PB0 TIM1_CH2N.
__HAL_RCC_GPIOB_CLK_ENABLE(); clock is already enabled
2023-10-28 02:49 PM
What hardware is this, a "known good" board like Nucleo or Disco, or your own? Make sure you are measuring the signal on PB0, i.e. if this is your board, that there is no bad solder joint or short on this pin. You can test it by setting it to GPIO output and toggling "manually" (like blinking a LED).
And, if this won't help, read out and check/post the GPIOB and TIM registers content.
JW