This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

pl330 scatter-gather transfer

I work on zynq 7000 soc whose the DMA component is the pl330.
I am trying to do a "scatter-gather" dma transfer, in a channel thread by programming the debug instruction registers via the APB bus.
For example, I load from the source, an entire bloc of 64 bytes using one DMALD instruction.
After that, I would like to scatter the data in a custom mapping in the destination buffer.
For that I use DMAADDH/DMADNH before DMAST instructions.

Let's take an simple example :

DMAMOV SAR ... ;; address aligned on 64 bytes
DMAMOV DAR ... ;; address aligned on 64 bytes
DMAMOV CCR SB8 SS8 DB1 DS32 ;; with src_inc = 1 and dst_inc = 1

DMALD
DMAST ;; store one 32b word
DMAST ;; store the second 32b word
DMAADDH DAR, 4
DMAST ;; KO : this word is not stored and an error occurs
DMAWMB
DMASEV e3
DMAEND


My problem is the third word is not stored and the DMAC raise the error "st_data_unavailable" (bit 13 in the XDMAPS_FTCx_OFFSET register).

The third store works if the offset added to the destination address is a multiple of 8 : DMAADDH DAR, 8 is ok for example.

I think something is unclear for me about mfifo usage.

Thank you for your help.