Atmel Evaluation Kit AT91SAM9X25-EK AT91SAM9X25-EK Scheda Tecnica

Codici prodotto
AT91SAM9X25-EK
Pagina di 1151
480
SAM9X25 [DATASHEET]
11054E–ATARM–10-Mar-2014
interface, the peripheral can signal to the DMAC that it is ready to transmit/receive data, and then the DMAC can access 
the peripheral without the peripheral inserting wait states onto the bus.
31.4.3 Handshaking Interface
Handshaking interfaces are used at the transaction level to control the flow of single or chunk transfers. The operation of 
the handshaking interface is different and depends on whether the peripheral or the DMAC is the flow controller.
The peripheral uses the handshaking interface to indicate to the DMAC that it is ready to transfer/accept data over the 
AMBA bus. A non-memory peripheral can request a DMAC transfer through the DMAC using one of two handshaking 
interfaces:
Hardware handshaking
Software handshaking
Software selects between the hardware or software handshaking interface on a per-channel basis. Software 
handshaking is accomplished through memory-mapped registers, while hardware handshaking is accomplished using a 
dedicated handshaking interface.
31.4.3.1  Software Handshaking
When the slave peripheral requires the DMAC to perform a DMAC transaction, it communicates this request by sending 
an interrupt to the CPU or interrupt controller.
The interrupt service routine then uses the software registers to initiate and control a DMAC transaction. These software 
registers are used to implement the software handshaking interface.
The SRC_H2SEL/DST_H2SEL
 
bit in the DMAC_CFGx channel configuration register must be set to zero to enable 
software handshaking. 
When the peripheral is not the flow controller, then the last transaction register DMAC_LAST is not used, and the values 
in these registers are ignored.
Chunk Transactions
Writing a 1 to the DMAC_CREQ[2x] register starts a source chunk transaction request, where x is the channel number. 
Writing a 1 to the DMAC_CREQ[2x+1] register starts a destination chunk transfer request, where x is the channel 
number.
Upon completion of the chunk transaction, the hardware clears the DMAC_CREQ[2x] or DMAC_CREQ[2x+1].
Single Transactions
Writing a 1 to the DMAC_SREQ[2x] register starts a source single transaction request, where x is the channel number. 
Writing a 1 to the DMAC_SREQ[2x+1] register starts a destination single transfer request, where x is the channel 
number.
Upon completion of the chunk transaction, the hardware clears the DMAC_SREQ[x] or DMAC_SREQ[2x+1].
The software can poll the relevant channel bit in the DMAC_CREQ[2x]/DMAC_CREQ[2x+1] and 
DMAC_SREQ[x]/DMAC_SREQ[2x+1] registers. When both are 0, then either the requested chunk or single transaction 
has completed.
31.4.4 DMAC Transfer Types
A DMAC transfer may consist of single or multi-buffer transfers. On successive buffers of a multi-buffer transfer, the 
DMAC_SADDRx/DMAC_DADDRx registers in the DMAC are reprogrammed using either of the following methods:
Buffer chaining using linked lists
Replay mode
Contiguous address between buffers 
On successive buffers of a multi-buffer transfer, the DMAC_CTRLAx and DMAC_CTRLBx registers in the DMAC are re-
programmed using either of the following methods:
Buffer chaining using linked lists