You are here

SPI (master) doesn't transmit DMA data | Cypress Semiconductor

SPI (master) doesn't transmit DMA data

Summary: 2 Replies, Latest post by HIMA on 16 Sep 2015 03:47 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
Binka Puss's picture
1 post

Good afternoon all!

I'm new to these forums, so hopefully this is the right place to ask for some guidance from the pSoC experts :)

I'm attempting to use the DMA engine to transfer data from the digital filter block to an external DAC using the SPI (configured as master mode).  I've connected the DFB's DMA_Req_B output to the DMA drq input and verified that the DMA does transfer the desired data correctly if I target an SRAM memory location.

If I attempt to direct data to the SPI FIFO however, the interface remains quiet and the status bits reflect the FIFO is empty at all times (just as though the data isn't making it to the FIFO at all).  The following code snippet shows my configuration:

// Filtered values -> DAC (via SPI)
DMA_DAC_TD = CyDmaTdAllocate();
CyDmaTdSetAddress(DMA_DAC_TD, LO16((uint32)OUTPUT_FILTER_HOLDBM_PTR), LO16((uint32)SPI_TXDATA_PTR));
CyDmaChSetInitialTd(DMA_DAC_Chan, DMA_DAC_TD);
CyDmaChEnable(DMA_DAC_Chan, 1);

The DMA's nrq output toggles after every instant I'd *expect* a transfer to have occurred, but still no SPI data appears.  I've tried many permutations of SPI buffer address, pointer etc, but haven't found a combination that works.  DMA writing to a global variable in SRAM is OK, though.

The SPI interface seems to be correctly configured - manually dropping a word into the buffer via:


works OK.

Does anyone have any idea what I'm missing?  It's driving me crackers!

Cheers :)




user_14586677's picture
7646 posts

Take a look at -      CE56273 – SPI With DMA in PSoC® 3 / PSoC 5                                             AN52705     Getting Started with DMA                          AN84810     PSoC® 3 and PSoC 5LP Advanced DMA Topics                AN61102 PSoC® 3 and PSoC 5LP - ADC Data Buffering Using DMA     Videos on DMA Videos on DMA (some overlap)


Regards, Dana.

HIMA's picture
Cypress Employee
169 posts


Please let us know what is width of databytes for the SPI?



Log in to post new comments.