S32k144 PWM configuration for different frequencies

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32k144 PWM configuration for different frequencies

1,107件の閲覧回数
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

タグ(1)
1 返信

924件の閲覧回数
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