S32K344 SPI data wrong

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

S32K344 SPI data wrong

跳至解决方案
1,352 次查看
IanHsueh
Contributor II

Hello NXP Team.

I tried configuring SPI, CPOL = 1 ,CPHA = 1.

The waveform is correct when i use 100K baudreate,

But when i use 1M baudrate, the waveform will be wrong.

Usually, data error will occur after the data pin maintains a high voitage for a long time.

Baudrate 100k

{BC7AB95C-0000-43AE-B266-63F0C802412B}.png

Baudrate 1M

123.png

The following is my project

Thank you

0 项奖励
回复
1 解答
1,333 次查看
RomanVR
NXP Employee
NXP Employee

Hello @IanHsueh.

I tested your project on my side without any modifications, connecting the MOSI to the MISO to verify if the data was transmitted correctly despite the analyzer's information. I successfully received in the buffer the correct data. Could you please do perform the same test? This will help us rule out any potential issues with the logic analyzer, as we have encountered problems with them when observing a data frame.

Also, let me know if the tests were done in a custom board or in one of our evaluation boards.

I will be waiting for your answer.

- RomanVR.

Best Regards!

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,269 次查看
IanHsueh
Contributor II

Hello @RomanVR ,after a few days of testing, i found that it seems to be a problem with the C code of main.c

1,257 次查看
RomanVR
NXP Employee
NXP Employee

Thank you for informing us that you've identified the issue.

If you have any further questions or encounter any other unresolved issues, please feel free to reach out.

- RomanVR.

Best Regards!
0 项奖励
回复
1,298 次查看
IanHsueh
Contributor II

Hello @RomanVR  ,thank for ur reply

I don't know how to connect MOSI to MISO to verify the data, is there any instructions?

And I'm running on this board.

20250302_203741.jpg

btw, I used the example on this webpage(used LSPI2, without dma), deleted the configuration, used 1M baudrate, and tested it. The waveform was correct.

Example S32K344 SPI Transmit & Receive Using DMA DS3.5 RTD500 - NXP Community

The following is an example of my modification. I compared the SPI and PORT settings and they are consistent. I don't know what went wrong with the project I created.

0 项奖励
回复
1,334 次查看
RomanVR
NXP Employee
NXP Employee

Hello @IanHsueh.

I tested your project on my side without any modifications, connecting the MOSI to the MISO to verify if the data was transmitted correctly despite the analyzer's information. I successfully received in the buffer the correct data. Could you please do perform the same test? This will help us rule out any potential issues with the logic analyzer, as we have encountered problems with them when observing a data frame.

Also, let me know if the tests were done in a custom board or in one of our evaluation boards.

I will be waiting for your answer.

- RomanVR.

Best Regards!
0 项奖励
回复
945 次查看
IanHsueh
Contributor II
I currently solved the problem, I cleared the RxBuffer
0 项奖励
回复