This use case demonstrates a scenario for an
application using one boot mode select pin to select between booting to Flash or
using CAN boot.
- 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 0xFF
- Set BOOTPIN_CONFIG.BMSP2 to 0xFF
- 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.8 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.
Table 4-10 One Boot Pin Boot
Table Result
Boot Mode Table Number |
Boot Mode |
0 |
CAN Boot (0x02) |
1 |
Flash Boot (0x03) |