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.

How to stop AB synchronized EDMA transfer?

How to stop AB synchronized EDMA transfer?

Hi,

How should we stop an ongoing EDMA3’s AB synchronized transfer?

For example, if we write into the PaRAM set associated with “SPI0 Receive, event 14”, see <Table 5-14. EDMA Synchronization Events, SPRS586C>:

ACNT=1, BCNT=65535

And if we use SPI0 receive external signal from a SPI0 master, therefore for every reception 1 (ACNT) byte will be transferred, until BCNT decremented to 0.

However, because L138 act as SPI0 slave in this situation, we have no control over when the “SPI0 Receive, event 14” even will happen. And once we have started the AB synchronized transfer, it would behave like a non-stopping wheel responding to each input SPI0 data.

How can we stop the AB-synchronized transfer? Should we:

  1. Directly overwrite PaRAM set with new values, such as BCNT->0?
  2. Disable event 14 first by writing to bit 14 of ”8.4.2.5.6 Event Enable Clear Register (EECR)”, then writing new values (including ACNT, BCNT, etc.) to PaRAM?

 

Paul