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
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)
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?
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.