Atmel ARM-Based Evaluation Kit for SAM4S16C, 32-Bit ARM® Cortex® Microcontroller ATSAM4S-WPIR-RD ATSAM4S-WPIR-RD 데이터 시트

제품 코드
ATSAM4S-WPIR-RD
다운로드
페이지 1231
SAM4S Series [DATASHEET]
Atmel-11100G-ATARM-SAM4S-Datasheet_27-May-14
892
Figure 38-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_BLKR |= (BlockLength <<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_BLKR |= (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