S32K312 SPI+DMA

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
879件の閲覧回数
sergiverdaguerelausa
Contributor II

Hi all,

I have an SPI working at 4.8bps using DMA. The issue is that during transmission, gaps of 3.3us appear between bytes:

sergiverdaguerelausa_0-1690802553552.png

 

 

 

The SPI clock should work at 80MHz, and the DMA at 160MHz, so I don't understand why this delay appears between bytes.

Configuration:

sergiverdaguerelausa_1-1690802553571.png

 

sergiverdaguerelausa_2-1690802553580.png

 

sergiverdaguerelausa_3-1690802553603.png

 

sergiverdaguerelausa_4-1690802553641.png

Code:

/* Initalized clock */
Clock_Ip_Init(&Clock_Ip_aClockConfig[0]);

/* Initalized pin */
Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);
/* Initialize interrupt */
IntCtrl_Ip_Init(&IntCtrlConfig_0);
IntCtrl_Ip_ConfigIrqRouting(&intRouteConfig);

/* Initialize DMA IP} Driver */
(void)Dma_Ip_Init(&Dma_Ip_xDmaInitPB);

/* Initalized spi using instance lpspi as a spi master */
Lpspi_Ip_Init(&Lpspi_Ip_PhyUnitConfig_SpiPhyUnit_0_Instance_0_BOARD_InitPeripherals);

/* Master transmits data by async method with DMA */
Lpspi_Ip_AsyncTransmit(&MASTER_EXTERNAL_DEVICE, u8_frame_reset, NULL, sizeof(u8_frame_reset), spi_callback);

 

I am using S32K312EVB-Q17

Thank you in advance!

 

Sergi

 

0 件の賞賛
1 解決策
852件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Sergi,

Would you please decrease the value of SpiTimeClk2Cs SpiTimeCs2Clk SpiTimeCs2Cs and measure the waveform again?

SpiTimeClk2Cs SpiTimeCs2Clk SpiTimeCs2Cs.png

If still not work, please let me know the version of S32DS\S32K3 RTD, or attached your test project.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" 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 question at a later point in time.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
853件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Sergi,

Would you please decrease the value of SpiTimeClk2Cs SpiTimeCs2Clk SpiTimeCs2Cs and measure the waveform again?

SpiTimeClk2Cs SpiTimeCs2Clk SpiTimeCs2Cs.png

If still not work, please let me know the version of S32DS\S32K3 RTD, or attached your test project.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" 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 question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
836件の閲覧回数
sergiverdaguerelausa
Contributor II

Hi Robin,

 

Thank you very much. I attach an screenshot with the new timmings:

sergiverdaguerelausa_0-1690868811570.png

And the new configuration:

sergiverdaguerelausa_1-1690868849815.png

Now works as I expected.

 

Bes regards,

 

Sergi

 

 

0 件の賞賛