MOD5234 eTPU PWM function fails to produce requested pulse
Posted: Thu May 19, 2011 4:23 pm
The eTPU on the 5234 has a Pulse Width Modulator function. We are having a little trouble achieving the pulse with parameters we need. What could be the problem?
We are trying to produce a 20Hz pulse with 50% duty cycle with the eTPU on a MOD5234. When we call with the following parameters, an Oscilloscope shows a 20Hz pulse with a 3.2% duty cycle (the parameter 5000 specifies a 50.00% duty cycle):
fs_etpu_pwm_init (5,
FS_ETPU_PRIORITY_HIGH,
20,
5000,
FS_ETPU_PWM_ACTIVEHIGH,
FS_ETPU_TCR1,
etpu_a_tcr1_freq);
However when we change the frequency from 20Hz to 1000Hz, the scope does show a 1000Hz frequency with 50% duty cycle as requested:
fs_etpu_pwm_init (5,
FS_ETPU_PRIORITY_HIGH,
1000,
5000,
FS_ETPU_PWM_ACTIVEHIGH,
FS_ETPU_TCR1,
etpu_a_tcr1_freq);
The Freescale app note AN2849 for the eTPU PWM function advertises a supportedrange of 1Hz to 100KHz. The function does not return an error when called with 20Hz frequency.
Anyone have experience with this particular function?
Thanks
We are trying to produce a 20Hz pulse with 50% duty cycle with the eTPU on a MOD5234. When we call with the following parameters, an Oscilloscope shows a 20Hz pulse with a 3.2% duty cycle (the parameter 5000 specifies a 50.00% duty cycle):
fs_etpu_pwm_init (5,
FS_ETPU_PRIORITY_HIGH,
20,
5000,
FS_ETPU_PWM_ACTIVEHIGH,
FS_ETPU_TCR1,
etpu_a_tcr1_freq);
However when we change the frequency from 20Hz to 1000Hz, the scope does show a 1000Hz frequency with 50% duty cycle as requested:
fs_etpu_pwm_init (5,
FS_ETPU_PRIORITY_HIGH,
1000,
5000,
FS_ETPU_PWM_ACTIVEHIGH,
FS_ETPU_TCR1,
etpu_a_tcr1_freq);
The Freescale app note AN2849 for the eTPU PWM function advertises a supportedrange of 1Hz to 100KHz. The function does not return an error when called with 20Hz frequency.
Anyone have experience with this particular function?
Thanks