Closed
Description
Problem
When PwmOut::write() is called with 0 and 0.5 parameter by toggling, output signal level wrongly tied to high level often by write(0).
Original report is here.
Test code
#include "mbed.h"
PwmOut pwm1(D2); // P0_6
int main()
{
pwm1.period_us(26);
pwm1.write(0);
while(1) {
pwm1.write(0.5); // 50% duty
wait(1);
pwm1.write(0); // should be low level
wait(1);
}
}
Signal snapshoot
This is due to the conflict of set/clear event is happened for SCT output.
I have fixed this defect and will make pull-request after some more testing.