LPSPI -Transfer Complete Interrupt

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

LPSPI -Transfer Complete Interrupt

1,546件の閲覧回数
daniel_petrakaj
Contributor I

Good afternoon,

I am newbie in ARM world and I would like to kindly ask for help. I am using S32K148EVB-Q176. I would like to use LPSPI0 interrupt for complete transfer. I found  that I have to set TCIE bit in IER register to 1 to allow it. Unfortunately i do not know exact syntax how to write down, I would like to kindly ask for some example. Moreover I have no idea how to delete IRQ status flag after ISR routine

Thank you for your help

タグ(3)
0 件の賞賛
返信
2 返答(返信)

1,426件の閲覧回数
daniel_petrakaj
Contributor I

I tried to set it in this way

  LPSPI0-> IER = 0x200; //set TCIE to 1
  INT_SYS_InstallHandler(LPSPI0_IRQn, &LPSP0_ISR, (isr_t*) 0); // handler for ISR routine function

void LPSP0_ISR (void)
{

    PINS_DRV_SetPins(PTB, 1<<0U);
    PINS_DRV_ClearPins(PTB, 1<<0U);
    LPSPI0-> IER |= LPSPI_IER_TCIE_MASK ; //delete flag
}

It working partly, unfortunately than program always stop in LPSP0_ISR function in debugging mode. Please do you have idea what is wrong?

0 件の賞賛
返信

1,426件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Daniel,

You only need to clear the LPSPI_SR[TCF] flag by writing 1 to it (w1c) instead of the last line in the interrupt routine.

pastedImage_1.png

Regards,
Daniel

0 件の賞賛
返信