SAM3SD8C Atmel Corporation, SAM3SD8C Datasheet - Page 835

no-image

SAM3SD8C

Manufacturer Part Number
SAM3SD8C
Description
Manufacturer
Atmel Corporation
Datasheets
Figure 34-9. Write Functional Flow Diagram
Note:
11090A–ATARM–10-Feb-12
11090A–ATARM–10-Feb-12
1. It is assumed that this command has been correctly sent (see
Number of words to write = BlockLength/4
Reset the PDCMODE bit
HSMCI_MR &= ~PDCMODE
Set the block length
HSMCI_MR |= (BlockLenght <<16)
Read status register HSMCI_SR
Number of words to write = 0 ?
Send WRITE_SINGLE_BLOCK
HSMCI_TDR = Data to write
Number of words to write =
Number of words to write -1
No
TXRDY = 0?
command
Poll the bit
No
(1)
No
Send SET_BLOCKLEN command
Send SELECT/DESELECT_CARD
command
Yes
Yes
RETURN
Write using PDC
(1)
to select the card
Figure
(1)
Configure the PDC channel
HSMCI_TPR = Data Buffer Address
HSMCI_TCR = BlockLength/4
Yes
34-7).
Set the PDCMODE bit
HSMCI_MR |= PDCMODE
Set the block length
HSMCI_MR |= (BlockLength << 16)
Read status register HSMCI_SR
Send WRITE_SINGLE_BLOCK
HSMCI_PTCR = TXTEN
NOTBUSY= 0?
command (1)
RETURN
Poll the bit
No
SAM3S8/SD8
SAM3S8/SD8
Yes
835
835

Related parts for SAM3SD8C