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

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

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

1,531 Views
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 Kudos
Reply
3 Replies

1,509 Views
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,486 Views
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 Kudos
Reply

1,479 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Fede 

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

0 Kudos
Reply