7 using the peripheral dma controller (pdc) – Rainbow Electronics AT91CAP9S250A User Manual

Page 492

Advertising
background image

492

6264A–CAP–21-May-07

AT91CAP9S500A/AT91CAP9S250A

34.7.7

Using the Peripheral DMA Controller (PDC)

The use of the PDC significantly reduces the CPU load.

To assure correct implementation, respect the following programming sequences:

34.7.7.1

Data Transmit with the PDC

1.

Initialize the transmit PDC (memory pointers, size, etc.).

2.

Configure the master mode (DADR, CKDIV, etc.).

3.

Start the transfer by setting the PDC TXTEN bit.

4.

Wait for the PDC end TX flag.

5.

Disable the PDC by setting the PDC TXDIS bit.

34.7.7.2

Data Receive with the PDC

1.

Initialize the receive PDC (memory pointers, size - 1, etc.).

2.

Configure the master mode (DADR, CKDIV, etc.).

3.

Start the transfer by setting the PDC RXTEN bit.

4.

Wait for the PDC end RX flag.

5.

Disable the PDC by setting the PDC RXDIS bit.

Advertising