aw_pwm: ensure sane configuration, just in case
Make sure that the hardware is configured to cycle mode and that the bypass is disabled. MFC after: 2 weeks
This commit is contained in:
parent
fc1ec731c8
commit
6957a14075
@ -290,6 +290,13 @@ aw_pwm_channel_config(device_t dev, u_int channel, u_int period, u_int duty)
|
||||
/* Write the prescalar */
|
||||
reg &= ~AW_PWM_CTRL_PRESCALE_MASK;
|
||||
reg |= prescaler;
|
||||
|
||||
reg &= ~AW_PWM_CTRL_MODE_MASK;
|
||||
reg |= AW_PWM_CTRL_CYCLE_MODE;
|
||||
|
||||
reg &= ~AW_PWM_CTRL_PULSE_START;
|
||||
reg &= ~AW_PWM_CTRL_CLK_BYPASS;
|
||||
|
||||
AW_PWM_WRITE(sc, AW_PWM_CTRL, reg);
|
||||
|
||||
/* Write the total/active cycles */
|
||||
|
Loading…
Reference in New Issue
Block a user