S32k144 PWM configuration for different frequencies

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

S32k144 PWM configuration for different frequencies

873 Views
aditya_barve
Contributor II

Hello,

Is it possible to get two different frequencies say 100Hz and 200Hz from a single FTM module say FTM1 with Ch0 and Ch1.

Controller: S32K144 (64 pin package)@

Thank you,

Aditya

Tags (1)
1 Reply

690 Views
nxa27462
NXP Employee
NXP Employee

Hello Aditya,

Since there is only 1 counter for each FTM module so 2 PWM channels in 1 FTM have same frequency in typical. This is the case we need full PWM capability channels. If we need only something like frequency generator, we can configure

  • counter with 100Hz frequency
  • channel 0 operates in Output Compare mode, toggle output on matching
  • channel 1 operates in normal PWM mode, dutycycle = 50%

Finally, software PWM can be used if frequency is low and pulse width is big enough. Channel should be configured in output compare mode. In matching ISR, Cv is recalculated and write again.

Best regards

Lam