arch/stm32h7: Clear all PWM channel when during STOP
I noticed when executing pwm STOP command in multichannel mode, the channel still outputting. This commit fixes this issue. Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
parent
5975b25951
commit
940f1bace0
@ -4227,6 +4227,14 @@ static int pwm_stop(struct pwm_lowerhalf_s *dev)
|
||||
|
||||
regval &= ~resetbit;
|
||||
putreg32(regval, regaddr);
|
||||
|
||||
/* Clear all channels */
|
||||
|
||||
pwm_putreg(priv, STM32_GTIM_CCR1_OFFSET, 0);
|
||||
pwm_putreg(priv, STM32_GTIM_CCR2_OFFSET, 0);
|
||||
pwm_putreg(priv, STM32_GTIM_CCR3_OFFSET, 0);
|
||||
pwm_putreg(priv, STM32_GTIM_CCR4_OFFSET, 0);
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
||||
pwminfo("regaddr: %08" PRIx32 " resetbit: %08" PRIx32 "\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user