This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C5515 CSL 2.10 - Questions about DMA configuration

I'm having problems figuring out what some of the configuration parameters for DMA controller mean.  Could I get some help here?  The supplied documentation is not very clear.  I'm modifying the PingPong example which will be moving data between peripheral and memory, instead of memory to memory.

I'm modifying the dmaConfig structure, but I'm running into some problems because I'm not sure what some of the parameters are doing and they don't seem to map back to the DMA configuration registers as described in the DMA PRG.  Can someone clarify these elements?

dmaConfig.trigger: Is this the same as the Sync bit in the Transfer Control register?

dmaConfig.chanDir:  What does this mean?  The api_reference.chm doc simply says reading or writing to a device.  Every DMA transfer contains a src read and dst write.  Does device mean peripheral?  This is not at all clear.

dmaConfig.trfType: The options are MEMORY or IO_MEMORY.  I am assuming that IO means a peripheral, but not sure.  Can someone verify?

If you every have a need to make big revisions to the CSL could you please make definitions more detailed and clearer. Also,make CSL configuration options more closely match the PRG wording so making modifications wouldn't be so time consuming.

Thanks.

  • Hi Tommy,

    dmaConfig.trigger is same as the Sync bit in the DMA Transfer control register. Need to check why the name is trigger.

    dmaConfig.chanDir specifies the direction with respect to peripheral.  Write means writing data to a peripheral data registers. Read means reading data from a peripheral data register. Every DMA transfer contains a source read and destination write when DMA internal operation is considered. But from the user perspective it is always writing some data to peripheral and reading some data from peripheral during IO transfers. Direction is specified here to avoid the increment and fixed address mode confusion. Users will be very clear on whether they want to write to a peripheral or read from a peripheral but increment and fixed address mode configuration may be little confusing.

    dmaConfig.trfType: In the IO_MEMORY option IO refers to the peripheral.

    Pratap.

     

  • Pratap,

    Thanks for the explanation.  That clarifies most things.  Still not sure on what do you do with dmaConfig.chanDir when I need to do a memory to memory transfer?

    Regards.

  • Tommy,

    dmaConfig.chanDir will be don't care in case of memory to memory transfers.

    Pratap.

  • Pratap,

    Thanks for the explanation.  Hopefully, this can be added to future documentation as it is a little confusing right now.

    Regards.