Section 19 Multimedia Card Interface (MCIF)
Rev. 3.00 Jan 25, 2006 page 669 of 872
REJ09B0286-0300
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
Summary of Contents for H8S/2158
Page 10: ...Rev 3 00 Jan 25 2006 page viii of lii...
Page 36: ...Rev 3 00 Jan 25 2006 page xxxiv of lii B Product Lineup 863 C Package Dimensions 864 Index 865...
Page 47: ...Rev 3 00 Jan 25 2006 page xlv of lii Appendix Figure C 1 Package Dimensions TBP 112A 864...
Page 54: ...Rev 3 00 Jan 25 2006 page lii of lii...
Page 70: ...Section 1 Overview Rev 3 00 Jan 25 2006 page 16 of 872 REJ09B0286 0300...
Page 118: ...Section 3 MCU Operating Modes Rev 3 00 Jan 25 2006 page 64 of 872 REJ09B0286 0300...
Page 126: ...Section 4 Exception Handling Rev 3 00 Jan 25 2006 page 72 of 872 REJ09B0286 0300...
Page 198: ...Section 6 Bus Controller Rev 3 00 Jan 25 2006 page 144 of 872 REJ09B0286 0300...
Page 326: ...Section 10 8 Bit PWM Timer PWM Rev 3 00 Jan 25 2006 page 272 of 872 REJ09B0286 0300...
Page 440: ...Section 15 Watchdog Timer WDT Rev 3 00 Jan 25 2006 page 386 of 872 REJ09B0286 0300...
Page 606: ...Section 17 I 2 C Bus Interface IIC Rev 3 00 Jan 25 2006 page 552 of 872 REJ09B0286 0300...
Page 742: ...Section 19 Multimedia Card Interface MCIF Rev 3 00 Jan 25 2006 page 688 of 872 REJ09B0286 0300...
Page 750: ...Section 21 D A Converter Rev 3 00 Jan 25 2006 page 696 of 872 REJ09B0286 0300...
Page 768: ...Section 22 A D Converter Rev 3 00 Jan 25 2006 page 714 of 872 REJ09B0286 0300...
Page 770: ...Section 23 RAM Rev 3 00 Jan 25 2006 page 716 of 872 REJ09B0286 0300...
Page 824: ...Section 26 Clock Pulse Generator Rev 3 00 Jan 25 2006 page 770 of 872 REJ09B0286 0300...
Page 844: ...Section 27 Power Down Modes Rev 3 00 Jan 25 2006 page 790 of 872 REJ09B0286 0300...
Page 878: ...Section 28 List of Registers Rev 3 00 Jan 25 2006 page 824 of 872 REJ09B0286 0300...
Page 926: ...Index Rev 3 00 Jan 25 2006 page 872 of 872 REJ09B0286 0300...