Commands With Write Data - Renesas H8S/2158 User Manual

16-bit single-chip microcomputer h8s family/h8s/2100 series
Table of Contents

Advertisement

19.5.6

Commands with Write Data

Commands involving write data confirm the MMC status by the command responses after
command transmission, and then transmit MMC information and flash memory data from the
MCDAT pin. For a command that is related to time-consuming processing such as flash memory
write, the MMC indicates the data busy state via the DAT pin.
The number of bytes of flash memory to be written is a block size specified by CMD16, or if not
specified, writing is continued until it is aborted by CMD12M in multiblock transfer and stream
transfer. For multiblock transfer, the instruction for continuing the command sequence is made by
suspending the transfer for every block.
The suspension of the command sequence depends on the sizes of the block and transmit data
FIFO. The command sequence is executed without suspending the data transfer when block size ≤
transmit data FIFO size in single-block transfer. In multiblock transfer, the command sequence is
suspended for every block. When block size > transmit data FIFO size, the command sequence is
suspended by FIFO empty. When the command sequence is suspended, the next data is written to
the transmit data FIFO, and the command sequence is then continued.
Figures 19.12 to 19.15 show examples of the command sequence for commands with write data.
Figure 19.16 shows the operational flow for commands with write data.
• Settings needed to issue a command are made. Write data is set to the transmit data FIFO.
• The START bit in CMDSTRT is set to 1 to start command transmission. Command
transmission complete can be confirmed by the command transmission end interrupt (CMDI).
• A command response is received from the MMC. If the MMC does not return the command
response, the command response is detected by the command timeout error (CTERI).
• The DATAEN bit in OPCR is set to start write data transmission.
• Suspension inter-blocks in multiblock transfer and suspension according to the transmit data
FIFO empty are detected by the data transfer end interrupt (DTI), data response end interrupt
(DRPI), and FIFO empty interrupt (FEI), respectively. In addition, when the command
sequence is suspended by the end of data transfer, cancellation of the data busy status is
detected by the data busy end interrupt (DBSYI). To continue the command sequence, data
should be written to the transmit data FIFO, and the DATAEN bit in OPCR should be set to 1.
To abort the command sequence, the CMDOFF bit in OPCR should be set to 1, and CMD12M
should be issued.
• Detection of the end of a command sequence depends on the command types. In multiblock
transfer of an extended command in SPI mode, the end of the command sequence is detected
by the block transfer end interrupt (BTI) or data response end interrupt (DRPI) after the
desired number of blocks has been transmitted. In other commands, the end of the command
Section 19 Multimedia Card Interface (MCIF)
Rev. 3.00 Jan 25, 2006 page 669 of 872
REJ09B0286-0300

Advertisement

Table of Contents
loading

Table of Contents