SAM3A8C Atmel Corporation, SAM3A8C Datasheet - Page 931

no-image

SAM3A8C

Manufacturer Part Number
SAM3A8C
Description
Manufacturer
Atmel Corporation
Datasheets
Figure 37-9. Read Functional Flow Diagram
Notes:
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 read = BlockLength/4
Reset the DMAEN bit
HSMCI_DMA &= ~DMAEN
Set the block length (in bytes)
HSMCI_MR l= (BlockLength<<16) (2)
Set the block count (if neccessary)
HSMCI_BLKR l= (BlockCount<<0)
Read status register HSMCI_SR
Number of words to read = 0 ?
Send READ_SINGLE_BLOCK
Number of words to read -1
Number of words to read =
Read data = HSMCI_RDR
RXRDY = 0?
No
command
Poll the bit
No
(1)
No
Send SET_BLOCKLEN command (1)
Send SELECT/DESELECT_CARD
command (1) to select the card
Yes
Yes
RETURN
Read with DMAC
Figure
Set the DMAEN bit
HSMCI_DMA |= DMAEN
Set the block length (in bytes)
HSMCI_BLKR |= (BlockLength << 16) (2)
Configure the DMA channel X
DMAC_SADDRx = Data Address
DMAC_BTSIZE = BlockLength/4
DMACHEN[X] = TRUE
Send READ_SINGLE_BLOCK
Read status register HSMCI_SR
37-8).
Yes
command (1)
XFRDONE = 0?
RETURN
Poll the bit
No
Yes
SAM3X/A
SAM3X/A
931
931

Related parts for SAM3A8C