7.5.2 BOOTCFG Register (Offset = 0x1D0) [reset = 0xFFFFFFFE]
Boot Configuration (BOOTCFG)
NOTE
The Boot Configuration (BOOTCFG) register requires a POR before the committed changes take effect.
This register is not written directly, but instead uses the FMD register as explained in Section 7.2.3.12. When this register is committed, the new value cannot be read back until after the power cycle. This register provides configuration of a GPIO pin to enable the ROM Bootloader as well as a write-once mechanism to disable external debugger access to the device. At reset, the user has the opportunity to direct the core to execute the ROM Bootloader or the application in flash memory by using a GPIO signal from Ports A through H as configured by the bits in this register (do not select PC0 to PC3, PD7, or PE7, because they are locked by default at reset). At reset, the following sequence is performed:
- The BOOTCFG register is read. If the EN bit is clear, the ROM Bootloader is executed.
- In the ROM Bootloader, the status of the specified GPIO pin is compared with the specified polarity. If the status matches the specified polarity, the ROM is mapped to address 0x00000000 and execution continues out of the ROM Bootloader.
- If the EN bit is set or the status does not match the specified polarity, the data at address 0x00000004 is read, and if the data at this address is 0xFFFFFFFF, the ROM is mapped to address 0x00000000. and execution continues out of the ROM Bootloader.
- If there is data at address 0x00000004 that is not 0xFFFFFFFF, the stack pointer (SP) is loaded from flash memory at address 0x00000000 and the program counter (PC) is loaded from address 0x00000004. The user application begins executing.
Figure 7-42 shows the bootloader selection sequence.
The DBG0 bit is cleared by the factory and the DBG1 bit is set, which enables external debuggers. Clearing the DBG1 bit disables any external debugger access to the device, starting with the next power-up cycle of the device. The NW bit indicates that bits in the register can be changed from 1 to 0.
By committing the register values using the COMT bit in the FMC register, the register contents become nonvolatile and are therefore retained following power cycling. Before being committed, bits can only be changed from 1 to 0. All Reserved bits must remain as 1s. The reset value shown applies only to power-on reset when the register is not yet committed; any other type of reset does not affect this register. After it is committed, the register retains its value through power-on reset. When committed, the only way to restore the factory default value of this register is to perform the sequence detailed in Section 3.3.4.3.
BOOTCFG is shown in Figure 7-43 and described in Table 7-45.
Return to Summary Table.
Figure 7-43 BOOTCFG Register
31 |
30 |
29 |
28 |
27 |
26 |
25 |
24 |
NW |
RESERVED |
R-0x1 |
R-0x7FFF |
|
23 |
22 |
21 |
20 |
19 |
18 |
17 |
16 |
RESERVED |
R-0x7FFF |
|
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
PORT |
PIN |
POL |
EN |
R-0x7 |
R-0x7 |
R-0x1 |
R-0x1 |
|
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
RESERVED |
KEY |
RESERVED |
DBG1 |
DBG0 |
R-0x7 |
R-0x1 |
R-0x3 |
R-0x1 |
R-0x0 |
|
Table 7-45 BOOTCFG Register Field Descriptions
Bit |
Field |
Type |
Reset |
Description |
31 |
NW |
R |
0x1 |
Not Written.
When set, this bit indicates that the values in this register can be changed from 1 to 0.
When clear, this bit specifies that the contents of this register cannot be changed. |
30-16 |
RESERVED |
R |
0x7FFF |
Ensure that the Reserved bits of this register are not changed from the default of all 1s.
|
15-13 |
PORT |
R |
0x7 |
Boot GPIO Port.
This field selects the port of the GPIO port pin that enables the ROM boot loader at reset. The selected port can be reprogrammed for a different function after reset.
Note: Do not select PC0-3, PD7, or PE7, because they are locked by default at reset.
0x0 = Port A
0x1 = Port B
0x2 = Port C
0x3 = Port D
0x4 = Port E
0x5 = Port F
0x6 = Port G
0x7 = Port H
|
12-10 |
PIN |
R |
0x7 |
Boot GPIO Pin
This field selects the pin number of the GPIO port pin that enables the ROM boot loader at reset.
0x0 = Pin 0
0x1 = Pin 1
0x2 = Pin 2
0x3 = Pin 3
0x4 = Pin 4
0x5 = Pin 5
0x6 = Pin 6
0x7 = Pin 7
|
9 |
POL |
R |
0x1 |
Boot GPIO Polarity
When set, this bit selects a high level for the GPIO port pin to enable the ROM boot loader at reset.
When clear, this bit selects a low level for the GPIO port pin. |
8 |
EN |
R |
0x1 |
Boot GPIO
Enable Clearing this bit enables the use of a GPIO pin to enable the ROM Bootloader at reset.
When this bit is set, the contents of address 0x00000004 are checked to see if the flash memory has been programmed.
If the contents are not 0xFFFFFFFF, the core executes out of flash memory.
If the Flash has not been programmed, the core executes out of ROM. |
7-5 |
RESERVED |
R |
0x7 |
Ensure that the Reserved bits of this register are not changed from the default of all 1s.
|
4 |
KEY |
R |
0x1 |
KEY Select
This bit chooses between using the value 0xA442 or the PEKEY value in the FLPEKEY register as the WRKEY value in the FMC/FMC2 register.
0x0 = The PEKEY value in the FLPEKEY register is committed by user and used as the WRKEY in the FMC/FMC2 register. Writes to FMC/FMC2 register with a 0xA442 key are ignored.
0x1 = 0xA442 is used as key
|
3-2 |
RESERVED |
R |
0x3 |
Ensure that the Reserved bits of this register are not changed from the default of all 1s.
|
1 |
DBG1 |
R |
0x1 |
Debug Control 1
The DBG1 bit must be 1 and DBG0 must be 0 for debug to be available.
|
0 |
DBG0 |
R |
0x0 |
Debug Control 0
The DBG1 bit must be 1 and DBG0 must be 0 for debug to be available.
|