Generate PWM of frequency 12.28 Mhz using the FTM in the S32k144 microcontroller

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

Generate PWM of frequency 12.28 Mhz using the FTM in the S32k144 microcontroller

337 Views
mahesh123
Contributor I

Hello 
I am using the nxp s32k144 controller board. I need a 12.28 MHz PWM. 
Initially I went from SDK example of FTM. 
I have change the PWM frequency in FTM SDK example for Peripheral

mahesh123_0-1732908023811.png

mahesh123_1-1732908053589.png

mahesh123_2-1732908085453.png


My question are
1. what is the process to find out the generating PWM frequency? Can you provide one example to explain?
2. If I put 6.144Mhz in PWM Frequency of FTM PWM independent configuration (as mention in peripheral snap) then I got ~ 6.85 MHz frequency, If I put 12.28 MHz Frequency in PWM Frequency of FTM PWM independent configuration (as mention in peripheral snap) then I got 16 MHz at output side.
so what are the step to be fallow to generate a particular frequency with less tolerance limit?
3. is there other way to generate a PWM frequency of 12.28MHz in s32k144?
4. also check the clock diagram where I can be modified the factor so that I can get PWM of 12.28 MHz frequency 

 

Tags (4)
0 Kudos
Reply
1 Reply

299 Views
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

For PWM frequency of 12.28MHz with FTM clock frequency of 48MHz you need 3.9 ticks:
1s -> 48MHz (48,000,000 ticks)
12.28MHz = (1/12,280,000)s
->48,000,000 *(1/12,280,000) = 3.90 ticks

As you can see, setting a PWM frequency too high for FTM clock frequency leaves you with little resolution for duty cycle. Additionally, you cannot manage decimal numbers for ticks. What you can do is increase the clock frequency and set an appropriate frequency for integer ticks.

Hope it helps you.

Have a nice day!

0 Kudos
Reply