Atmel Evaluation Kit AT91SAM9X25-EK AT91SAM9X25-EK Hoja De Datos
![Atmel](https://files.manualsbrain.com/attachments/0369829915bda09f9c2e00fb805a7753579683b5/common/fit/150/50/8d2bf08978ec3e5bc63f4343ac5e91ce8d0e40045619fa520d910d64af8f/brand_logo.png)
Los códigos de productos
AT91SAM9X25-EK
618
SAM9X25 [DATASHEET]
11054E–ATARM–10-Mar-2014
Figure 34-10.Read Multiple Block and Write Multiple Block
).
2. Handle errors reported in HSMCI_SR.
34.8.5 WRITE_SINGLE_BLOCK Operation using DMA Controller
1.
Wait until the current command execution has successfully terminated.
3. Check that CMDRDY and NOTBUSY fields are asserted in HSMCI_SR
2.
Program the block length in the card. This value defines the value block_length.
3.
Program the block length in the HSMCI Configuration Register with block_length value.
Send SELECT/DESELECT_CARD
command
(1)
to select the card
Send SET_BLOCKLEN command
(1)
Set the block length
HSMCI_MR |= (BlockLength << 16)
Set the DMAEN bit
HSMCI_DMA |= DMAEN
HSMCI_MR |= (BlockLength << 16)
Set the DMAEN bit
HSMCI_DMA |= DMAEN
Configure the HDMA channel X
DMAC_SADDRx and DMAC_DADDRx
DMAC_BTSIZE = BlockLength/4
DMAC_SADDRx and DMAC_DADDRx
DMAC_BTSIZE = BlockLength/4
Send WRITE_MULTIPLE_BLOCK or
READ_MULTIPLE_BLOCK command
(1)
Read status register DMAC_EBCISR
and Poll Bit CBTC[X]
New Buffer ?
(2)
No
DMAC_CHEN[X] = TRUE
Poll the bit
XFRDONE = 1
No
RETURN
Yes
Send STOP_TRANSMISSION
command
(1)
Yes
Read status register HSMCI_SR
and Poll Bit FIFOEMPTY