How many PPG components can I use per timer?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How many PPG components can I use per timer?

1,148 Views
daveboyle
Contributor III

Hi, I'm using KDS 3.0 with a FRDM-K64F. I need to put 6 PPG components into my project and I'm hoping I can use 6 channels of a single timer. But the compiler is complaining. Is it possible to use several PPG components with one Timer Unit? One per channel? Or must I use one timer per PPG? That would mean I am limited to 4 ppg's per chip but I need 6.

Labels (1)
0 Kudos
5 Replies

808 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

hello Dave,

one advantage of PPG component is that it can set channel output period.

for example FTM0 has 8 channel. once 1 channel output period is changed.  other 7 channels output period are changed to the same.

so from my understanding, there is no sense to set several PPG for one FTM0. i don't think it's possible.

however, we can set several PWM component for one FTM. 8 channel FTM can hold 8 PWM components which are the same period.

does this answer your question?


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

808 Views
daveboyle
Contributor III

I was afraid of that. I have 6 pwm components from one timer but I need to make small adjustments to their period at run time. I'm making a motor drive for a 3-phase pmsm motor that has to be synchronous with the ac line frequency. The ac line is defined as 60hz but in reality it's anywhere from 59 to 61hz. Is there any way I can make small changes to the period of the pwm components at run time? Perhaps by changing a register in the timer?

0 Kudos

808 Views
daveboyle
Contributor III

Is it possible to take one 8 channel timer, set channel 0 as a ppg, and the next 6 channels as pwm's? That way I could change the frequency of the ppg and all the pwm's would change at the same time. So far I haven't been able to configure this, if you know it won't work then I won't try.

My other scenario is to take 3 timers, set them all as ppg, route the 3 to one set of bit io's on the positive half cycle, and to a different set of 3 bit io's on the negative cycle. I think that will work ...

0 Kudos

808 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

I got confirmation from Processor expert team expert on your question:

"

The PPG cannot be shared on one timer because of the functionality of the FTM/TPM device. The PPG component provides changing of signal period and the change is done by using the FTM/TPM counter that is shared by all channels. This is the reason why the PPG components cannot share one FTM/TPM device (the FTM/TPM device is allocated by the TimerUnit_LDD).

"


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

808 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I just got another feedback from processor expert team:

"

This combination  (take one 8 channel timer, set channel 0 as a ppg, and the next 6 channels as pwm's) is not possible too. The PPG allocated the whole timer device because the PPG change the period of the signal (it uses the counter that is shared by all channels).

"


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos