Spi with DMA problems in S32K344 using design studio

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

Spi with DMA problems in S32K344 using design studio

1,036件の閲覧回数
Rmpr
Contributor II

Hello,

I'm having problems sending an array with lpspi using dma.

I'm trying to send this array 5 times:

 

 

uint8 TxMasterBuffer[NUMBER_OF_BYTES] = {0xA5, 0xA5, 0x6, 0xA5, 0x7};
for(int i = 0; i<5; i++){
    	Lpspi_Ip_AsyncTransmit(&SPI_EXTERNAL_DEVICE, TxMasterBuffer, RxMasterBuffer, NUMBER_OF_BYTES, Lpspi_Ip_Callback);
    }

 

 

 

The problem is that it only send one time the array. When I debug it changes the received buffer but in oscilloscope I can only see one message.

 

Is it a problem with configuration or the dma can't support this operation? I'm using the lpspi RTD's.

 

ラベル(1)
0 件の賞賛
返信
1 返信

1,014件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi 

Do not call Lpspi_Ip_AsyncTransmit so frequently. Otherwise, I think the next few calls of Lpspi_Ip_AsyncTransmit cannot return LPSPI_IP_STATUS_SUCCESS.

Please call Lpspi_Ip_AsyncTransmit again in LPSPI_IP_EVENT_END_TRANSFER of Lpspi_Ip_Callback.


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 件の賞賛
返信