2.5. DMA

The RP2040 Direct Memory Access (DMA) controller has separate read and write master connections to the bus fabric, and performs bulk data transfers on a processor's behalf. This leaves processors free to attend to other tasks, or enter low-power sleep states. The data throughput of the DMA is also significantly higher than one of RP2040's processors.

Figure 12. DMA Architecture Overview.
The read master can read data from some address every clock cycle. Likewise, the write master can write to another address. The address generator produces matched pairs of read and write addresses, which the masters consume through the address FIFOs. Up to 12 transfer sequences may be in progress simultaneously, supervised by software via the control and status registers.

Figure 12: DMA Architecture Overview. The diagram shows the internal components of the DMA controller. On the left, 'From System' and 'To System' labels indicate data flow. The 'AHB-lite Read Master' (yellow box) receives data from the system and sends it to the 'Transfer Data FIFO' (blue box). The 'AHB-lite Write Master' (yellow box) receives data from the 'Transfer Data FIFO' and sends it to the system. The 'Address Generator' (purple box) sends addresses to the 'Read Address FIFO' (blue box) and the 'Write Address FIFO' (blue box). The 'Read Address FIFO' feeds into the 'AHB-lite Read Master', and the 'Write Address FIFO' feeds into the 'AHB-lite Write Master'. The 'Address Generator' is connected to 'Control/Status Registers' (blue box), which in turn connects to the 'AHB-lite Slave Interface' (blue box).
Figure 12: DMA Architecture Overview. The diagram shows the internal components of the DMA controller. On the left, 'From System' and 'To System' labels indicate data flow. The 'AHB-lite Read Master' (yellow box) receives data from the system and sends it to the 'Transfer Data FIFO' (blue box). The 'AHB-lite Write Master' (yellow box) receives data from the 'Transfer Data FIFO' and sends it to the system. The 'Address Generator' (purple box) sends addresses to the 'Read Address FIFO' (blue box) and the 'Write Address FIFO' (blue box). The 'Read Address FIFO' feeds into the 'AHB-lite Read Master', and the 'Write Address FIFO' feeds into the 'AHB-lite Write Master'. The 'Address Generator' is connected to 'Control/Status Registers' (blue box), which in turn connects to the 'AHB-lite Slave Interface' (blue box).

The DMA can perform one read access and one write access, up to 32 bits in size, every clock cycle. There are 12 independent channels, each which supervise a sequence of bus transfers, usually in one of the following scenarios:

Each channel has its own control and status registers (CSRs), with which software can program and monitor the channel's progress. When multiple channels are active at the same time, the DMA shares bandwidth evenly between the channels, with round-robin over all channels which are currently requesting data transfers.

The transfer size can be either 32, 16, or 8 bits. This is configured once per channel: source transfer size and destination transfer size are the same. The DMA performs standard byte lane replication on narrow writes, so byte data is available in all 4 bytes of the databus, and halfword data in both halfwords.

Channels can be combined in varied ways for more sophisticated behaviour and greater autonomy. For example, one channel can configure another, loading configuration data from a sequence of control blocks in memory, and the second can then call back to the first via the CHAIN_TO option, when it needs to be reconfigured.

Making the DMA more autonomous means that much less processor supervision is required: overall this allows the system to do more at once, or to dissipate less power.

2.5.1. Configuring Channels

Each channel has four control/status registers:

These are live registers: they update continuously as the channel progresses.

2.5.1.1. Read and Write Addresses

READ_ADDR and WRITE_ADDR contain the address the channel will next read from, and write to, respectively. These registers update automatically after each read/write access. They increment by 1, 2 or 4 bytes at a time, depending on the transfer size configured in CTRL.

Software should generally program these registers with new start addresses each time a new transfer sequence starts. If READ_ADDR and WRITE_ADDR are not reprogrammed, the DMA will use the current values as start addresses for the next transfer. For example:

By not programming all four CSRs for each transfer sequence, software can use shorter interrupt handlers, and more compact control block formats when used with channel chaining (see register aliases in Section 2.5.2.1 , chaining in Section 2.5.2.2 ).

Caution icon CAUTION

READ_ADDR and WRITE_ADDR must always be aligned to the current transfer size, as specified in CTRL.DATA_SIZE. It is up to software to ensure the initial values are correctly aligned.

2.5.1.2. Transfer Count

Reading from TRANS_COUNT yields the number of transfers remaining in the current transfer sequence. This value updates continuously as the channel progresses. Writing to TRANS_COUNT sets the length of the next transfer sequence. Up to \( 2^{32}-1 \) transfers can be performed in one sequence.

Each time the channel starts a new transfer sequence, the most recent value written to TRANS_COUNT is copied to the live transfer counter, which will then start to decrement again as the new transfer sequence makes progress. For debugging purposes, the last value written can be read from the DBG_TCR( TRANS_COUNT reload value) register.

If the channel is triggered multiple times without intervening writes to TRANS_COUNT, it performs the same number of transfers each time. For example, when chained to, one channel might load a fixed-size control block into another channel's CSRs. TRANS_COUNT would be programmed once by software, and then reload automatically every time.

Alternatively, TRANS_COUNT can be written with a new value before starting each transfer sequence. If TRANS_COUNT is the channel trigger (see Section 2.5.2.1 ), the channel will start immediately, and the value just written will be used, not the value currently in the reload register.

Note icon NOTE

The TRANS_COUNT is the number of transfers to be performed. The total number of bytes transferred is TRANS_COUNT times the size of each transfer in bytes, given by CTRL.DATA_SIZE.

2.5.1.3. Control/Status

The CTRL register has more, smaller fields than the other 3 registers, and full details of these are given in the CTRL register listings. Among other things, CTRL is used to:

2.5.2. Starting Channels

There are three ways to start a channel:

Each of these covers different use cases. For example, trigger registers are simple and efficient when configuring and starting a channel in an interrupt service routine, and CHAIN_TO allows one channel to callback to another channel, which can then reconfigure the first channel.

NOTE

Triggering a channel which is already running has no effect.

2.5.2.1. Aliases and Triggers

Table 118. Control register aliases. Each channel has four control/status registers. Each register can be accessed at multiple different addresses. In each naturally-aligned group of four, all four registers appear, in different orders.

Offset+0x0+0x4+0x8+0xC (Trigger)
0x00 (Alias 0)READ_ADDRWRITE_ADDRTRANS_COUNTCTRL_TRIG
0x10 (Alias 1)CTRLREAD_ADDRWRITE_ADDRTRANS_COUNT_TRIG
0x20 (Alias 2)CTRLTRANS_COUNTREAD_ADDRWRITE_ADDR_TRIG
0x30 (Alias 3)CTRLWRITE_ADDRTRANS_COUNTREAD_ADDR_TRIG

The four CSRs are aliased multiple times in memory. Each alias — of which there are four — exposes the same four physical registers, but in a different order. The final register in each alias (at offset +0xC, highlighted) is a trigger register. Writing to the trigger register starts the channel.

Often, only alias 0 is used, and aliases 1-3 can be ignored. The channel is configured and started by writing READ_ADDR, WRITE_ADDR, TRANS_COUNT and finally CTRL. Since CTRL is the trigger register in alias 0, this starts the channel.

The other aliases allow more compact control block lists when using one channel to configure another, and more efficient reconfiguration and launch in interrupt handlers:

Trigger registers do not start the channel if:

2.5.2.2. Chaining

When a channel completes, it can name a different channel to immediately be triggered. This can be used as a callback for the second channel to reconfigure and restart the first.

This feature is configured through the CHAIN_TO field in the channel CTRL register. This 4-bit value selects a channel that will start when this one finishes. A channel can not chain to itself. Setting CHAIN_TO to a channel's own index means no chaining will take place.

Chain triggers behave the same as triggers from other sources, such as trigger registers. For example, they cause TRANS_COUNT to reload, and they are ignored if the targeted channel is already running.

One application for CHAIN_TO is for a channel to request reconfiguration by another channel, from a sequence of control blocks in memory. Channel A is configured to perform a wrapped transfer from memory to channel B's control registers (including a trigger register), and channel B is configured to chain back to channel A when it completes each transfer sequence. This is shown more explicitly in the DMA control blocks example ( Section 2.5.6.2 ).

Use of the register aliases ( Section 2.5.2.1 ) enables compact formats for DMA control blocks: as little as one word in some cases.

Another use of chaining is a "ping-pong" configuration, where two channels each trigger one another. The processor can respond to the channel completion interrupts, and reconfigure each channel after it completes; however, the chained channel, which has already been configured, starts immediately. In other words, channel configuration and channel operation are pipelined. Performance can improve dramatically where many short transfer sequences are required.

