59.9.1.3 Boot Procedure, ADMA Mode
- Configure the SDMMC:
a. Set the data bus width using SDMMC_HC1R.DW and SDMMC_HC1R.EXTDW according to BOOT_BUS_WIDTH in the Extended CSD Register (see “Embedded MultiMedia Card (e.MMC) Electrical Standard 4.51” ).
b. Select the speed mode (SDMMC_HC1R.HSEN or SDMMC_MC1R.DDR) according to BOOT_MODE in the Extended CSD register.
c. Set the SDCLK frequency according to the selected speed mode.
d. If the Boot Acknowledge is sent by the e.MMC device (BOOT_ACK = 1 in the Extended CSD Register), set the Boot Acknowledge Enable to ‘1’ (SDMMC_MC1R.BOOTA = 1).
e. Enable interrupt on Boot Acknowledge Received (SDMMC_NISTER.BOOTAR = 1 and SDMMC_NISIER.BOOTAR = 1).
f. Set the e.MMC Command Type to BOOT (SDMMC_MC1R.CMDTYP = 3).
g. Set SDMMC_TMR to read multiple blocks for the e.MMC device (SDMMC_TMR.MSBSEL = 1 and SDMMC_TMR.DTDSEL = 1).
h. Select the ADMA transfer (SDMMC_TMR.DMAEN = 1 and SDMMC_HC1R.DMASEL = 2 or 3).
i. Write the address of the descriptor table in the ADMA system address (SDMMC_ASARx [0..1].ADMASA).
j. Optional: select the Auto CMD method (SDMMC_TMR.ACMDEN).
k. Set the block size to 512 bytes (SDMMC_BSR.BLKSIZE = 512).
l. Set the required number of read blocks (SDMMC_BCR.BLKCNT). SDMMC_TMR.BCEN must be set to ‘1’.
- Write SDMMC_CR = 20(hexa) to set the e.MMC in Boot Operation Mode.
- Wait for interrupt on Boot Acknowledge Received (BOOTAR).
- The user can copy the boot data sequentially as soon as the BRDRDY flag is asserted.
- When the data transfer is completed, the boot operation must be terminated by setting SDMMC_MC2R.ABOOT to ‘1’.