How to send the same value repeated times using SPI and DMA

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

How to send the same value repeated times using SPI and DMA

825 Views
tlifschitz
Contributor I

Hi everyone!

I am using Kinetis K64 and it's SDK. I need to send a value (16 bit in this case) repeated times (N) using SPI and DMA. Creating a buffer of N and filling it with the value and then using the "DSPI_MasterTransferEDMA" API would work, but I want to avoid it (creating the buffer).

 

I know that setting the correct values in the TCD of DMA it is possible to copy N times the same value (using a -2 minor loop offset for example), but I can't find the way to access the TCD using the SPI DMA driver (fsl_dspi_edma). 

Is there a straightforward way of doing this sticking to the transactional api mechanism?

 

Thank you very much!

Tobías

Labels (1)
0 Kudos
1 Reply

674 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

please refer to the demo in FRDM-K64F\boards\frdmk64f\driver_examples\edma\scatter_gather. It use TCD.

Regards

Jing

0 Kudos