FTM0 PWM output on CH0 and FTM0 Interrupt on the same channel

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

FTM0 PWM output on CH0 and FTM0 Interrupt on the same channel

1,490件の閲覧回数
Fede
Contributor I

Hi to everyone,

I'm working with S32K32118 EVB and S32DS.3.5

Through S32 configuration tool, I've created a PWM waveform on FTM0, CH0.

I wonder if is possible to get an interrupt/callback for every rising or falling edge of the PWM (or at least when a new period is starting/ended) without adding/using FTM1 module and other channels.

Thanks, Federico

 

0 件の賞賛
返信
3 返答(返信)

1,468件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @Fede 

Every FTM channels have an interrupt that you can enable whit the register Channel(n) Status And Control (C0SC - C7SC) bit 6(CHIE). So it is not necessary to configure another FTM.

I suggest you take a look at section 47.5.4(Channel Modes) onwards of the reference manual and the application note: Features and Operation Modes of FlexTimer Module on S32K.

 

B.R.

VaneB

1,445件の閲覧回数
Fede
Contributor I

Hi VaneB,

thank you for your support. My mistake: I wasn't deleting correctly the Interrup flag inside the interrupt handle routine. Now I can see the correct behaviour of the Interrupt. 

Regards, Federico 

0 件の賞賛
返信

1,438件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @Fede 

Thanks for the feedback, if you have any problem let me know.

0 件の賞賛
返信