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.

Hercules (RM46L852) stopping DMA, how to know when active transfer has stopped.

Hi folks,

Came up in discussion with customer that from where/how can you recognize  when you stop DMA channel (or whole DMA), that if the channel was active right at time of stopping when the actual transfer has been stopped. Can it be recognized by polling from DMASTAT register until channel is 0? As based on TRM info transfer will not stop immediately but on next arbitration boundary. So how to recognize when this happens?

There is little bit this kind of discussion at  but left bit open from this point of view.

Br,

  Jani

  • I have asked Anthony to look at this because he was involved in the earlier thread.
  • Jani Okker said:
    recognize  when you stop DMA channel (or whole DMA), that if the channel was active right at time of stopping when the actual transfer has been stopped.

    Is it possible to rephrase the question to be simpler?

    Asking 'if A' occurs exactly at the same time as 'B' isn't something we're going to be able to answer.

    If the question is more like  'after stopping the DMA'  ... 'how can I check that there are no more transfers from that channel in flight' maybe we can answer.

    But asking if two things occurred in the past simultaneously.. will be almost impossible to answer.

  • HI Anthony,

    Sorry for bit unclear wording. The question was meant to be exactly like you phrased:

    'after stopping the DMA how can I check that there are no more transfers from that channel in flight'

    Br,

      Jani

  • Hi Jani,

    I think it's a safe assumption that HWCHENA shows '0' and then DMASTAT also shows '0' there are no more DMA transactions from that channel in flight at least inside the DMA.

    The first means no more transfers from the channel would go to the port to be executed, the 2nd means no transfers from the channel are still in the port being executed.