S32k344 SPI Master Slave

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

S32k344 SPI Master Slave

跳至解决方案
5,924 次查看
JoDo
Contributor III

Hello,
I am trying to get the example "Lpspi_Ip_transfer_s32K344" to work.
I connected the two SPI channels together (LPSPI_0 = master, LPSPI_2 = slave) to do something like a loopback test.

First I tried the code from the example with DMA. But the master didn't get the right bytes:
TxSlaveBuffer ={0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
RxMasterBuffer = {0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00};

On the second try (without DMA or with synchronous transfer) the first 4 bytes were transferred correctly. The first 4 bytes I think due to the maximum available master RxBuffer in the controller.

I also tried to solve it simply with interrupts, but it seems that the SPI driver works in polling mode by default, at least I could not set it in the configuration.

Anyone could give me a hint?

Thanks!

0 项奖励
回复
1 解答
5,875 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Johannes,

Sorry to keep you waiting. I have received the feedback from AE team:

I have modified the example and can be able to run it normally. Please find it in attached file.
Thank you for your response. As far as I know, this issue has been fixed and the example will be ok in the next release.

Please notice the pins connection of your board. The test on my S32K3X4EVB REV A development board can pass.

Best Regards,
Robin

在原帖中查看解决方案

4 回复数
2,539 次查看
AbhishekK
Contributor III

Hello Robin ,

I  have downloaded and testing this example . and facing some error .as below 

 

SDK PlatformSDK_S32K3_2021_08_CD01_S32K344_M7_1.0.0_PATH is not found in workspace

 

Kindly help me with it .

If possible Provide me Example based on latest SDK .

AbhishekK_0-1739255639695.png

Thanks 

Abhishek

0 项奖励
回复
2,536 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Abhishek,

Let's discuss it in Regards Example Code Async SPI ON WB s32k344

0 项奖励
回复
5,876 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Johannes,

Sorry to keep you waiting. I have received the feedback from AE team:

I have modified the example and can be able to run it normally. Please find it in attached file.
Thank you for your response. As far as I know, this issue has been fixed and the example will be ok in the next release.

Please notice the pins connection of your board. The test on my S32K3X4EVB REV A development board can pass.

Best Regards,
Robin

5,847 次查看
JoDo
Contributor III

Hi Robin,

thank you very much for your efforts!


I also tested the example on my board and it works as expected.
Can you tell what was the problem?

Regards,

Johannes

0 项奖励
回复