FTM ISR

cancel
Showing results for 
Search instead for 
Did you mean: 

FTM ISR

243 Views
antperlag1
Contributor I

Hello,

I am doing a project using S32K144 EVB. I am using S32DS with SDK functions. I want to generate a interruption if a rising edge occurs in a FTM_PWM channel. I don't know how to do it. Could anyone help me?

Thanks.

Labels (1)
0 Kudos
1 Reply

95 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Antonio Pérez Laguarda

There is an example code of ftm_perioduc_interrupt in the SDK of the S32DS, you can use this code as reference and add the lines needed for the ftm_pwm example code also included in the SDK. you need to check the CHIE bit in the reference manual.

FTM_DRV_EnableInterrupts(INST_FLEXTIMER_PWM1, FTM_CHANNEL0_INT_ENABLE | FTM_CHANNEL1_INT_ENABLE);

INT_SYS_InstallHandler(FTM0_Ch0_Ch1_IRQn, &ftmTimerISR, (isr_t*) 0);
INT_SYS_EnableIRQ(FTM0_Ch0_Ch1_IRQn);

Hope this helps

Best regards

0 Kudos