S32K344 SPI data wrong

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

S32K344 SPI data wrong

ソリューションへジャンプ
1,357件の閲覧回数
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,338件の閲覧回数
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,274件の閲覧回数
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,262件の閲覧回数
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,303件の閲覧回数
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,339件の閲覧回数
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 件の賞賛
返信
950件の閲覧回数
IanHsueh
Contributor II
I currently solved the problem, I cleared the RxBuffer
0 件の賞賛
返信