This use case demonstrates a scenario for an application using three boot mode select pins to select between various boot modes in the custom boot table.
- Program the BOOTPIN_CONFIG location in OTP as follows:
- Set BOOTPIN_CONFIG.BMSP0 to a user specified GPIO, such as 0x0 for GPIO0
- Set BOOTPIN_CONFIG.BMSP1 to a user specified GPIO, such as 0x1 for GPIO1
- Set BOOTPIN_CONFIG.BMSP2 to a user specified GPIO, such as 0x2 for GPIO2
- Set BOOTPIN_CONFIG.KEY to 0x5A for boot ROM to treat these register bits as valid and use the custom boot table.
- Program the BOOTDEF location options for the
device. This essentially sets up a device-specific boot mode table. Refer to
Section 4.7.7 for
valid BOOTDEF values to set in the table.
- Set BOOTDEF.BOOTDEF0 to
0x02 for CAN booting. This sets CAN boot to boot table index 0.
- Set BOOTDEF.BOOTDEF1 to
0x03 for booting to Flash (entry address option 0). This sets Flash boot
to boot table index 1.
- Set BOOTDEF.BOOTDEF2 to
0x24 for booting to wait boot (alternate option). This sets wait boot to
boot table index 2.
- Set BOOTDEF.BOOTDEF3 to
0x66 for SPI booting (alternate GPIO option 3). This sets SPI boot to
boot table index 3.
- Set BOOTDEF.BOOTDEF4 to
0x43 for booting to Flash (entry address option 2). This sets Flash boot
to boot table index 4.
- Set BOOTDEF.BOOTDEF5 to
0x09 for USB booting. This sets USB boot to boot table index 5.
Table 4-9 Three Boot Pins Boot
Table Result
Boot Mode Table Number |
Boot Mode |
0 |
CAN Boot (0x02) |
1 |
Flash Boot (0x03) |
2 |
Wait Boot - Alt (0x24) |
3 |
SPI - Alt3 (0x66) |
4 |
Flash Boot - Alt2 (0x43) |
5 |
USB Boot (0x09) |