2.1 SDCard/e.MMC Boot

Boot may be done from SDCard or e.MMC memories connected to SDMMC0 or SDMMC1. Though SDMMC0/SDMMC1 support up to x4 bus width, the ROM code transfers data only with a x1 bus width through SDMMC_DAT0.

The ROM code also supports e.MMC boot partitions. In order to boot from one of the two e.MMC boot partitions, the BOOT_PARTITION_ENABLE field (bits[5:3]) must be set to either 0x1 (Boot partition 1 enabled for boot) or 0x2 (Boot partition 2 enabled for boot) and the BOOT_ACK bit (bit[6]) must be set to 0x1 (Boot acknowledge sent during boot operation) in byte 129 of the Extended CSD register. Also the BOOT_BUS_WIDTH field (bit[1:0]) should be set to 0x0 (x1 bus width in boot operation mode) in byte 127 of the Extended CSD register.

The ROM code first checks if an e.MMC boot partition is enabled. If so, the maximum bootstrap size of the enabled boot partition is read by the ROM code. If no boot partition is enabled on an e.MMC or in case of a SDCard, the boot process continues with a standard SDCard/e.MMC detection. The ROM code looks for a “boot.bin” file in the root directory of the first partition, which must be formatted with a FAT12/16/32 file system.

Warning: Implementing SDCard/e.MMC boot requires particular attention to the connection of the Card Detect pin. For information, refer to the section “SDCard/e.MMC Boot” of the data sheet.