The SPI sending data of the S32K344 is abnormal

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

The SPI sending data of the S32K344 is abnormal

Jump to solution
946 Views
shunyizhang
Contributor IV

shunyizhang_0-1702975792374.png

The green is MOSI and the purple is SCK

SPI:lpSPI5

SCK:PTD14

MOSI:PTE9

MISO:PTD13

CS:PTD17

I periodically sent a 0x5a data, see the oscilloscope image, found that the MOSI pin first pull up two bits of time before the correct data transmission, why? In order to find the problem, I removed the SPI peripheral device, and the abnormal waveform still exists (even removed the SCK/MOSI pull-up resistance), so the problem is most likely in the MCU itself.

shunyizhang_1-1702976407067.png

 

shunyizhang_2-1702976439198.png

 SPI init:

    /* Configure pins */
     Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);
//初始化SPI5
Lpspi_Ip_Init(&Lpspi_Ip_PhyUnitConfig_SpiPhyUnit_5_Instance_5);
    /* Update Transfer Mode */
    Lpspi_Ip_UpdateTransferMode(spiNum, LPSPI_IP_POLLING);
 
send data:
 
Lpspi_Ip_SyncTransmit(&Lpspi_Ip_DeviceAttributes_SpiExternalDevice_5_Instance_5, &data, &RxBuffer[eSPI5], 1, 10000);

 

0 Kudos
Reply
1 Solution
876 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@shunyizhang

I will confirm with my AE colleagues whether the tASC parameter can be changed (of course I think you can control the state of the MISO pin yourself after the transmission is completed), and I don’t think this will affect your SPI communication.

Senlent_0-1703146819808.png

 

View solution in original post

0 Kudos
Reply
4 Replies
894 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@shunyizhang

please double check your setting

MOSI:PTE9

MISO:PTD13

-------------------------------------------------------------------------------------------------------------------------

below is my test process , i don't see any problem

Senlent_0-1703128792884.png

Senlent_1-1703128831066.png

Senlent_2-1703128856791.png

 

0 Kudos
Reply
892 Views
shunyizhang
Contributor IV

shunyizhang_1-1703129727415.png

Comparing my pictures, it seems that your pictures and mine also have raised parts, I am not sure if this part is normal.

 

0 Kudos
Reply
877 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@shunyizhang

I will confirm with my AE colleagues whether the tASC parameter can be changed (of course I think you can control the state of the MISO pin yourself after the transmission is completed), and I don’t think this will affect your SPI communication.

Senlent_0-1703146819808.png

 

0 Kudos
Reply
873 Views
shunyizhang
Contributor IV

Ok,thanks!

0 Kudos
Reply