Maximum PwmOut frequency?

16 Oct 2009

Hi,

The minimum PwmOut period is specified by period_us(int). Is 1MHz the maximum PwmOut frequency? Or is there any other way to have higher PwmOut frequencies?

Best regards,

Paul

20 Oct 2009

Hello Simon,

Any thought?

Regards,

Paul

20 Oct 2009

Hi Paul,

Paul Kang wrote:
The minimum PwmOut period is specified by period_us(int). Is 1MHz the maximum PwmOut frequency?

Yep, that is currently the minimum period; this was intended to ensure all specified values could be accurately reproduced (i.e. internal pwm tick is 1MHz). Happy to hear of requirements higher than this if you have some.

Simon

20 Oct 2009

Simon,

Thanks. LPC2368-based mbed is running 60MHz, what do you mean " internal pwm tick is 1MHz"? I rather believe mbed should be able to handle PWM with higher frequencies  than 1MHz. Any work around like access the registers? Just like to push mbed to the limit ;-p

Paul

21 Oct 2009

Hi Paul,

Paul Kang wrote:
Thanks. LPC2368-based mbed is running 60MHz, what do you mean " internal pwm tick is 1MHz"? I rather believe mbed should be able to handle PWM with higher frequencies than 1MHz. Any work around like access the registers? Just like to push mbed to the limit ;-p

The PWM hardware on the 2368/1768 has a pre-scalar and then counters for period (1) and pulsewidth (6). The pre-scalar is set to make the counters count at 1MHz, such that a request for any period/pulsewidth in us can be exactly delivered.

There is certainly scope for hackery :) See...

Keep me updated with your application and desired settings/controls, as it could certainly influence the API design.

Simon

21 Oct 2009

Simon,

Thanks for pointing out the path of unlimited possibilities.

Best regards,

Paul