The SPI sending data of the S32K344 is abnormal

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

The SPI sending data of the S32K344 is abnormal

ソリューションへジャンプ
2,135件の閲覧回数
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 件の賞賛
返信
1 解決策
2,065件の閲覧回数
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 件の賞賛
返信
4 返答(返信)
2,083件の閲覧回数
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 件の賞賛
返信
2,081件の閲覧回数
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 件の賞賛
返信
2,066件の閲覧回数
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 件の賞賛
返信
2,062件の閲覧回数
shunyizhang
Contributor IV

Ok,thanks!

0 件の賞賛
返信