Clear the flag register
Set the SDCLKCR register
SDSIZE = Transfer data size
SDIMSK1 = 0000 FFFEh
SDIMSK2 = 0000 7F80h
SDSTOP = 0000 0100h
SDBLKCNT = Number of transfer blocks
Response end or
error occurred?
SDSTS1 = 0000 FFFEh Clear the flags.
SDARG = Argument field value
SDCMD = 0000 0012h
CMD18 (multi-block
read) issued
Error (communication error or timeout)
Read the SDRSP54 register Check the response.
SDIMSK1 = 0000 FFFBh
SDIMSK2 = 0000 7E80h
Enable the access end interrupt
Enable the BRE interrupt
Is the BRE flag 1 or
did an error occur?
SDSTS2 = 0000 FEFFh
Read the SDBUFR register
(transfer data size set in the SDSIZE register)
Read data.
SDSTS1 = 0000 FFFBh
Error processing
(clear the interrupt flags)
Have the number
of blocks set in the SDBLKCNT register
been read?
No
Yes
Access end?
Read the SDRSP10 register Check the response.
No
Yes
No
Yes
Clear the flags.
No
Yes
Clear the flags.
Start
End
Error (communication error or
timeout)