Atmel SAM4S-XPLD Atmel ATSAM4S-XPLD ATSAM4S-XPLD Data Sheet
![Atmel](https://files.manualsbrain.com/attachments/0369829915bda09f9c2e00fb805a7753579683b5/common/fit/150/50/8d2bf08978ec3e5bc63f4343ac5e91ce8d0e40045619fa520d910d64af8f/brand_logo.png)
Product codes
ATSAM4S-XPLD
818
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
Figure 37-8. Read Functional Flow Diagram
Note:
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
HSMCI_MR
= PDCMODE
Set the block length (in bytes)
HSMCI_MR = (BlockLenght
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
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
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