2157054_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2157054_en-US

2157054_en-US

S32K144 MCAL 4.3 SPI W25QXX Communication Failure

NXP Team:

I am going to debug the SPI communication of S32K144, there is a little problem, SPI can send data, but there is no reply from the peripheral chip. SPI EB is as follows:
1. Port port configuration

Alex_Hua_1-1756001401305.png

Alex_Hua_0-1756001327940.png

2. Mcu clock using SOSC, bifurcated, 4 MHz

3. SPI Chanmel configuration:

Alex_Hua_3-1756001505548.png

4. external device configuration:

Alex_Hua_4-1756001554737.png

5. Phy Unit configuration:

Alex_Hua_5-1756001598830.png

6. SPI interrupt configuration:

Alex_Hua_6-1756001643702.png


Code in the S32DS project:

Alex_Hua_7-1756001756988.pngAlex_Hua_8-1756001805309.png

Alex_Hua_9-1756001860714.png


Other ways to verify:

1. Use STM32 to drive W25Q128 chip, can be used normally, to rule out chip problems

2. S32K144's SIN and SOUT are directly connected, and data is sent and received without any problem.

3. No other SPI peripheral chips are available for cross-validation.


I've tried various methods so far, but I'm still looking for guidance from the NXP team or other engineers.



Re: S32K144 MCAL 4.3 SPI W25QXX通信失败

You are right, CPHA is misconfigured. It's currently communicating on the peripheral

SPI_OK.png


Re: S32K144 MCAL 4.3 SPI W25QXX通信失败

Hi.

Please use a logic analyzer and compare the SPI waveforms of STM32 and S32K144. Configure the MCAL based on the waveforms of the STM32 successfully communicating.

Please check if the SPI mode configuration is the same:
SpiDataShiftEdge: TRAILING(CPHA=0) LEADING(CPHA=1)
ShiftClockIdleLevel: HIGH(CPOL=1) LOW(CPOL=0)


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION " button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

Tags (1)
No ratings
Version history
Last update:
‎11-20-2025 02:24 PM
Updated by: