10 years 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.

Question relating to:

The Freedom-K64F is an ultra-low-cost development platform for Kinetis K64, K63, and K24 MCUs.

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);
}
posted by R S 24 Oct 2014
Be the first to answer this question.