Spi with DMA problems in S32K344 using design studio

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

Spi with DMA problems in S32K344 using design studio

1,035 Views
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.

 

Labels (1)
0 Kudos
Reply
1 Reply

1,013 Views
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 Kudos
Reply