Atmel ARM-Based Evaluation Kit AT91SAM9N12-EK AT91SAM9N12-EK Fiche De Données

Codes de produits
AT91SAM9N12-EK
Page de 1104
578
SAM9N12/SAM9CN11/SAM9CN12 [DATASHEET]
11063K–ATARM–05-Nov-13
–SCSIZE must be set according to the value of HSMCI_DMA, CHKSIZE field.
–BTSIZE is programmed with block_length[1:0]. (last 1, 2, or 3 bytes of the buffer).
14. Configure the fields of LLI_B.DMAC_CTRLBx as follows:
–DST_INCR is set to INCR
–SRC_INCR is set to INCR
–FC field is programmed with peripheral to memory flow control mode.
–Both SRC_DSCR and DST_DSCR are set to 1 (descriptor fetch is disabled) or Next descriptor 
location points to 0.
–DIF and SIF are set with their respective layer ID. If SIF is different from DIF, DMA Controller is able 
to prefetch data and write HSMCI simultaneously.
15. Configure the LLI_B.DMAC_CFGx memory location for Channel x as follows:
–FIFOCFG defines the watermark of the DMA channel FIFO.
–SRC_H2SEL is set to true to enable hardware handshaking on the destination.
–SRC_PER is programmed with the hardware handshaking ID of the targeted HSMCI Host 
Controller.
16. Program LLI_B.DMAC_DSCR with 0.
17. Program the DMAC_CTRLBx register for Channel x with 0. Its content is updated with the LLI fetch 
operation.
18. Program DMAC_DSCRx with the address of LLI_W if block_length greater than 4 else with address of 
LLI_B.
19. Enable Channel x writing one to DMAC_CHER[x]. The DMAC is ready and waiting for request.
3.
Wait for XFRDONE in the HSMCI_SR. 
35.8.6.3 Block Length is Not Multiple of 4, with Padding Value (ROPT field in HSMCI_DMA register set to 1)
When the ROPT field is set to one, The DMA Controller performs only WORD access on the bus to transfer a non-
multiple of 4 block length. Unlike previous flow, in which the transfer size is rounded to the nearest multiple of 4.
1.
Program the HSMCI Interface, see previous flow.
ROPT field is set to 1.
2.
Program the DMA Controller
1.
Read the channel register to choose an available (disabled) channel.
2.
Clear any pending interrupts on the channel from the previous DMA transfer by reading the 
DMAC_EBCISR.
3.
Program the channel registers.
4.
The DMAC_SADDRx register for Channel x must be set with the starting address of the HSMCI_FIFO 
address.
5.
The DMAC_DADDRx register for Channel x must be word aligned.
6.
Configure the fields of DMAC_CTRLAx for Channel x as follows:
–DST_WIDTH is set to WORD
–SRC_WIDTH is set to WORD
–SCSIZE must be set according to the value of HSMCI_DMA.CHKSIZE Field.
–BTSIZE is programmed with CEILING(block_length/4).
7.
Configure the fields of DMAC_CTRLBx for Channel x as follows:
–DST_INCR is set to INCR
–SRC_INCR is set to INCR
–FC field is programmed with peripheral to memory flow control mode.