Re: mpc5200 and PWM
From: Grant Likely <hidden>
Date: 2009-01-25 06:24:49
On Sat, Jan 24, 2009 at 6:20 PM, Jon Smirl [off-list ref] wrote:
Is it possible to use Bestcomm with PWM to generate complex waveforms? For example change the frequency and duty cycle after each cycle? Has anyone tried doing this? I'd like to build a table of count/width pairs and then feed them to the PWM pin without taking an interrupt on each cycle.
I assume you're looking at using one of the GPT PWMs devices, correct? If so, the you probably cannot do what you want easily. While you may be able to writing a custom bestcomm task to write into the PWM registers, the bestcomm engine isn't wired up to the PWM and so cannot be triggered on PWM events. However, the gpio blocks are wired up to the Bestcomm engine so they can be used as requestors, so if you wired up the PWM output to one of the GPIO inputs, then you may be able to do something with that. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.