The Section 2.5.6 goes into more detail on the possibilities of chain triggers, in the real world.

2.5.2.3. Null Triggers and Chain Interrupts

As mentioned in Section 2.5.2.1 , writing all-zeroes to a trigger register does not start the channel. This is called a null trigger, and it has two purposes:

By default, a channel will generate an interrupt each time it finishes a transfer sequence, unless that channel's IRQ is masked in INTE0 or INTE1 . The rate of interrupts can be excessive, particularly as processor attention is generally not required while a sequence of control blocks are in progress; however, processor attention is required at the end of a chain.

The channel CTRL register has a field called IRQ_QUIET . Its default value is 0. When this set to 1, channels generate an interrupt when they receive a null trigger, and at no other time. The interrupt is generated by the channel which receives the trigger.

2.5.3. Data Request (DREQ)

Peripherals produce or consume data at their own pace. If the DMA simply transferred data as fast as possible, loss or corruption of data would ensue. DREQs are a communication channel between peripherals and the DMA, which enables the DMA to pace transfers according to the needs of the peripheral.

The CTRL.TREQ_SEL(transfer request) field selects an external DREQ. It can also be used to select one of the internal pacing timers, or select no TREQ at all (the transfer proceeds as fast as possible), e.g. for memory-to-memory transfers.

2.5.3.1. System DREQ Table

There is a global assignment of DREQ numbers to peripheral DREQ channels.

Table 119. DREQs

DREQDREQ ChannelDREQDREQ ChannelDREQDREQ ChannelDREQDREQ Channel
0DREQ_PIO0_TX010DREQ_PIO1_TX220DREQ_UART0_TX30DREQ_PWM_WRAP6
1DREQ_PIO0_TX111DREQ_PIO1_TX321DREQ_UART0_RX31DREQ_PWM_WRAP7
2DREQ_PIO0_TX212DREQ_PIO1_RX022DREQ_UART1_TX32DREQ_I2C0_TX
3DREQ_PIO0_TX313DREQ_PIO1_RX123DREQ_UART1_RX33DREQ_I2C0_RX
4DREQ_PIO0_RX014DREQ_PIO1_RX224DREQ_PWM_WRAP034DREQ_I2C1_TX
5DREQ_PIO0_RX115DREQ_PIO1_RX325DREQ_PWM_WRAP135DREQ_I2C1_RX
6DREQ_PIO0_RX216DREQ_SPI0_TX26DREQ_PWM_WRAP236DREQ_ADC
7DREQ_PIO0_RX317DREQ_SPI0_RX27DREQ_PWM_WRAP337DREQ_XIP_STREAM
8DREQ_PIO1_TX018DREQ_SPI1_TX28DREQ_PWM_WRAP438DREQ_XIP_SSITX
9DREQ_PIO1_TX119DREQ_SPI1_RX29DREQ_PWM_WRAP539DREQ_XIP_SSIRX

2.5.3.2. Credit-based DREQ Scheme

The RP2040 DMA is designed for systems where:

In addition, the DMA's transfer FIFOs and dual-master structure permit multiple accesses to the same peripheral to be in flight at once, to improve gross throughput. Choice of DREQ mechanism is therefore critical:

The RP2040 DMA uses a credit-based DREQ mechanism. For each peripheral, the DMA attempts to keep as many transfers in flight as the peripheral has capacity for. This enables full bus throughput (1 word per clock) through an 8-deep peripheral FIFO with no possibility of overflow or underflow, in the absence of fabric latency or contention.

For each channel, the DMA maintains a counter. Each 1-clock pulse on the dreq signal will increment this counter (saturating). When nonzero, the channel requests a transfer from the DMA's internal arbiter, and the counter is decremented when the transfer is issued to the address FIFOs. At this point the transfer is in flight, but has not yet necessarily completed.

Figure 13. DREQ counting

Timing diagram for DREQ counting showing clk, dreq, chan count, and chan issue signals.

The diagram illustrates the DREQ counting mechanism. It shows four signals over time: clk (clock), dreq (data request), chan count (channel count), and chan issue (channel issue). The clk signal is a regular square wave. The dreq signal is a pulse that occurs at specific clock cycles. The chan count signal is a counter that increments from 0 to 2 as dreq pulses occur. The chan issue signal is a pulse that occurs at the end of each transfer sequence, corresponding to the chan count value.

Timing diagram for DREQ counting showing clk, dreq, chan count, and chan issue signals.

The effect is to upper bound the number of in-flight transfers based on the amount of room or data available in the peripheral FIFO. In the steady state, this gives maximum throughput, but can't underflow or underflow.

One caveat is that the user must not access a FIFO which is currently being serviced by the DMA. This causes the channel and peripheral to become desynchronised, and can cause corruption or loss of data.

Another caveat is that multiple channels should not be connected to the same DREQ.

2.5.4. Interrupts

Each channel can generate interrupts; these can be masked on a per-channel basis using the INTE0 or INTE1 registers. There are two circumstances where a channel raises an interrupt request:

The masked interrupt status is visible in the INTS registers; there is one bit for each channel. Interrupts are cleared by writing a bit mask to INTS . One idiom for acknowledging interrupts is to read INTS and then write the same value back, so only enabled interrupts are cleared.

The RP2040 DMA provides two system IRQs, with independent masking and status registers (e.g. INTE0 , INTE1 ). Any combination of channel interrupt requests can be routed to either system IRQ. For example:

For debugging purposes, the INTF registers can force either IRQ to be asserted.

2.5.5. Additional Features

2.5.5.1. Pacing Timers

These allow transfer of data roughly once every \( n \) clk_sys clocks instead of using external peripheral DREQ to trigger transfers. A fractional (X/Y) divider is used, and will generate a maximum of 1 request per clk_sys cycle.

There are 4 timers available in RP2040. Each DMA is able to select any of these in CTRL.TREQ_SEL .

2.5.5.2. CRC Calculation

The DMA can watch data from a given channel passing through the data FIFO, and calculate checksums based on this data. This is a purely passive affair: the data is not altered by this hardware, only observed.

The feature is controlled via the SNIFF_CTRL and SNIFF_DATA registers, and can be enabled/disabled per DMA transfer via the CTRL.SNIFF_EN field.

As this hardware cannot place backpressure on the FIFO, it must keep up with the DMA's maximum transfer rate of 32 bits per clock.

The supported checksums are:

The result register is both readable and writable, so that the initial seed value can be set.

Bit/byte manipulations are available on the result which may aid specific use cases:

These manipulations do not affect the CRC calculation, just how the data is presented in the result register.

2.5.5.3. Channel Abort

It is possible for a channel to get into an irrecoverable state: e.g. if commanded to transfer more data than a peripheral will ever request, it will never complete. Clearing the CTRL.EN bit merely pauses the channel, and does not solve the problem. This should not occur under normal circumstances, but it is important that there is a mechanism to recover without simply hard-resetting the entire DMA block.

The CHAN_ABORT register forces channels to complete early. There is one bit for each channel, and writing a 1 terminates that channel. This clears the transfer counter and forces the channel into an inactive state.

Warning icon CAUTION

Due to RP2040-E13 , aborting a DMA channel that is making progress (i.e. not stalled on an inactive DREQ) may cause a completion IRQ to assert. The channel interrupt enable should be cleared before performing the abort, and the interrupt should be checked and cleared after the abort.

At the time an abort is triggered, a channel may have bus transfers currently in flight between the read and write master, and these transfers cannot be revoked. The CTRL.BUSY flag stays high until these transfers complete, and the channel reaches a safe state, which generally takes only a few cycles. The channel must not be restarted until its CTRL.BUSY flag deasserts. Starting a new sequence of transfers whilst transfers from an old sequence are still in flight can lead to unpredictable behaviour.

2.5.5.4. Debug

Debug registers are available for each DMA channel to show the dreq counter DBG_CTDREQ and next transfer count DBG_TCR. These can also be used to reset a DMA channel if required.

2.5.6. Example Use Cases

2.5.6.1. Using Interrupts to Reconfigure a Channel

When a channel finishes a block of transfers, it becomes available for making more transfers. Software detects that the channel is no longer busy, and reconfigures and restarts the channel. One approach is to poll the CTRL.BUSY bit until the channel is done, but this loses one of the key advantages of the DMA, namely that it does not have to operate in lockstep with a processor. By setting the correct bit in INTE0 or INTE1, we can instruct the DMA to raise one of its two interrupt request lines when a given channel completes. Rather than repeatedly asking if a channel is done, we are told.

NOTE

