How to configure channels 1-7 of FTM0 under PPG mode using Processor Expert

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

How to configure channels 1-7 of FTM0 under PPG mode using Processor Expert

1,482 Views
Designer11
Contributor IV

Hi,

I'm able to configure FTM0 channel 0 to work as PPG, PpgLdd1:PPG_LDD in Processor Expert of the K64 demo board. However, i don't know how to configure the remaining channels of  FTM0 to output PWM. In my use case, only one channel of the timer will be active at a giving time and it needs the ability to change either the frequency or duty cycle at run time. I tried to enable clock configuration 1-7 of FTM0, but the option is grayed out. I also understand that you can't assign multiple channels of the same timer due to the the FTM counter being active.

However, since, i only need one channel to be active at a giving time can i let's say enable channel 0 to finish a giving task then disable it. Next, enable channel 1 to perform another task then disable it, and enable the next channel etc...

Best Regards,

D

Labels (1)
0 Kudos
Reply
5 Replies

1,262 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

When you have configured FTM0 channel 0 to work as PPG, you can't add other channels of FTM0 to work as PPG anymore.
Only one (channel)PPG_LDD for each FTM module is allowed to configured. The PPG cannot be shared on one timer because of the functionality of the FTM device. The PPG_LDD component provides changing of signal frequency and the change is done by using the FTM counter that is shared by all channels.

"Only one channel of the timer will be active at a giving time and it needs the ability to change either the frequency or duty cycle at run time."
All the channels of one FTM module must have the same frequency. I am not sure if change frequency of all channels is acceptable.

Best Regards,

Robin

0 Kudos
Reply

1,262 Views
Designer11
Contributor IV

Hi Robin,

Thank you for the reply. My follow up question Is there a way to actually enable channels 0,2 and 3  in FTM 0  to have the pwm signals present on those pins ? 

Thanks

0 Kudos
Reply

1,262 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

You can configure these pin mux as FTM function through "Pins1:PinSettings". (The Pins1_Init is generated in Pins1.c after enabled.)
If you want FTM 0  to have the pwm signals present on those pins, manually configured channel registers in PPG1_Init function. You need right click "PPG1:PPG_LDD" configure "Code Generation", otherwise the Processor Expert will overwrite the code that you write. See below:

PPG_LDD PWM.png

Best Regards,

Robin

0 Kudos
Reply

1,262 Views
Designer11
Contributor IV

Hi Robin,

Thanks. I will give that a try and report back.

BR,

0 Kudos
Reply

1,262 Views
Designer11
Contributor IV

I then manually configured the remaining pins to be FTM output. But they still no pwm output on the channels that were forced to output pwm. Below are screen captures of the configurations.

pastedImage_1.png

pastedImage_2.png

0 Kudos
Reply