SPI doesn't work in custom project

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

SPI doesn't work in custom project

1,197 次查看
simon98
Contributor IV

Hi,

I'm working on my project with S32K358 that has to communicate with FS26 via SPI.

I tried the SPI async example provided by NXP on S32K3X8EVB-Q289 working correctly.

I've copied the configuration (.mex) done on the EVAL project into my personal project that i've been working on, but when i try to send one byte nothing happens on my board.

Comparing the generated code in both projects nothing seems to be different except for the other modules configured.

I've also read the SPI registers in both projects and they are different (see screenshot attached) .. i don't know why because the code generated in both projects seems to be the same...

I don't know how to going farward.

I attach the eval prj into a zip folder... inside there is the SPI block that's the same in my project.

I also attach my project.

 

Thanks 

Simon

标记 (5)
0 项奖励
回复
2 回复数

1,150 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @simon98 

To rule out any issues related to other configurations in your project, try creating a simplified test project that includes only the SPI functionality. This will help you verify whether the SPI is working correctly.

 

BR, VaneB

0 项奖励
回复

1,193 次查看
rebecca65bell
Contributor I

Hi,

I'm working on my project with S32K358 that has to communicate with FS26 via SPI.

I tried the SPI async example provided by NXP on S32K3X8EVB-Q289 working correctly.

I've copied the configuration (.mex) done on the EVAL project into my personal project that i've been working on, but when i try to send one byte nothing happens on my board Cat Translator App

Comparing the generated code in both projects nothing seems to be different except for the other modules configured.

I've also read the SPI registers in both projects and they are different (see screenshot attached) .. i don't know why because the code generated in both projects seems to be the same...

I don't know how to going farward.

I attach the eval prj into a zip folder... inside there is the SPI block that's the same in my project.

I also attach my project.

 

Thanks

Simon

When facing SPI issues with S32K358, where generated code is identical but registers differ and no transmission occurs, focus on clocking and pin muxing—ensure the SPI module is enabled with correct clocks and pins are configured for SPI functionality. Debug by comparing initialization sequences, checking function return values, and using an oscilloscope to verify SCK, MOSI, and CS signals. The differing register values are key: investigate if another module is reconfiguring SPI or if the SPI initialization itself isn't completing successfully in your project. Providing your project files would allow for a detailed analysis.

0 项奖励
回复