![Atmel SAM4S Series Preliminary Data Sheet Download Page 872](http://html1.mh-extra.com/html/atmel/sam4s-series/sam4s-series_preliminary-data-sheet_3003408872.webp)
872
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
The following flowchart (
) shows how to manage a multiple write block transfer with
the PDC. Polling or interrupt method can be used to wait for the end of write according to the
contents of the Interrupt Mask Register (HSMCI_IMR).
Figure 36-10. Multiple Write Functional Flow Diagram
Note:
1. It is assumed that this command has been correctly sent (see
).
Send SELECT/DESELECT_CARD
command
(1)
to select the card
Send SET_BLOCKLEN command
(1)
Set the PDCMODE bit
HSMCI_MR |= PDCMODE
Set the block length
HSMCI_MR |= (BlockLength << 16)
Configure the PDC channel
HSMCI_TPR = Data Buffer Address
HSMCI_TCR = BlockLength/4
Send WRITE_MULTIPLE_BLOCK
command
(1)
Read status register HSMCI_SR
Poll the bit
BLKE = 0?
Yes
No
HSMCI_PTCR = TXTEN
Poll the bit
NOTBUSY = 0?
Yes
RETURN
No
Send STOP_TRANSMISSION
command
(1)
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 ...