51.9.1.2 Boot Procedure, SDMA Mode

  1. Configure 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.TDSEL = 1).

    h. Select the SDMA transfer (SDMMC_TMR.DMAEN = 1 and SDMMC_HC1R.DMASEL = 0).

    i. Write the SDMA system address where the boot data will be copied (SDMMC_SSAR.ADDR).

    j. Optional: select the Auto CMD method (SDMMC_TMR.ACMDEN). 
Note: Auto CMD23 cannot be used with SDMA.

    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.

  2. Write SDMMC_CR = 20(hexa) to set the e.MMC in Boot Operation mode.
  3. Wait for interrupt on Boot Acknowledge Received (BOOTAR).
  4. The user can copy the boot data sequentially as soon as the BRDRDY flag is asserted.
  5. When the data transfer is completed, the boot operation must be terminated by setting SDMMC_MC2R.ABOOT to ‘1’.