FTM ISR

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

FTM ISR

781件の閲覧回数
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)
0 件の賞賛
1 返信

633件の閲覧回数
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 件の賞賛