Information
SDHC Data buffer
System IP Bus or System AHB Bus
7-0
31-24
23-16
15-8
7-0
15-8
23-16
31-24
Figure 46-28. Data swap between system bus and SDHC data buffer in byte little endian
mode
SDHC Data buffer
System IP Bus or System AHB Bus
7-0
15-8
7-0
31-24
23-16
15-8
23-16
31-24
Figure 46-29. Data swap between system bus and SDHC data buffer in half word big
endian mode
46.5.1.1 Write operation sequence
There are three ways to write data into the buffer when the user transfers data to the card:
1. By using external DMA through the SDHC DMA request signal.
2. By processor core polling through the IRQSTAT[BWR] bit (interrupt or polling).
3. By using the internal DMA.
When the internal DMA is not used, (i.e. the XFERTYP[DMAEN] bit is not set when the
command is sent), the SDHC asserts a DMA request when the amount of buffer space
exceeds the value set in the WML register, and is ready for receiving new data. At the
same time, the SDHC would set the IRQSTAT[BWR] bit. The buffer write ready
interrupt will be generated if it is enabled by software.
When internal DMA is used, the SDHC will not inform the system before all the required
number of bytes are transferred (if no error was encountered). When an error occurs
during the data transfer, the SDHC will abort the data transfer and abandon the current
block. The host driver should read the contents of the DSADDR to get the starting
address of the abandoned data block. If the current data transfer is in multi block mode,
the SDHC will not automatically send CMD12, even though the XFERTYP[AC12EN]
bit is set. The host driver shall send CMD12 in this scenario and re-start the write
operation from that address. It is recommended that a software reset for data be applied
before the transfer is re-started after error recovery.
Functional description
K10 Sub-Family Reference Manual, Rev. 6, Nov 2011
1396 Freescale Semiconductor, Inc.
