mirror of https://github.com/ARMmbed/mbed-os.git
Ensure that PWM=1 is resolved correctly
parent
6e7ee0e51e
commit
9a8cd059f8
|
@ -91,6 +91,9 @@ void pwmout_init(pwmout_t* obj, PinName pin) {
|
|||
|
||||
pwm->OUT0_SET = (1 << 0); // event 0
|
||||
pwm->OUT0_CLR = (1 << 1); // event 1
|
||||
// Resolve conflicts on output 0 to set output
|
||||
// This allows duty cycle = 1.0 to work, where the MATCH registers for set and clear are equal
|
||||
pwm->RES = 0x01;
|
||||
|
||||
pwm->EV0_CTRL = (1 << 12);
|
||||
pwm->EV0_STATE = 0xFFFFFFFF;
|
||||
|
|
Loading…
Reference in New Issue