Atmel Xplained Evaluation Board AT32UC3A3-XPLD AT32UC3A3-XPLD 数据表

产品代码
AT32UC3A3-XPLD
下载
页码 1021
483
32072H–AVR32–10/2012
AT32UC3A3
23.8.5
Using the Peripheral DMA Controller 
The use of the Peripheral DMA Controller significantly reduces the CPU load. The user can set
up ring buffers for the Peripheral DMA Controller, containing data to transmit or free buffer space
to place received data.
To assure correct behavior, respect the following programming sequences:
23.8.5.1
Data Transmit with the Peripheral DMA Controller
1.
Initialize the transmit Peripheral DMA Controller (memory pointers, size, etc.).
2.
Configure the TWIM (ADR, NBYTES, etc.).
3.
Start the transfer by enabling the Peripheral DMA Controller to transmit.
4.
Wait for the Peripheral DMA Controller end-of-transmit flag.
5.
Disable the Peripheral DMA Controller.
23.8.5.2
Data Receive with the Peripheral DMA Controller
1.
Initialize the receive Peripheral DMA Controller (memory pointers, size, etc.).
2.
Configure the TWIM (ADR, NBYTES, etc.).
3.
Start the transfer by enabling the Peripheral DMA Controller to receive.
4.
Wait for the Peripheral DMA Controller end-of-receive flag.
5.
Disable the Peripheral DMA Controller.
23.8.6
Multi-master Mode
More than one master may access the bus at the same time without data corruption by using
arbitration. 
Arbitration starts as soon as two or more masters place information on the bus at the same time,
and stops (arbitration is lost) for the master that intends to send a logical one while the other
master sends a logical zero.
As soon as arbitration is lost by a master, it stops sending data and listens to the bus in order to
detect a STOP. The SR.ARBLST flag will be set. When the STOP is detected, the master who
lost arbitration may reinitiate the data transfer.
Arbitration is illustrated in 
If the user starts a transfer and if the bus is busy, the TWIM automatically waits for a STOP con-
dition on the bus before initiating the transfer (see 
).
Note:
The state of the bus (busy or free) is not indicated in the user interface.