Having two system interrupt lines allows different channel completion interrupts to be routed to different cores, or to preempt one another on the same core if one channel is more time-critical.

When the interrupt is asserted, the processor can be configured to drop whatever it is doing and call a user-specified handler function. The handler can reconfigure and restart the channel. When the handler exits, the processor returns to the interrupted code running in the foreground.

Pico Examples: https://github.com/raspberrypi/pico-examples/blob/master/dma/channel_irq/channel_irq.c Lines 35 - 52

35 void dma_handler() {
36     static int pwm_level = 0;
37     static uint32_t wavetable[N_PWM_LEVELS];
38     static bool first_run = true;
39     // Entry number 'i' has 'i' one bits and '(32 - i)' zero bits.
40     if (first_run) {
41         first_run = false;
42         for (int i = 0; i < N_PWM_LEVELS; ++i)
43             wavetable[i] = ~(~0u << i);
44     }
45
46     // Clear the interrupt request.
47     dma_hw->ints0 = 1u << dma_chan;
48     // Give the channel a new wave table entry to read from, and re-trigger it
49     dma_channel_set_read_addr(dma_chan, &wavetable[pwm_level], true);
50
51     pwm_level = (pwm_level + 1) % N_PWM_LEVELS;
52 }

In many cases, most of the configuration can be done the first time the channel is started, and only addresses and transfer lengths need reprogramming in the DMA handler.

Pico Examples: https://github.com/raspberrypi/pico-examples/blob/master/dma/channel_irq/channel_irq.c Lines 54 - 94

54 int main() {
55     #ifndef PICO_DEFAULT_LED_PIN
56     //warning dma/channel_irq example requires a board with a regular LED
57     #else
58         // Set up a PIO state machine to serialise our bits
59         uint offset = pio_add_program(pio0, &pio_serialiser_program);
60         pio_serialiser_program_init(pio0, 0, offset, PICO_DEFAULT_LED_PIN, PIO_SERIAL_CLKDIV);
61
62         // Configure a channel to write the same word (32 bits) repeatedly to PIO0
63         // SM0's TX FIFO, paced by the data request signal from that peripheral.
64         dma_chan = dma_claim_unused_channel(true);
65         dma_channel_config c = dma_channel_get_default_config(dma_chan);
66         channel_config_set_transfer_data_size(&c, DMA_SIZE_32);
67         channel_config_set_read_increment(&c, false);
68         channel_config_set_dreq(&c, DREQ_PIO0_TX0);
69
70         dma_channel_configure(
71             dma_chan,
72             &c,
73             &pio0_hw->txf[0], // Write address (only need to set this once)
74             NULL,             // Don't provide a read address yet
75             PWM_REPEAT_COUNT, // Write the same value many times, then halt and interrupt
76             false             // Don't start yet
77         );
78 }
79 // Tell the DMA to raise IRQ line 0 when the channel finishes a block
80 dma_channel_set_irq0_enabled(dma_chan, true);
81
82 // Configure the processor to run dma_handler() when DMA IRQ 0 is asserted
83 irq_set_exclusive_handler(DMA_IRQ_0, dma_handler);
84 irq_set_enabled(DMA_IRQ_0, true);
85
86 // Manually call the handler once, to trigger the first transfer
87 dma_handler();
88
89 // Everything else from this point is interrupt-driven. The processor has
90 // time to sit and think about its early retirement -- maybe open a bakery?
91 while (true)
92     tight_loop_contents();
93 #endif
94 }

One disadvantage of this technique is that we don't start to reconfigure the channel until some time after the channel makes its last transfer. If there is heavy interrupt activity on the processor, this may be quite a long time, and therefore quite a large gap in transfers, which is problematic if we need to sustain a high data throughput.

This is solved by using two channels, with their CHAIN_TO fields crossed over, so that channel A triggers channel B when it completes, and vice versa. At any point in time, one of the channels is transferring data, and the other is either already configured to start the next transfer immediately when the current one finishes, or it is in the process of being reconfigured. When channel A completes, it immediately starts the cued-up transfer on channel B. At the same time, the interrupt is fired, and the handler reconfigures channel A so that it is ready for when channel B completes.

2.5.6.2. DMA Control Blocks

Frequently, multiple smaller buffers must be gathered together and sent to the same peripheral. To address this use case, the RP2040 DMA can execute a long and complex sequence of transfers without processor control. One channel repeatedly reconfigures a second channel, and the second channel restarts the first each time it completes block of transfers.

Because the first DMA channel is transferring data directly from memory to the second channel's control registers, the format of the control blocks in memory must match those registers. The last register written to, each time, will be one of the trigger registers (Section 2.5.2.1) which will start the second channel on its programmed block of transfers. The register aliases (Section 2.5.2.1) give some flexibility for the block layout, and more importantly allow some registers to be omitted from the blocks, so they occupy less memory and can be loaded more quickly.

This example shows how multiple buffers can be gathered and transferred to the UART, by reprogramming TRANS_COUNT and READ_ADDR_TRIG:

Pico Examples: https://github.com/raspberrypi/pico-examples/blob/master/dma/control_blocks/control_blocks.c

