LPSPI-DMA-SDK S32K144

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPSPI-DMA-SDK S32K144

2,267 次查看
KARTHKSARODE
Contributor III

Hi 

https://community.nxp.com/t5/S32K/Implementing-LPIT-DMA-SPI-for-UJA1169TK-F-in-S32K144/m-p/1430149#M...

I was trying to implement the above implementation with the help of SDK(V3.0.0) for S32K144

I could manage to configure 2 DMA channels and link it with Tx & Rx of LPSPI 

Once I start both the DMA channels , It is hitting Default ISR and throwing error as shown below

KARTHKSARODE_0-1647943352090.png

But the Tx & Rx is working perfectly , I can see the expected received value in array 

KARTHKSARODE_1-1647943489865.png

I'm not sure , what's causing an interrupt , help me out 

I have attached the project for the reference , Let me know if there is an issue 

Best Regards
KARTHIK SV
标记 (4)
0 项奖励
回复
2 回复数

2,241 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

why do you add code for DMA channels init? If DMA mode is selected for LPSPI transfer all init is done when calling LPSPI_DRV_MasterTransfer function. See code for LPSPI_DRV_MasterStartTransfer function. And in fact you wrote transfers are done.

BR, Petr

0 项奖励
回复

2,226 次查看
KARTHKSARODE
Contributor III

Hi @PetrS 

Thanks for the response , Now I understood that there are 2 ways to implement LPSPI DMA SDK 

  1. Using the DMA APIs for LPSPI TDR & RDR register - Transfers are happening but in the end , it is hitting ISR(Not able to understand the cause of the issue)
  2. Using the LPSPI transfer API
    • LPSPI_DRV_MasterTransfer - Working perfectly fine , without any issues
    • LPSPI_DRV_MasterTransferBlocking - Program is getting stuck in OSIF_SemaWait , from few post from NXP community , I understood the issue is because of freertos

In all the 3 methods transfers is happening perfectly , but 1st method is having issue of some interrupt 
Please help me to solve that issue

Best Regards
KARTHIK SV
0 项奖励
回复