S32k SPI using Interrupt

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

S32k SPI using Interrupt

716件の閲覧回数
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.

タグ(1)
0 件の賞賛
返信
1 返信

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