last block is not transferred. On the other hand, if it is within the last block that the CRCerror occurs, an auto CMD12 will be sent by the SDHC. In this case, the driver shall re-send or re-obtain the last block with a single block transfer.49.6.3.5.2 Internal DMA errorDuring the data transfer with internal simple DMA, if the DMA engine encounters someerror on the system bus, the DMA operation is aborted and DMA error interrupt is sent tothe host system. When acknowledged by such an interrupt, the driver shall calculate thestart address of data block in which the error occurs. The start address can be calculatedby either:1. Read the DMA system address register. The error occurs during the previous burst.Taking the block size, the previous burst length and the start address of the next bursttransfer into account, it is straight forward to obtain the start address of the corruptedblock.2. Read the BLKCNT field of the block attribute register. By the number of blocks left,the total number to transfer, the start address of transfer, and the size of each block,the start address of corrupted block can be determined. When the BCEN bit is notset, the contents of the block attribute register does not change, so this method doesnot work.When a DMA error occurs, it is recommended to abort the current transfer by means of aCMD12 (for multi block transfer), apply a reset for data, and re-start the transfer from thecorrupted block to recover from the error.49.6.3.5.3 ADMA errorThere are three kinds of possible ADMA errors. The transfer, invalid descriptor, anddata-length mismatch errors. Whenever these errors occur, the DMA transfer stops andthe corresponding error status bit is set. For acknowledging the status, the host drivershould recover the error as shown below and re-transfer from the place of interruption.1. Transfer error: Such errors may occur during data transfer or descriptor fetch. Foreither scenario, it is recommended to retrieve the transfer context, reset for the datapart and re-transfer the block that was corrupted, or the next block if no block iscorrupted.Initialization/application of SDHCK51 Sub-Family Reference Manual, Rev. 6, Nov 20111392 Freescale Semiconductor, Inc.