UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
299 of 362
NXP Semiconductors
UM10208
Chapter 23: LPC2800 SD/MMC
5.9 Data Length Register (MCIDataLength - 0x8010 0028)
The MCIDataLength register contains the number of data bytes to be transferred. The
value is loaded into the data counter when data transfer starts.
shows the
MCIDataLength register.
For a block data transfer, the value in the data length register must be a multiple of the
block size (see Data control register, MCIDataCtrl).
To initiate a data transfer, write to the data timer register and the data length register
before writing to the data control register.
5.10 Data Control Register (MCIDataCtrl - 0x8010 002C)
The MCIDataCtrl register controls the DPSM.
register.
Note: After a data write, data cannot be written to this register for three MCLK clock
periods plus two PCLK clock periods.
Data transfer starts when a 1 is written to the Enable bit. Depending on the Direction bit,
the DPSM moves to the WAIT_S or WAIT_R state. It is not necessary to clear the enable
bit after the data transfer. BlockSize controls the data block length if Mode is 0, as shown
in
Table 341. Data Length register (MCIDataLength - 0x8010 0028)
Bit
Symbol
Description
Reset
Value
15:0
DataLength
Data length value
0x0000
31:16
-
Reserved, user software should not write ones to reserved bits.
The value read from a reserved bit is not defined.
-
Table 342. Data Control register (MCIDataCtrl - 0x8010 002C)
Bit
Symbol
Description
Reset
Value
0
XferEnab
Write a 1 to this bit to enable a data transfer.
0
1
Direction
Write a 0 to this bit to select transfer from controller to card. Write a 1
to select transfer from card to controller.
0
2
StreamMode Write a 0 to this bit to select a block mode transfer. Write a 1 to select
a stream mode transfer.
0
3
DMAEnable
Write a 0 to this bit to select a programmed I/O transfer, in which
software reads data from or writes data to the MCIFIFO register block.
Write a 1 (and program the SDMA accordingly) to select data transfer
by the SDMA.
0
7:4
BlockSize
Data block length (if Mode is 0)
0
31:8 -
Reserved, user software should not write ones to reserved bits. The
value read from a reserved bit is not defined.
-
Table 343. Data Block Length
Block size
Block length
0
20 = 1 byte.
1
21 = 2 bytes.