S32k SPI using Interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32k SPI using Interrupt

453 Views
Adhi_11
Contributor I

Hello for my student project, i need to communicate with an RF chip using SPI. I used the polling method, mentioned in the cookbook examples to build my code. Unfortunately, this is not efficient and i am getting wrong results in continuous run. Is there any examples available on SPI Interrupt non-SDK. I enabled the IER in SPI for  RDIE and TDIE, but is a little bit confused regarding the definition of the handler, so i used only RDIE, but it was not working properly. I need to read 2 bytes in the recieve for getting the result. Attached code below for reference. *Sorry its incomplete due to some modifications. Kindly help me.

Tags (1)
0 Kudos
1 Reply

438 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Adhi_11,

Unfortunately, we don't have an LPSPI Interrupt non-SDK example.

 

I don't see any interrupt handler in the project.

Also, it seems like you did not enable the interrupt in NVIC.

You can refer to the UART example:

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K116-LPUART-LIN-Slave-TXRX-ISR-S32DS-ARM...

 

There is only one handler for each module.

danielmartynek_0-1669635430658.png

You need to read the flags in that handler.

 

Regards,

Daniel

 

0 Kudos