3.2.36. c11, DMA enable registers

The purpose of the DMA enable registers is to start, stop or clear DMA transfers for each channel implemented.

The DMA enable registers are:

The commands that operate through the registers are:

Stop

The DMA channel ceases to do memory accesses as soon as possible after the level one DMA issues the instruction. This acceleration approach cannot be used for DMA transactions to or from memory regions marked as Device. The DMA can issue a Stop command when the channel status is Running. The DMA channel can take several cycles to stop after the DMA issues a Stop instruction. The channel status remains at Running until the DMA channel stops. The channel status is set to Complete or Error at the point that all outstanding memory accesses complete. The Start Address Registers contain the addresses the DMA requires to restart the operation when the channel stops.

If the Stop command occurs when the channel status is Queued, the channel status changes to Idle. The Stop command has no effect if the channel status is not Running or Queued.

c11, DMA Channel Status Register describes the DMA channel status.

Start

The Start command causes the channel to start DMA transfers. If the other DMA channel is not in operation the channel status is set to Running on the execution of a Start command. If the other DMA channel is in operation the channel status is set to Queued.

A channel is in operation if either:

  • its channel status is Queued

  • its channel status is Running

  • its channel status is Complete or Error, with either the Internal or External Address Error Status indicating an Error.

c11, DMA Channel Status Register describes DMA channel status.

Clear

The Clear command causes the channel status to change from Complete or Error to Idle. It also clears:

  • all the Error bits for that DMA channel

  • the interrupt that is set by the DMA channel as a result of an error or completion, see c11, DMA Control Register for more details.

The Clear command does not change the contents of the Internal and External Start Address Registers. A Clear command has no effect when the channel status is Running or Queued.

Access in the Non-secure world depends on the DMA bit, see c1, Non-Secure Access Control Register. The processor can access these registers in User mode if the U bit, see c11, DMA User Accessibility Register, for the currently selected channel is set to 1. Table 3.111 lists the results of attempted access for each mode.

Table 3.111. Results of access to the DMA enable registers

U bit DMA bitSecure PrivilegedNon-secure PrivilegedSecure UserNon-secure User
ReadWriteReadWriteReadWriteReadWrite
00Undefined exceptionDataUndefined exceptionUndefined exceptionUndefined exceptionUndefined exceptionUndefined exceptionUndefined exception
1Undefined exceptionDataUndefined exceptionDataUndefined exceptionUndefined exceptionUndefined exceptionUndefined exception
10Undefined exceptionDataUndefined exceptionUndefined exceptionUndefined exceptionDataUndefined exceptionUndefined exception
1Undefined exceptionDataUndefined exceptionDataUndefined exceptionDataUndefined exceptionData

To access a DMA Enable Register set the DMA Channel Number Register to the appropriate DMA channel and write CP15 with:

For example:

MCR p15, 0, <Rd>, c11, c3, 0    ; Stop DMA Enable Register
MCR p15, 0, <Rd>, c11, c3, 1    ; Start DMA Enable Register
MCR p15, 0, <Rd>, c11, c3, 2    ; Clear DMA Enable Register

Debug implications for the DMA

The level one DMA behaves as a separate engine from the processor core, and when started, works autonomously. When the level one DMA has channels with the status of Running or Queued, these channels continue to run, or start running, even if a debug mechanism stops the processor. This can cause the contents of the TCM to change while the processor stops in debug. To avoid this situation you must ensure the level one DMA issues a Stop command to stop Running or Queued channels when entering debug.

Copyright © 2004-2009 ARM Limited. All rights reserved.ARM DDI 0333H
Non-Confidential