1 /**
2  * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6
7 // Use two DMA channels to make a programmed sequence of data transfers to the
8 // UART (a data gather operation). One channel is responsible for transferring
9 // the actual data, the other repeatedly reprograms that channel.
10
11 #include <stdio.h>
12 #include "pico/stdlib.h"
13 #include "hardware/dma.h"
14 #include "hardware/structs/uart.h"
15
16 // These buffers will be DMA'd to the UART, one after the other.
17
18 const char word0[] = "Transferring ";
19 const char word1[] = "one ";
20 const char word2[] = "word ";
21 const char word3[] = "at ";
22 const char word4[] = "a ";
23 const char word5[] = "time.\n";
24
25 // Note the order of the fields here: it's important that the length is before
26 // the read address, because the control channel is going to write to the last
27 // two registers in alias 3 on the data channel:
28 //           +0x0      +0x4      +0x8      +0xC (Trigger)
29 // Alias 0:  READ_ADDR  WRITE_ADDR  TRANS_COUNT  CTRL
30 // Alias 1:  CTRL      READ_ADDR  WRITE_ADDR  TRANS_COUNT
31 // Alias 2:  CTRL      TRANS_COUNT  READ_ADDR  WRITE_ADDR
32 // Alias 3:  CTRL      WRITE_ADDR  TRANS_COUNT  READ_ADDR
33 //
34 // This will program the transfer count and read address of the data channel,
35 // and trigger it. Once the data channel completes, it will restart the
36 // control channel (via CHAIN_T0) to load the next two words into its control
37 // registers.
38
39 const struct {uint32_t len; const char *data;} control_blocks[] = {
40     {count_of(word0) - 1, word0}, // Skip null terminator
41     {count_of(word1) - 1, word1},
42     {count_of(word2) - 1, word2},
43     {count_of(word3) - 1, word3},
44     {count_of(word4) - 1, word4},
45     {count_of(word5) - 1, word5},
46     {0, NULL} // Null trigger to end chain.
47 };
48
49 int main() {
50     #ifndef uart_default
51     //warning dma/control_blocks example requires a UART
52     #else
53         stdio_init_all();
54         puts("DMA control block example:");
55
56         // ctrl_chan loads control blocks into data_chan, which executes them.
57         int ctrl_chan = dma_claim_unused_channel(true);
58         int data_chan = dma_claim_unused_channel(true);
59
60         // The control channel transfers two words into the data channel's control
61         // registers, then halts. The write address wraps on a two-word
62         // (eight-byte) boundary, so that the control channel writes the same two
63         // registers when it is next triggered.
64
65         dma_channel_config c = dma_channel_get_default_config(ctrl_chan);
66         channel_config_set_transfer_data_size(&c, DMA_SIZE_32);
67         channel_config_set_read_increment(&c, true);
68         channel_config_set_write_increment(&c, true);
69         channel_config_set_ring(&c, true, 3); // 1 << 3 byte boundary on write ptr
70
71         dma_channel_configure(
72             ctrl_chan,
73             &c,
74             &dma_hw->ch[data_chan].a13_transfer_count, // Initial write address
75             &control_blocks[0], // Initial read address
76             2, // Halt after each control block
77             false // Don't start yet
78         );
79
80 // The data channel is set up to write to the UART FIFO (paced by the
81 // UART's TX data request signal) and then chain to the control channel
82 // once it completes. The control channel programs a new read address and
83 // data length, and retriggers the data channel.
84
85 c = dma_channel_get_default_config(data_chan);
86 channel_config_set_transfer_data_size(&c, DMA_SIZE_8);
87 channel_config_set_dreq(&c, uart_get_dreq(uart_default, true));
88 // Trigger ctrl_chan when data_chan completes
89 channel_config_set_chain_to(&c, ctrl_chan);
90 // Raise the IRQ flag when 0 is written to a trigger register (end of chain):
91 channel_config_set_irq_quiet(&c, true);
92
93 dma_channel_configure(
94     data_chan,
95     &c,
96     &uart_get_hw(uart_default)->dr,
97     NULL,          // Initial read address and transfer count are unimportant;
98     0,             // the control channel will reprogram them each time.
99     false          // Don't start yet.
100 );
101
102 // Everything is ready to go. Tell the control channel to load the first
103 // control block. Everything is automatic from here.
104 dma_start_channel_mask(1u << ctrl_chan);
105
106 // The data channel will assert its IRQ flag when it gets a null trigger,
107 // indicating the end of the control block list. We're just going to wait
108 // for the IRQ flag instead of setting up an interrupt handler.
109 while (!(dma_hw->intr & 1u << data_chan))
110     tight_loop_contents();
111 dma_hw->ints0 = 1u << data_chan;
112
113 puts("DMA finished.");
114 #endif
115 }

2.5.7. List of Registers

The DMA registers start at a base address of 0x50000000(defined as DMA_BASE in SDK).

Table 120. List of DMA registers

OffsetNameInfo
0x000CH0_READ_ADDRDMA Channel 0 Read Address pointer
0x004CH0_WRITE_ADDRDMA Channel 0 Write Address pointer
0x008CH0_TRANS_COUNTDMA Channel 0 Transfer Count
0x00cCH0_CTRL_TRIGDMA Channel 0 Control and Status
0x010CH0_AL1_CTRLAlias for channel 0 CTRL register
0x014CH0_AL1_READ_ADDRAlias for channel 0 READ_ADDR register
0x018CH0_AL1_WRITE_ADDRAlias for channel 0 WRITE_ADDR register
0x01cCH0_AL1_TRANS_COUNT_TRIGAlias for channel 0 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x020CH0_AL2_CTRLAlias for channel 0 CTRL register
OffsetNameInfo
0x024CH0_AL2_TRANS_COUNTAlias for channel 0 TRANS_COUNT register
0x028CH0_AL2_READ_ADDRAlias for channel 0 READ_ADDR register
0x02cCH0_AL2_WRITE_ADDR_TRIGAlias for channel 0 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x030CH0_AL3_CTRLAlias for channel 0 CTRL register
0x034CH0_AL3_WRITE_ADDRAlias for channel 0 WRITE_ADDR register
0x038CH0_AL3_TRANS_COUNTAlias for channel 0 TRANS_COUNT register
0x03cCH0_AL3_READ_ADDR_TRIGAlias for channel 0 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x040CH1_READ_ADDRDMA Channel 1 Read Address pointer
0x044CH1_WRITE_ADDRDMA Channel 1 Write Address pointer
0x048CH1_TRANS_COUNTDMA Channel 1 Transfer Count
0x04cCH1_CTRL_TRIGDMA Channel 1 Control and Status
0x050CH1_AL1_CTRLAlias for channel 1 CTRL register
0x054CH1_AL1_READ_ADDRAlias for channel 1 READ_ADDR register
0x058CH1_AL1_WRITE_ADDRAlias for channel 1 WRITE_ADDR register
0x05cCH1_AL1_TRANS_COUNT_TRIGAlias for channel 1 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x060CH1_AL2_CTRLAlias for channel 1 CTRL register
0x064CH1_AL2_TRANS_COUNTAlias for channel 1 TRANS_COUNT register
0x068CH1_AL2_READ_ADDRAlias for channel 1 READ_ADDR register
0x06cCH1_AL2_WRITE_ADDR_TRIGAlias for channel 1 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x070CH1_AL3_CTRLAlias for channel 1 CTRL register
0x074CH1_AL3_WRITE_ADDRAlias for channel 1 WRITE_ADDR register
0x078CH1_AL3_TRANS_COUNTAlias for channel 1 TRANS_COUNT register
0x07cCH1_AL3_READ_ADDR_TRIGAlias for channel 1 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x080CH2_READ_ADDRDMA Channel 2 Read Address pointer
0x084CH2_WRITE_ADDRDMA Channel 2 Write Address pointer
0x088CH2_TRANS_COUNTDMA Channel 2 Transfer Count
0x08cCH2_CTRL_TRIGDMA Channel 2 Control and Status
0x090CH2_AL1_CTRLAlias for channel 2 CTRL register
0x094CH2_AL1_READ_ADDRAlias for channel 2 READ_ADDR register
OffsetNameInfo
0x098CH2_AL1_WRITE_ADDRAlias for channel 2 WRITE_ADDR register
0x09cCH2_AL1_TRANS_COUNT_TRIGAlias for channel 2 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x0a0CH2_AL2_CTRLAlias for channel 2 CTRL register
0x0a4CH2_AL2_TRANS_COUNTAlias for channel 2 TRANS_COUNT register
0x0a8CH2_AL2_READ_ADDRAlias for channel 2 READ_ADDR register
0x0acCH2_AL2_WRITE_ADDR_TRIGAlias for channel 2 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x0b0CH2_AL3_CTRLAlias for channel 2 CTRL register
0x0b4CH2_AL3_WRITE_ADDRAlias for channel 2 WRITE_ADDR register
0x0b8CH2_AL3_TRANS_COUNTAlias for channel 2 TRANS_COUNT register
0x0bcCH2_AL3_READ_ADDR_TRIGAlias for channel 2 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x0c0CH3_READ_ADDRDMA Channel 3 Read Address pointer
0x0c4CH3_WRITE_ADDRDMA Channel 3 Write Address pointer
0x0c8CH3_TRANS_COUNTDMA Channel 3 Transfer Count
0x0ccCH3_CTRL_TRIGDMA Channel 3 Control and Status
0x0d0CH3_AL1_CTRLAlias for channel 3 CTRL register
0x0d4CH3_AL1_READ_ADDRAlias for channel 3 READ_ADDR register
0x0d8CH3_AL1_WRITE_ADDRAlias for channel 3 WRITE_ADDR register
0x0dcCH3_AL1_TRANS_COUNT_TRIGAlias for channel 3 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x0e0CH3_AL2_CTRLAlias for channel 3 CTRL register
0x0e4CH3_AL2_TRANS_COUNTAlias for channel 3 TRANS_COUNT register
0x0e8CH3_AL2_READ_ADDRAlias for channel 3 READ_ADDR register
0x0ecCH3_AL2_WRITE_ADDR_TRIGAlias for channel 3 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x0f0CH3_AL3_CTRLAlias for channel 3 CTRL register
0x0f4CH3_AL3_WRITE_ADDRAlias for channel 3 WRITE_ADDR register
0x0f8CH3_AL3_TRANS_COUNTAlias for channel 3 TRANS_COUNT register
0x0fcCH3_AL3_READ_ADDR_TRIGAlias for channel 3 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x100CH4_READ_ADDRDMA Channel 4 Read Address pointer
0x104CH4_WRITE_ADDRDMA Channel 4 Write Address pointer
OffsetNameInfo
0x108CH4_TRANS_COUNTDMA Channel 4 Transfer Count
0x10cCH4_CTRL_TRIGDMA Channel 4 Control and Status
0x110CH4_AL1_CTRLAlias for channel 4 CTRL register
0x114CH4_AL1_READ_ADDRAlias for channel 4 READ_ADDR register
0x118CH4_AL1_WRITE_ADDRAlias for channel 4 WRITE_ADDR register
0x11cCH4_AL1_TRANS_COUNT_TRIGAlias for channel 4 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x120CH4_AL2_CTRLAlias for channel 4 CTRL register
0x124CH4_AL2_TRANS_COUNTAlias for channel 4 TRANS_COUNT register
0x128CH4_AL2_READ_ADDRAlias for channel 4 READ_ADDR register
0x12cCH4_AL2_WRITE_ADDR_TRIGAlias for channel 4 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x130CH4_AL3_CTRLAlias for channel 4 CTRL register
0x134CH4_AL3_WRITE_ADDRAlias for channel 4 WRITE_ADDR register
0x138CH4_AL3_TRANS_COUNTAlias for channel 4 TRANS_COUNT register
0x13cCH4_AL3_READ_ADDR_TRIGAlias for channel 4 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x140CH5_READ_ADDRDMA Channel 5 Read Address pointer
0x144CH5_WRITE_ADDRDMA Channel 5 Write Address pointer
0x148CH5_TRANS_COUNTDMA Channel 5 Transfer Count
0x14cCH5_CTRL_TRIGDMA Channel 5 Control and Status
0x150CH5_AL1_CTRLAlias for channel 5 CTRL register
0x154CH5_AL1_READ_ADDRAlias for channel 5 READ_ADDR register
0x158CH5_AL1_WRITE_ADDRAlias for channel 5 WRITE_ADDR register
0x15cCH5_AL1_TRANS_COUNT_TRIGAlias for channel 5 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x160CH5_AL2_CTRLAlias for channel 5 CTRL register
0x164CH5_AL2_TRANS_COUNTAlias for channel 5 TRANS_COUNT register
0x168CH5_AL2_READ_ADDRAlias for channel 5 READ_ADDR register
0x16cCH5_AL2_WRITE_ADDR_TRIGAlias for channel 5 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x170CH5_AL3_CTRLAlias for channel 5 CTRL register
0x174CH5_AL3_WRITE_ADDRAlias for channel 5 WRITE_ADDR register
0x178CH5_AL3_TRANS_COUNTAlias for channel 5 TRANS_COUNT register
OffsetNameInfo
0x17cCH5_AL3_READ_ADDR_TRIGAlias for channel 5 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x180CH6_READ_ADDRDMA Channel 6 Read Address pointer
0x184CH6_WRITE_ADDRDMA Channel 6 Write Address pointer
0x188CH6_TRANS_COUNTDMA Channel 6 Transfer Count
0x18cCH6_CTRL_TRIGDMA Channel 6 Control and Status
0x190CH6_AL1_CTRLAlias for channel 6 CTRL register
0x194CH6_AL1_READ_ADDRAlias for channel 6 READ_ADDR register
0x198CH6_AL1_WRITE_ADDRAlias for channel 6 WRITE_ADDR register
0x19cCH6_AL1_TRANS_COUNT_TRIGAlias for channel 6 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x1a0CH6_AL2_CTRLAlias for channel 6 CTRL register
0x1a4CH6_AL2_TRANS_COUNTAlias for channel 6 TRANS_COUNT register
0x1a8CH6_AL2_READ_ADDRAlias for channel 6 READ_ADDR register
0x1acCH6_AL2_WRITE_ADDR_TRIGAlias for channel 6 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x1b0CH6_AL3_CTRLAlias for channel 6 CTRL register
0x1b4CH6_AL3_WRITE_ADDRAlias for channel 6 WRITE_ADDR register
0x1b8CH6_AL3_TRANS_COUNTAlias for channel 6 TRANS_COUNT register
0x1bcCH6_AL3_READ_ADDR_TRIGAlias for channel 6 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x1c0CH7_READ_ADDRDMA Channel 7 Read Address pointer
0x1c4CH7_WRITE_ADDRDMA Channel 7 Write Address pointer
0x1c8CH7_TRANS_COUNTDMA Channel 7 Transfer Count
0x1ccCH7_CTRL_TRIGDMA Channel 7 Control and Status
0x1d0CH7_AL1_CTRLAlias for channel 7 CTRL register
0x1d4CH7_AL1_READ_ADDRAlias for channel 7 READ_ADDR register
0x1d8CH7_AL1_WRITE_ADDRAlias for channel 7 WRITE_ADDR register
0x1dcCH7_AL1_TRANS_COUNT_TRIGAlias for channel 7 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x1e0CH7_AL2_CTRLAlias for channel 7 CTRL register
0x1e4CH7_AL2_TRANS_COUNTAlias for channel 7 TRANS_COUNT register
0x1e8CH7_AL2_READ_ADDRAlias for channel 7 READ_ADDR register
OffsetNameInfo
0x1ecCH7_AL2_WRITE_ADDR_TRIGAlias for channel 7 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x1f0CH7_AL3_CTRLAlias for channel 7 CTRL register
0x1f4CH7_AL3_WRITE_ADDRAlias for channel 7 WRITE_ADDR register
0x1f8CH7_AL3_TRANS_COUNTAlias for channel 7 TRANS_COUNT register
0x1fcCH7_AL3_READ_ADDR_TRIGAlias for channel 7 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x200CH8_READ_ADDRDMA Channel 8 Read Address pointer
0x204CH8_WRITE_ADDRDMA Channel 8 Write Address pointer
0x208CH8_TRANS_COUNTDMA Channel 8 Transfer Count
0x20cCH8_CTRL_TRIGDMA Channel 8 Control and Status
0x210CH8_AL1_CTRLAlias for channel 8 CTRL register
0x214CH8_AL1_READ_ADDRAlias for channel 8 READ_ADDR register
0x218CH8_AL1_WRITE_ADDRAlias for channel 8 WRITE_ADDR register
0x21cCH8_AL1_TRANS_COUNT_TRIGAlias for channel 8 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x220CH8_AL2_CTRLAlias for channel 8 CTRL register
0x224CH8_AL2_TRANS_COUNTAlias for channel 8 TRANS_COUNT register
0x228CH8_AL2_READ_ADDRAlias for channel 8 READ_ADDR register
0x22cCH8_AL2_WRITE_ADDR_TRIGAlias for channel 8 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x230CH8_AL3_CTRLAlias for channel 8 CTRL register
0x234CH8_AL3_WRITE_ADDRAlias for channel 8 WRITE_ADDR register
0x238CH8_AL3_TRANS_COUNTAlias for channel 8 TRANS_COUNT register
0x23cCH8_AL3_READ_ADDR_TRIGAlias for channel 8 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x240CH9_READ_ADDRDMA Channel 9 Read Address pointer
0x244CH9_WRITE_ADDRDMA Channel 9 Write Address pointer
0x248CH9_TRANS_COUNTDMA Channel 9 Transfer Count
0x24cCH9_CTRL_TRIGDMA Channel 9 Control and Status
0x250CH9_AL1_CTRLAlias for channel 9 CTRL register
0x254CH9_AL1_READ_ADDRAlias for channel 9 READ_ADDR register
0x258CH9_AL1_WRITE_ADDRAlias for channel 9 WRITE_ADDR register
OffsetNameInfo
0x25cCH9_AL1_TRANS_COUNT_TRIGAlias for channel 9 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x260CH9_AL2_CTRLAlias for channel 9 CTRL register
0x264CH9_AL2_TRANS_COUNTAlias for channel 9 TRANS_COUNT register
0x268CH9_AL2_READ_ADDRAlias for channel 9 READ_ADDR register
0x26cCH9_AL2_WRITE_ADDR_TRIGAlias for channel 9 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x270CH9_AL3_CTRLAlias for channel 9 CTRL register
0x274CH9_AL3_WRITE_ADDRAlias for channel 9 WRITE_ADDR register
0x278CH9_AL3_TRANS_COUNTAlias for channel 9 TRANS_COUNT register
0x27cCH9_AL3_READ_ADDR_TRIGAlias for channel 9 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x280CH10_READ_ADDRDMA Channel 10 Read Address pointer
0x284CH10_WRITE_ADDRDMA Channel 10 Write Address pointer
0x288CH10_TRANS_COUNTDMA Channel 10 Transfer Count
0x28cCH10_CTRL_TRIGDMA Channel 10 Control and Status
0x290CH10_AL1_CTRLAlias for channel 10 CTRL register
0x294CH10_AL1_READ_ADDRAlias for channel 10 READ_ADDR register
0x298CH10_AL1_WRITE_ADDRAlias for channel 10 WRITE_ADDR register
0x29cCH10_AL1_TRANS_COUNT_TRIGAlias for channel 10 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x2a0CH10_AL2_CTRLAlias for channel 10 CTRL register
0x2a4CH10_AL2_TRANS_COUNTAlias for channel 10 TRANS_COUNT register
0x2a8CH10_AL2_READ_ADDRAlias for channel 10 READ_ADDR register
0x2acCH10_AL2_WRITE_ADDR_TRIGAlias for channel 10 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x2b0CH10_AL3_CTRLAlias for channel 10 CTRL register
0x2b4CH10_AL3_WRITE_ADDRAlias for channel 10 WRITE_ADDR register
0x2b8CH10_AL3_TRANS_COUNTAlias for channel 10 TRANS_COUNT register
0x2bcCH10_AL3_READ_ADDR_TRIGAlias for channel 10 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x2c0CH11_READ_ADDRDMA Channel 11 Read Address pointer
0x2c4CH11_WRITE_ADDRDMA Channel 11 Write Address pointer
0x2c8CH11_TRANS_COUNTDMA Channel 11 Transfer Count
OffsetNameInfo
0x2ccCH11_CTRL_TRIGDMA Channel 11 Control and Status
0x2d0CH11_AL1_CTRLAlias for channel 11 CTRL register
0x2d4CH11_AL1_READ_ADDRAlias for channel 11 READ_ADDR register
0x2d8CH11_AL1_WRITE_ADDRAlias for channel 11 WRITE_ADDR register
0x2dcCH11_AL1_TRANS_COUNT_TRIGAlias for channel 11 TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x2e0CH11_AL2_CTRLAlias for channel 11 CTRL register
0x2e4CH11_AL2_TRANS_COUNTAlias for channel 11 TRANS_COUNT register
0x2e8CH11_AL2_READ_ADDRAlias for channel 11 READ_ADDR register
0x2ecCH11_AL2_WRITE_ADDR_TRIGAlias for channel 11 WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x2f0CH11_AL3_CTRLAlias for channel 11 CTRL register
0x2f4CH11_AL3_WRITE_ADDRAlias for channel 11 WRITE_ADDR register
0x2f8CH11_AL3_TRANS_COUNTAlias for channel 11 TRANS_COUNT register
0x2fcCH11_AL3_READ_ADDR_TRIGAlias for channel 11 READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
0x400INTRInterrupt Status (raw)
0x404INTE0Interrupt Enables for IRQ 0
0x408INTF0Force Interrupts
0x40cINTS0Interrupt Status for IRQ 0
0x414INTE1Interrupt Enables for IRQ 1
0x418INTF1Force Interrupts for IRQ 1
0x41cINTS1Interrupt Status (masked) for IRQ 1
0x420TIMER0Pacing (X/Y) Fractional Timer
The pacing timer produces TREQ assertions at a rate set by \( ((X/Y) * \text{sys\_clk}) \) . This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less.
0x424TIMER1Pacing (X/Y) Fractional Timer
The pacing timer produces TREQ assertions at a rate set by \( ((X/Y) * \text{sys\_clk}) \) . This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less.
0x428TIMER2Pacing (X/Y) Fractional Timer
The pacing timer produces TREQ assertions at a rate set by \( ((X/Y) * \text{sys\_clk}) \) . This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less.
OffsetNameInfo
0x42cTIMER3Pacing (X/Y) Fractional Timer
The pacing timer produces TREQ assertions at a rate set by \( ((X/Y) * \text{sys\_clk}) \) . This equation is evaluated every sys_clk cycles and therefore can only generate TREQs at a rate of 1 per sys_clk (i.e. permanent TREQ) or less.
0x430MULTI_CHAN_TRIGGERTrigger one or more channels simultaneously
0x434SNIFF_CTRLSniffer Control
0x438SNIFF_DATAData accumulator for sniff hardware
0x440FIFO_LEVELSDebug RAF, WAF, TDF levels
0x444CHAN_ABORTAbort an in-progress transfer sequence on one or more channels
0x448N_CHANNELSThe number of channels this DMA instance is equipped with. This DMA supports up to 16 hardware channels, but can be configured with as few as one, to minimise silicon area.
0x800CH0_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0x804CH0_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0x840CH1_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0x844CH1_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0x880CH2_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0x884CH2_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0x8c0CH3_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0x8c4CH3_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0x900CH4_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0x904CH4_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
OffsetNameInfo
0x940CH5_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0x944CH5_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0x980CH6_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0x984CH6_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0x9c0CH7_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0x9c4CH7_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0xa00CH8_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0xa04CH8_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0xa40CH9_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0xa44CH9_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0xa80CH10_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0xa84CH10_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer
0xac0CH11_DBG_CTDREQRead: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.
0xac4CH11_DBG_TCRRead to get channel TRANS_COUNT reload value, i.e. the length of the next transfer

DMA: CH0_READ_ADDR,    CH1_READ_ADDR,    ...,    CH10_READ_ADDR,    CH11_READ_ADDR Registers

Offsets: 0x000, 0x040, ..., 0x280, 0x2c0

Description DMA Channel N Read Address pointer

Table 121.
CH0_READ_ADDR,
CH1_READ_ADDR, ...,
CH10_READ_ADDR,
CH11_READ_ADDR
Registers

BitsDescriptionTypeReset
31:0This register updates automatically each time a read completes. The current value is the next address to be read by this channel.RW0x00000000
DMA: CH0_WRITE_ADDR, CH1_WRITE_ADDR, ..., CH10_WRITE_ADDR, CH11_WRITE_ADDR Registers Offsets: 0x004, 0x044, ..., 0x284, 0x2c4 Description DMA Channel N Write Address pointer

Table 122.
CH0_WRITE_ADDR,
CH1_WRITE_ADDR, ...,
CH10_WRITE_ADDR,
CH11_WRITE_ADDR
Registers

BitsDescriptionTypeReset
31:0This register updates automatically each time a write completes. The current value is the next address to be written by this channel.RW0x00000000
DMA: CH0_TRANS_COUNT, CH1_TRANS_COUNT, ..., CH10_TRANS_COUNT, CH11_TRANS_COUNT Registers Offsets: 0x008, 0x048, ..., 0x288, 0x2c8 Description DMA Channel N Transfer Count

Table 123.
CH0_TRANS_COUNT,
CH1_TRANS_COUNT,
...,
CH10_TRANS_COUNT,
CH11_TRANS_COUNT
Registers

BitsDescriptionTypeReset
31:0

Program the number of bus transfers a channel will perform before halting. Note that, if transfers are larger than one byte in size, this is not equal to the number of bytes transferred (see CTRL_DATA_SIZE).

When the channel is active, reading this register shows the number of transfers remaining, updating automatically each time a write transfer completes.

Writing this register sets the RELOAD value for the transfer counter. Each time this channel is triggered, the RELOAD value is copied into the live transfer counter. The channel can be started multiple times, and will perform the same number of transfers each time, as programmed by most recent write.

The RELOAD value can be observed at CHx_DBG_TCR. If TRANS_COUNT is used as a trigger, the written value is used immediately as the length of the new transfer sequence, as well as being written to RELOAD.

RW0x00000000
DMA: CH0_CTRL_TRIG, CH1_CTRL_TRIG, ..., CH10_CTRL_TRIG, CH11_CTRL_TRIG Registers Offsets: 0x00c, 0x04c, ..., 0x28c, 0x2cc Description DMA Channel N Control and Status

Table 124.
CH0_CTRL_TRIG,
CH1_CTRL_TRIG, ...,
CH10_CTRL_TRIG,
CH11_CTRL_TRIG
Registers

Bits 14:10 9:5 4:0 BitsDescription SHIFT DescriptionMASK_MSB : The most-significant bit allowed to pass by the mask (inclusive) MASK_LSB : The least-significant bit allowed to pass by the mask (inclusive) : Logical right-shift applied to accumulator before maskingType RW RW RW TypeReset 0x00 0x00 0x00 Reset
28:25Reserved.--
24BUSY: This flag goes high when the channel starts a new transfer sequence, BUSY is high pauses the channel, and BUSY will stay high while paused.RO0x0
23SNIFF_EN: If 1, this channel’s data transfers are visible to the sniff hardware, the sniff hardware is enabled, and has this channel selected.RW0x0
22BSWAP: Apply byte-swap transformation to DMA data. For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order.RW0x0
21IRQ_QUIET: In QUIET mode, the channel does not generate IRQs at the end of register, indicating the end of a control block chain. This reduces the number of interrupts to be serviced by the CPU when transferring a DMA chain of many small control blocks.RW0x0
20:15TREQ_SEL: Select a Transfer Request signal. The channel uses the transfer request signal to pace its data transfer rate. Sources for TREQ signals are internal (TIMERS) or external (DREQ, a Data Request from the system).RW0x00
0x0 to 0x3a 0x3b → 0x3c →→ select DREQ n as TREQ Enumerated values: TIMER0: Select Timer 0 as TREQ TIMER1: Select Timer 1 as TREQ
14:110x3f → 0x3e → 0x3d → CHAIN_TOPERMANENT: Permanent request, for unpaced transfers. TIMER3: Select Timer 3 as TREQ (Optional) TIMER2: Select Timer 2 as TREQ (Optional) : When this channel completes, it will trigger the channel indicatedRW0x0
by CHAIN_TO. Disable by setting CHAIN_TO =(this channel) .
10RING_SEL: Select whether RING_SIZE applies to read or write addresses. addresses are wrapped.RW0x0
BitsDescriptionTypeReset
9:6

RING_SIZE: Size of address wrap region. If 0, don't wrap. For values \( n > 0 \) , only the lower \( n \) bits of the address will change. This wraps the address on a \( (1 \ll n) \) byte boundary, facilitating access to naturally-aligned ring buffers.

Ring sizes between 2 and 32768 bytes are possible. This can apply to either read or write addresses, based on value of RING_SEL.

RW0x0
Enumerated values:
0x0 → RING_NONE
5

INCR_WRITE: If 1, the write address increments with each transfer. If 0, each write is directed to the same, initial address.

Generally this should be disabled for memory-to-peripheral transfers.

RW0x0
4

INCR_READ: If 1, the read address increments with each transfer. If 0, each read is directed to the same, initial address.

Generally this should be disabled for peripheral-to-memory transfers.

RW0x0
3:2

DATA_SIZE: Set the size of each bus transfer (byte/halfword/word). READ_ADDR and WRITE_ADDR advance by this amount (1/2/4 bytes) with each transfer.

RW0x0
Enumerated values:
0x0 → SIZE_BYTE
0x1 → SIZE_HALFWORD
0x2 → SIZE_WORD
1

HIGH_PRIORITY: HIGH_PRIORITY gives a channel preferential treatment in issue scheduling: in each scheduling round, all high priority channels are considered first, and then only a single low priority channel, before returning to the high priority channels.

This only affects the order in which the DMA schedules channels. The DMA's bus priority is not changed. If the DMA is not saturated then a low priority channel will see no loss of throughput.

RW0x0
0

EN: DMA Channel Enable.

When 1, the channel will respond to triggering events, which will cause it to become BUSY and start transferring data. When 0, the channel will ignore triggers, stop issuing transfers, and pause the current transfer sequence (i.e. BUSY will remain high if already high)

RW0x0

DMA: CH0_AL1_CTRL, CH1_AL1_CTRL, ..., CH10_AL1_CTRL, CH11_AL1_CTRL Registers

Offsets: 0x010, 0x050, ..., 0x290, 0x2d0

Table 125.

CH0_AL1_CTRL,
CH1_AL1_CTRL, ...,
CH10_AL1_CTRL,
CH11_AL1_CTRL
Registers

BitsDescriptionTypeReset
31:0Alias for channel N CTRL registerRW-

DMA: CH0_AL1_READ_ADDR, CH1_AL1_READ_ADDR, ...,
CH10_AL1_READ_ADDR, CH11_AL1_READ_ADDR Registers

Offsets: 0x014, 0x054, ..., 0x294, 0x2d4

Table 126.

CH0_AL1_READ_ADDR
,
CH1_AL1_READ_ADDR
, ...,
CH10_AL1_READ_ADDR,
CH11_AL1_READ_ADDR
Registers

BitsDescriptionTypeReset
31:0Alias for channel N READ_ADDR registerRW-

DMA: CH0_AL1_WRITE_ADDR, CH1_AL1_WRITE_ADDR, ...,
CH10_AL1_WRITE_ADDR, CH11_AL1_WRITE_ADDR Registers

Offsets: 0x018, 0x058, ..., 0x298, 0x2d8

Table 127.

CH0_AL1_WRITE_ADDR,
CH1_AL1_WRITE_ADDR,
...,
CH10_AL1_WRITE_ADDR,
CH11_AL1_WRITE_ADDR
Registers

BitsDescriptionTypeReset
31:0Alias for channel N WRITE_ADDR registerRW-

DMA: CH0_AL1_TRANS_COUNT_TRIG, CH1_AL1_TRANS_COUNT_TRIG, ...,
CH10_AL1_TRANS_COUNT_TRIG, CH11_AL1_TRANS_COUNT_TRIG Registers

Offsets: 0x01c, 0x05c, ..., 0x29c, 0x2dc

Table 128.

CH0_AL1_TRANS_COUNT_TRIG,
CH1_AL1_TRANS_COUNT_TRIG, ...,
CH10_AL1_TRANS_COUNT_TRIG,
CH11_AL1_TRANS_COUNT_TRIG
Registers

BitsDescriptionTypeReset
31:0Alias for channel N TRANS_COUNT register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
RW-

DMA: CH0_AL2_CTRL, CH1_AL2_CTRL, ..., CH10_AL2_CTRL, CH11_AL2_CTRL
Registers

Offsets: 0x020, 0x060, ..., 0x2a0, 0x2e0

Table 129.

CH0_AL2_CTRL,
CH1_AL2_CTRL, ...,
CH10_AL2_CTRL,
CH11_AL2_CTRL
Registers

BitsDescriptionTypeReset
31:0Alias for channel N CTRL registerRW-

DMA: CH0_AL2_TRANS_COUNT, CH1_AL2_TRANS_COUNT, ...,
CH10_AL2_TRANS_COUNT, CH11_AL2_TRANS_COUNT Registers

Offsets: 0x024, 0x064, ..., 0x2a4, 0x2e4

Table 130.

CH0_AL2_TRANS_COUNT,
CH1_AL2_TRANS_COUNT, ...,
CH10_AL2_TRANS_COUNT,
CH11_AL2_TRANS_COUNT
Registers

BitsDescriptionTypeReset
31:0Alias for channel N TRANS_COUNT registerRW-

DMA: CH0_AL2_READ_ADDR, CH1_AL2_READ_ADDR, ...,
CH10_AL2_READ_ADDR, CH11_AL2_READ_ADDR Registers

Offsets: 0x028, 0x068, ..., 0x2a8, 0x2e8

Table 131.
CH0_AL2_READ_ADDR
,
CH1_AL2_READ_ADDR
, ...,
CH10_AL2_READ_ADDR
,
CH11_AL2_READ_ADDR
Registers

BitsDescriptionTypeReset
31:0Alias for channel N READ_ADDR registerRW-

DMA: CH0_AL2_WRITE_ADDR_TRIG, CH1_AL2_WRITE_ADDR_TRIG, ...,
CH10_AL2_WRITE_ADDR_TRIG, CH11_AL2_WRITE_ADDR_TRIG Registers

Offsets: 0x02c, 0x06c, ..., 0x2ac, 0x2ec

Table 132.
CH0_AL2_WRITE_ADDR
_TRIG,
CH1_AL2_WRITE_ADDR
_TRIG, ...,
CH10_AL2_WRITE_ADDR
_TRIG,
CH11_AL2_WRITE_ADDR
_TRIG Registers

BitsDescriptionTypeReset
31:0Alias for channel N WRITE_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
RW-

DMA: CH0_AL3_CTRL, CH1_AL3_CTRL, ..., CH10_AL3_CTRL, CH11_AL3_CTRL
Registers

Offsets: 0x030, 0x070, ..., 0x2b0, 0x2f0

Table 133.
CH0_AL3_CTRL,
CH1_AL3_CTRL, ...,
CH10_AL3_CTRL,
CH11_AL3_CTRL
Registers

BitsDescriptionTypeReset
31:0Alias for channel N CTRL registerRW-

DMA: CH0_AL3_WRITE_ADDR, CH1_AL3_WRITE_ADDR, ...,
CH10_AL3_WRITE_ADDR, CH11_AL3_WRITE_ADDR Registers

Offsets: 0x034, 0x074, ..., 0x2b4, 0x2f4

Table 134.
CH0_AL3_WRITE_ADDR
,
CH1_AL3_WRITE_ADDR
, ...,
CH10_AL3_WRITE_ADDR
,
CH11_AL3_WRITE_ADDR
Registers

BitsDescriptionTypeReset
31:0Alias for channel N WRITE_ADDR registerRW-

DMA: CH0_AL3_TRANS_COUNT, CH1_AL3_TRANS_COUNT, ...,
CH10_AL3_TRANS_COUNT, CH11_AL3_TRANS_COUNT Registers

Offsets: 0x038, 0x078, ..., 0x2b8, 0x2f8

Table 135.
CH0_AL3_TRANS_COUNT,
CH1_AL3_TRANS_COUNT,
...,
CH10_AL3_TRANS_COUNT,
CH11_AL3_TRANS_COUNT
Registers

BitsDescriptionTypeReset
31:0Alias for channel N TRANS_COUNT registerRW-

DMA: CH0_AL3_READ_ADDR_TRIG, CH1_AL3_READ_ADDR_TRIG, ...,
CH10_AL3_READ_ADDR_TRIG, CH11_AL3_READ_ADDR_TRIG Registers

Offsets: 0x03c, 0x07c, ..., 0x2bc, 0x2fc

Table 136.
CH0_AL3_READ_ADDR
_TRIG,
CH1_AL3_READ_ADDR
_TRIG, ...,
CH10_AL3_READ_ADDR
_TRIG,
CH11_AL3_READ_ADDR
_TRIG Registers

BitsDescriptionTypeReset
31:0Alias for channel N READ_ADDR register
This is a trigger register (0xc). Writing a nonzero value will reload the channel counter and start the channel.
RW-

DMA: INTR Register

Offset: 0x400

Description

Interrupt Status (raw)

Table 137. INTR Register

BitsDescriptionTypeReset
31:16Reserved.--
15:0

Raw interrupt status for DMA Channels 0..15. Bit n corresponds to channel n. Ignores any masking or forcing. Channel interrupts can be cleared by writing a bit mask to INTR, INTS0 or INTS1.

Channel interrupts can be routed to either of two system-level IRQs based on INTE0 and INTE1.

This can be used vector different channel interrupts to different ISRs: this might be done to allow NVIC IRQ preemption for more time-critical channels, or to spread IRQ load across different cores.

It is also valid to ignore this behaviour and just use INTE0/INTS0/IRQ 0.

WC0x0000

DMA: INTE0 Register

Offset: 0x404

Description

Interrupt Enables for IRQ 0

Table 138. INTE0 Register

BitsDescriptionTypeReset
31:16Reserved.--
15:0Set bit n to pass interrupts from channel n to DMA IRQ 0.RW0x0000

DMA: INTF0 Register

Offset: 0x408

Description

Force Interrupts

Table 139. INTF0 Register

BitsDescriptionTypeReset
31:16Reserved.--
15:0Write 1s to force the corresponding bits in INTE0. The interrupt remains asserted until INTF0 is cleared.RW0x0000

DMA: INTS0 Register

Offset: 0x40c

Description

Interrupt Status for IRQ 0

Table 140. INTS0 Register

BitsDescriptionTypeReset
31:16Reserved.--
15:0Indicates active channel interrupt requests which are currently causing IRQ 0 to be asserted.
Channel interrupts can be cleared by writing a bit mask here.
WC0x0000

DMA: INTE1 Register

Offset: 0x414

Description

Interrupt Enables for IRQ 1

Table 141. INTE1 Register

BitsDescriptionTypeReset
31:16Reserved.--
15:0Set bit n to pass interrupts from channel n to DMA IRQ 1.RW0x0000

DMA: INTF1 Register

Offset: 0x418

Description

Force Interrupts for IRQ 1

Table 142. INTF1 Register

BitsDescriptionTypeReset
31:16Reserved.--
15:0Write 1s to force the corresponding bits in INTE0. The interrupt remains asserted until INTF0 is cleared.RW0x0000

DMA: INTS1 Register

Offset: 0x41c

Description

Interrupt Status (masked) for IRQ 1

Table 143. INTS1 Register

BitsDescriptionTypeReset
31:16Reserved.--
15:0Indicates active channel interrupt requests which are currently causing IRQ 1 to be asserted.
Channel interrupts can be cleared by writing a bit mask here.
WC0x0000

DMA: TIMER0, TIMER1, TIMER2, TIMER3 Registers

Offsets: 0x420, 0x424, 0x428, 0x42c

Description

Pacing (X/Y) Fractional Timer

The pacing timer produces TREQ assertions at a rate set by \( ((X/Y) * \text{sys\_clk}) \) . This equation is evaluated every \( \text{sys\_clk} \) cycles and therefore can only generate TREQs at a rate of 1 per \( \text{sys\_clk} \) (i.e. permanent TREQ) or less.

Table 144. TIMER0, TIMER1, TIMER2, TIMER3 Registers

BitsDescriptionTypeReset
31:16X: Pacing Timer Dividend. Specifies the X value for the (X/Y) fractional timer.RW0x0000
BitsDescriptionTypeReset
15:0Y : Pacing Timer Divisor. Specifies the Y value for the (X/Y) fractional timer.RW0x0000

DMA: MULTI_CHAN_TRIGGER Register

Offset: 0x430

Description

Trigger one or more channels simultaneously

Table 145.
MULTI_CHAN_TRIGGER Register

BitsDescriptionTypeReset
31:16Reserved.--
15:0Each bit in this register corresponds to a DMA channel. Writing a 1 to the relevant bit is the same as writing to that channel's trigger register; the channel will start if it is currently enabled and not already busy.SC0x0000

DMA: SNIFF_CTRL Register

Offset: 0x434

Description

Sniffer Control

Table 146.
SNIFF_CTRL Register

BitsDescriptionTypeReset
31:12Reserved.--
11OUT_INV : If set, the result appears inverted (bitwise complement) when read. This does not affect the way the checksum is calculated; the result is transformed on-the-fly between the result register and the bus.RW0x0
10OUT_REV : If set, the result appears bit-reversed when read. This does not affect the way the checksum is calculated; the result is transformed on-the-fly between the result register and the bus.RW0x0
9BSWAP : Locally perform a byte reverse on the sniffed data, before feeding into checksum.

Note that the sniff hardware is downstream of the DMA channel byteswap performed in the read master: if channel CTRL_BSWAP and SNIFF_CTRL_BSWAP are both enabled, their effects cancel from the sniffer's point of view.
RW0x0
8:5CALCRW0x0
Enumerated values:
0x0 → CRC32: Calculate a CRC-32 (IEEE802.3 polynomial)
0x1 → CRC32R: Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data
0x2 → CRC16: Calculate a CRC-16-CCITT
0x3 → CRC16R: Calculate a CRC-16-CCITT with bit reversed data
0xe → EVEN: XOR reduction over all data. == 1 if the total 1 population count is odd.
0xf → SUM: Calculate a simple 32-bit checksum (addition with a 32 bit accumulator)
BitsDescriptionTypeReset
4:1DMACH : DMA channel for Sniffer to observeRW0x0
0EN : Enable snifferRW0x0

DMA: SNIFF_DATA Register

Offset: 0x438

Description

Data accumulator for sniff hardware

Table 147.
SNIFF_DATA Register

BitsDescriptionTypeReset
31:0Write an initial seed value here before starting a DMA transfer on the channel indicated by SNIFF_CTRL_DMACH. The hardware will update this register each time it observes a read from the indicated channel. Once the channel completes, the final result can be read from this register.RW0x00000000

DMA: FIFO_LEVELS Register

Offset: 0x440

Description

Debug RAF, WAF, TDF levels

Table 148.
FIFO_LEVELS Register

BitsDescriptionTypeReset
31:24Reserved.--
23:16RAF_LVL : Current Read-Address-FIFO fill levelRO0x00
15:8WAF_LVL : Current Write-Address-FIFO fill levelRO0x00
7:0TDF_LVL : Current Transfer-Data-FIFO fill levelRO0x00

DMA: CHAN_ABORT Register

Offset: 0x444

Description

Abort an in-progress transfer sequence on one or more channels

Table 149.
CHAN_ABORT
Register

BitsDescriptionTypeReset
31:16Reserved.--
15:0Each bit corresponds to a channel. Writing a 1 aborts whatever transfer sequence is in progress on that channel. The bit will remain high until any in-flight transfers have been flushed through the address and data FIFOs.

After writing, this register must be polled until it returns all-zero. Until this point, it is unsafe to restart the channel.
SC0x0000

DMA: N_CHANNELS Register

Offset: 0x448

Table 150.
N_CHANNELS Register

BitsDescriptionTypeReset
31:5Reserved.--
BitsDescriptionTypeReset
4:0The number of channels this DMA instance is equipped with. This DMA supports up to 16 hardware channels, but can be configured with as few as one, to minimise silicon area.RO-

DMA: CH0_DBG_CTDREQ, CH1_DBG_CTDREQ, ..., CH10_DBG_CTDREQ, CH11_DBG_CTDREQ Registers

Offsets: 0x800, 0x840, ..., 0xa80, 0xac0

Table 151.
CH0_DBG_CTDREQ,
CH1_DBG_CTDREQ, ...,
CH10_DBG_CTDREQ,
CH11_DBG_CTDREQ
Registers

BitsDescriptionTypeReset
31:6Reserved.--
5:0Read: get channel DREQ counter (i.e. how many accesses the DMA expects it can perform on the peripheral without overflow/underflow. Write any value: clears the counter, and cause channel to re-initiate DREQ handshake.WC0x00

DMA: CH0_DBG_TCR, CH1_DBG_TCR, ..., CH10_DBG_TCR, CH11_DBG_TCR Registers

Offsets: 0x804, 0x844, ..., 0xa84, 0xac4

Table 152.
CH0_DBG_TCR,
CH1_DBG_TCR, ...,
CH10_DBG_TCR,
CH11_DBG_TCR
Registers

BitsDescriptionTypeReset
31:0Read to get channel TRANS_COUNT reload value, i.e. the length of the next transferRO0x00000000