FTM ISR

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FTM ISR

1,340 次查看
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.

标签 (1)
标记 (4)
0 项奖励
回复
1 回复

1,192 次查看
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 项奖励
回复