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,470 次查看
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,448 次查看
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,425 次查看
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,418 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @Fede 

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

0 项奖励
回复