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.

RM48 DMA current channel status

Other Parts Discussed in Thread: HALCOGEN

I'm using RM48L952ZWT.

I want to get a current status (source address, destination address and transfer count) in the DMA that is running in the multiple channel.

In the "dma.h" created by HALCoGen, the structure WCP seems to point the current status registers.

Can the current status of the each channel in the DMA  be obtained by using them?

dmaRAMREG->WCP[ch].CSADDR

dmaRAMREG->WCP[ch].CDADDR

dmaRAMREG->WCP[ch].CTCOUNT

Best Regards,

Satoshi Shinohara

  • Hi Satoshi,
    You might have searched the forum and realize that reading the WCP is not a reliable way to find the current status of a DMA channel. The reason is that the WCP is only updated after an arbitration with another channel. If there is no arbitration then there is no saving of the context to the WCP. For example, if you have two channels active, A and B. These two channels will arbitrate for the bus bandwidth. When channel A is arbitrated out, its context is first saved to the WCP. If you read the WCP then you will find its current status. When the channel A is arbitrated in again, the DMA state machine reads the WCP to see where it left off last time and continues from where it left off. Let's say channel A has a 3 elements left to transfer. The DMA will just finish off these last 3 elements and never update the WCP again for channel A. So if you read WCP for channel A it always has 3 elements left to do. Now back to channel B. Since channel B is only active channel there is no need to update the WCP anymore. If last time the WCP for channel B indicates there are still 100 elements to do it will remain 100 when you read even though channel B will sooner or late complete all its transfer.

    You might find this post helpful too. e2e.ti.com/.../2000836
  • Charles-san,

    Thank you so much.

    Some information is updated from a year ago.

    Best Regards,

    Satoshi Shinohara