65.10.1.1 Boot Procedure, Processor Mode

  1. Configure the SDMMC:

    a. Set the data bus width using SDMMC_HC1R.DW and SDMMC_HC1R.EXTDW according to the BOOT_BUS_WIDTH in the Extended CSD Register (see “Embedded MultiMedia Card (e.MMC) Electrical Standard 4.51” ).

    b. Select the speed mode (using 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 the 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 NonDMA transfer (SDMMC_TMR.DMAEN = 0).

    i. Optional: select the Auto CMD method (using SDMMC_TMR.ACMDEN).

    j. Set the block size to 512 bytes (SDMMC_BSR.BLKSIZE = 512).

    k. Set the required number of read blocks (using 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’.