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.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi the following code always yields a 32kHz square wave. I'd be very grateful if somebody could point me to where I am going wrong.
I get the same output however I set the period or width (ms us or ticks). I'd like to be able to set both in 48MHz ticks.
"
Serial pc(USBTX, USBRX);
FastPWM pwm(PTA1);
int main() {
pwm.period_ms(10);
pwm.pulsewidth_ms(3);
while(1){};
} "