869
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
Figure 36-8. Read Functional Flow Diagram
Note:
1. It is assumed that this command has been correctly sent (see
Read status register HSMCI_SR
Send SELECT/DESELECT_CARD
command
(1)
to select the card
Send SET_BLOCKLEN command
(1)
Read with PDC
Reset the PDCMODE bit
HSMCI_MR &= ~PDCMODE
Set the block length (in bytes)
HSMCI_MR |= (BlockLenght <<16)
Number of words to read = 0 ?
Poll the bit
RXRDY = 0?
Read data = HSMCI_RDR
Number of words to read =
Number of words to read -1
Send READ_SINGLE_BLOCK
command
(1)
Yes
Set the PDCMODE bit
HSMCI_MR |= PDCMODE
Set the block length (in bytes)
HSMCI_MR |= (BlockLength << 16)
Configure the PDC channel
HSMCI_RPR = Data Buffer Address
HSMCI_RCR = BlockLength/4
HSMCI_PTCR = RXTEN
Send READ_SINGLE_BLOCK
command
(1)
Read status register HSMCI_SR
Poll the bit
ENDRX = 0?
Yes
RETURN
RETURN
Yes
No
No
No
Yes
No
Number of words to read = BlockLength/4
Summary of Contents for SAM4S Series
Page 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Page 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...