SAM3X8E Atmel Corporation, SAM3X8E Datasheet - Page 933

no-image

SAM3X8E

Manufacturer Part Number
SAM3X8E
Description
Manufacturer
Atmel Corporation
Datasheets
Figure 37-10. Write Functional Flow Diagram
Note:
11057A–ATARM–17-Feb-12
11057A–ATARM–17-Feb-12
1. It is assumed that this command has been correctly sent (see
2. This field is also accessible in the HSMCI Block Register (HSMCI_BLKR).
Number of words to write = BlockLength/4
Reset theDMAEN bit
HSMCI_DMA &= ~DMAEN
Set the block length (in bytes)
HSMCI_MR |= (BlockLength) <<16) (2)
Set the block count (if necessary)
HSMCI_BLKR |= (BlockCount << 0)
Read status register HSMCI_SR
Number of words to write = 0 ?
Send WRITE_SINGLE_BLOCK
HSMCI_TDR = Data to write
Number of words to write =
Number of words to write -1
No
TXRDY = 0?
command (1)
Poll the bit
No
No
Send SET_BLOCKLEN command (1)
Send SELECT/DESELECT_CARD
command (1) to select the card
Yes
Yes
Write using DMAC
RETURN
Figure
Configure the DMA channel X
DMAC_DADDRx = Data Address to write
DMAC_BTSIZE = BlockLength/4
Set the DMAEN bit
HSMCI_DMA |= DMAEN
Set the block length (in bytes)
HSMCI_BLKR |= (BlockLength << 16)
Yes
37-8).
Read status register HSMCI_SR
Send WRITE_SINGLE_BLOCK
DMAC_CHEN[X] = TRUE
XFRDONE = 0?
command (1)
Poll the bit
RETURN
No
(2)
Yes
SAM3X/A
SAM3X/A
933
933

Related parts for SAM3X8E