The software flow to write to a card using CPU Polling mode is as follows:1. Check the card status, wait until the card is ready for data.2. Set the card block length/size:a. For SD cards and eMMC devices, use SET_BLOCKLEN (CMD16)b. For SDIO cards or the I/O portion of SDCombo cards, use IO_RW_DIRECT(CMD52) to set the I/O Block Size bit field in the CCCR register (for function 0)or FBR register (for functions 1-7)3. Set the eSDHC block length register to be the same as the block length set for thecard in Step 2.4. Set the eSDHC number block register (NOB), nob is 5 (for instance).5. Issue the command with data transfer. The AC12EN bit should also be set.6. Wait for IRQSTAT[BWR] interrupt to be set.7. Write to Buffer port register for no. of times programmed in WML[WR_WML]considering restriction mentioned in Software polling procedure.8. Clear IRQSTAT[BWR].9. Repeat 6-8 steps for rest of the data transfer.10. Wait for the Transfer Complete interrupt.11. Check the status bit to see if a write CRC error occurred, or some other error thatoccurred during the auto12 command sending and response receiving.18.6.3.1.2 Write with pauseThe write operation can be paused during the transfer.Instead of stopping the SDHC_CLK at any time to pause all the operations, which is alsoinaccessible to the host driver, the driver can set the PROCTL[SABGREQ] to pause thetransfer between the data blocks. As there is no time-out condition in a write operationduring the data blocks, a write to all types of cards can be paused in this way, and if theDAT0 line is not required to de-assert to release the busy state, no suspend command isneeded.Like in the flow described in Normal write, the write with pause is shown with the samekind of write operation:1. Check the card status, wait until card is ready for data.2. Set the card block length/size:a. For SD cards and eMMC devices, use SET_BLOCKLEN (CMD16)b. For SDIO cards or the I/O portion of SDCombo cards, useIO_RW_DIRECT(CMD52) to set the I/O block size bit field in the CCCRregister (for function 0) or FBR register (for functions 1-7)3. Set the eSDHC block length register to be the same as the block length set for thecard in Step 2.Chapter 18 Enhanced Secured Digital Host Controller (eSDHC)QorIQ LS1012A Reference Manual, Rev. 1, 01/2018NXP Semiconductors 831