RM0432
1.
Initialize the stream data in the DPSM, DTMODE = MCC stream data transfer.
2.
Send the WRITE_DATA_STREAM command from the CPSM with CMDTRANS = 1.
3.
Preload CMD12 in command registers, with the CMDSTOP bit set.
4.
Configure the CPSM to send a command only after a wait pending (WAITPEND = 1)
end of last data (according DATALENGTH).
5.
Enabling the CPSM to send the STOP_TRANSMISSION command, the stream data
End bit and command End bit will be aligned.
a)
b)
6.
The write stream data can be aborted any time by clearing the WAITPEND bit. This will
cause the Preloaded CMD12 to be sent immediately and stop the write data stream.
To stop the read stream transfer after the last byte, the CMD12 End bit timing shall occur
after the last data stream byte. The following read stream data procedure applies:
1.
Wait for all data to be received by the DPSM (DATAEND flag).
a)
2.
Send CMD12 by the CPSM.
a)
Note:
The SDMMC will not receive any more data from the card when DATACOUNT = 0, even
when the card continues sending data.
Block operation and CMD12
To stop block transfer at the end of the data, the CMD12 End bit shall be sent after the last
block End bit.
When writing data to the card the CMD12 End bit shall be sent after the write data block
CRC token End bit. This requires the CMD12 sending to be tied to the data block
transmission timing. To stop an Open-ended Multiple block write, the following procedure
applies:
Secure digital input/output MultiMediaCard interface (SDMMC)
When DATALENGTH > 5 bytes, Command CMD12 will be waited in the CPSM to
be aligned with the data transfer End bit.
When DATALENGHT < 5 bytes, Command CMD12 will be started before and the
DPSM will remain in the Wait_S state to align the data transfer end with the
CMD12 End bit.
Figure 592. CMD12 stream timing
SDMMC_CK
SDMMC_CMD
SDMMC_D0
The DPSM will not receive more data than indicated by DATALENGTH, even if the
card is sending more data.
CMD12 will stop the card sending data.
CMD12
E
Stream data last byte
RM0432 Rev 6
E
N
ST
MSv40942V1
2003/2301
2041
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?