Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).
|
Hi We are presently trying to use the DSP56F803 PWM (channel 4) as a simple independent PWM output. We are sweeping the output duty cycle from 0% to 100% and therefore, updating and reloading the PWM timer on every timeout interrupt of the PWM. When we then observe the PWM output on a scope, the rate at which the PWM duty cycle is changing, is taking much longer then we would expect (4 to 5 sec to go from 0 to 100 % duty cycle). We have also seen that the rate at which this output duty cycle can be changed is somehow tied to the configured base frequency of the PWM. Is this normal operation as per the 56803 implementation of the PWM functionality? Has anyone gotten the duty cycle to change faster? The prescaler and modulus are set for PWM freq = 4.32khz. We expected the duty cycle to change in microseconds or milliseconds, not seconds. Thanks Mike Kertesz |
|
|
|
Hi We are presently trying to use the DSP56F803 PWM (channel 4) as a simple independent PWM output. We are sweeping the output duty cycle from 0% to 100% and therefore, updating and reloading the PWM timer on every timeout interrupt of the PWM. When we then observe the PWM output on a scope, the rate at which the PWM duty cycle is changing, is taking much longer then we would expect (4 to 5 sec to go from 0 to 100 % duty cycle). We have also seen that the rate at which this output duty cycle can be changed is somehow tied to the configured base frequency of the PWM. Is this normal operation as per the 56803 implementation of the PWM functionality? Has anyone gotten the duty cycle to change faster? The prescaler and modulus are set for PWM freq = 4.32khz. We expected the duty cycle to change in microseconds or milliseconds, not seconds. Thanks Mike Kertesz |
|
|
|
Hello We are presently trying to use the DSP56F803 PWM (channel 4) as a simple independent PWM output. We are sweeping the output duty cycle from 0% to 100% and therefore, updating and reloading the PWM timer on every timeout interrupt of the PWM. When we then observe the PWM output on a scope, the rate at which the PWM duty cycle is changing, is taking much longer then we would expect (4 to 5 sec to go from 0 to 100 % duty cycle). We have also seen that the rate at which this output duty cycle can be changed is somehow tied to the configured base frequency of the PWM. Is this normal operation as per the 56803 implementation of the PWM functionality? Has anyone gotten the duty cycle to change faster? The prescaler and modulus are set for PWM freq = 4.32khz. We expected the duty cycle to change in microseconds or milliseconds, not seconds. Thanks Mike Kertesz |
|
The PWM duty cycle can only be changed at PWM period
intervals. You can write to the value registers any time, but they only take effect at the
beginning of the next PWM period. So at 4.32 kHz, the PWM duty cycle can only be changed
every 231 usecs. If you have 16-bits of resolution, and you change the duty cycle one
count at a time, it will take (231 usecs * 65535) = 15.17 seconds to sweep from 0 to
65535. If you have 15-bits of resolution, it will take 7.59 seconds, etc.
Doug Holub
|
Create like a god,Command like a king,Work like a
slave
-------------------------------------------------------------------------------
--------------------------
R.Christober
Infineon technologies Pvt.Ltd 10th Floor,Discoverer Building International Tech Park Bangalore 560066. Tel: +91 80-51392055
-------------------------------------------------------------------------------
--------------------------
Yahoo! India Matrimony: Find your partner online. |