Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 1 month ago.
100% duty cycle on K64f?
Is there any reason why I cannot get 100% duty cycle with PWM.
#include "mbed.h"
PwmOut pwm(PTA2);
int main()
{
pwm.period(30);
pwm.write(1);
while(1);
}
With this code I would expect PTA2 always HIGH, instead it will go LOW for 1us per cycle.
I can achieve 100% just with pulsewidth function.
#include "mbed.h" PwmOut pwm(PTC10); int main() { pwm.period_us(30); pwm.write(1); wait(1); pwm.pulsewidth_us(30); wait(3); while(1); }