6 years, 8 months ago.

why can FastPWM generate 48MHz frequency?

what is the difference between FastOWM.h and PwmOut.h? The latter one can only be up to 500KHz. Is there any one who can expain the code of FastPWM to me? Thanks!!

I think that the FastPWM library changes the internal clock used by the LPC1768 (see the first few lines of FastPWM.cpp)

posted by Matthew Else 06 Aug 2013

2 Answers

5 years, 1 month ago.

It was explained more here for example: https://developer.mbed.org/questions/1489/can-anyone-explain-the-code-of-FastPWMcp/#answer1727?compage=1#c7007

FastPWM allows you to use the full capabilities of the PWM hardware. Which will mean on virtually every MCU that it has a resolution equal to the clock frequency. For the LPC1768 this is 96MHz, so it can toggle 96M times per second, resulting in a frequency of half that, 48MHz.

Accepted Answer
5 years, 1 month ago.

I'm interested to know the answer too, any one figured out and care to explain?