![NXP Semiconductors MKL27Z128VFM4 Reference Manual Download Page 178](http://html1.mh-extra.com/html/nxp-semiconductors/mkl27z128vfm4/mkl27z128vfm4_reference-manual_1721847178.webp)
• The BOOTCFG0 pin is asserted. The pin must be configured as BOOTCFG0 by
setting the BOOTPIN_OPT bit of FOPT to 0.
• A user applications running on flash or RAM calls into the Kinetis Bootloader entry
point address in ROM, to start Kinetis Bootloader execution.
The FOPT[BOOTSRC_SEL] determines the boot source. The FOPT register is located in
the flash configuration field at address 0x40D in the flash memory array. For a complete
list of options, see the Boot options section in the Reset and Boot chapter. If FOPT [7] is
set to 1, then the device will boot to ROM out of reset. Flash memory defaults to all 1s
when erased, so a blank chip will automatically boot to ROM.
The BOOTCFG0 pin is shared with the NMI pin, with NMI being the default usage.
Regardless of whether the NMI pin is enabled or not, the NMI functionality is disabled if
the ROM is executed out of reset, for as long as the ROM is running.
When the ROM is executed out of reset, vector fetches from the CPU are redirected to
the ROM's vector table in ROM memory at offset 0x1C00_0000. This ensures that any
exceptions will be handled by the ROM.
After the Kinetis Bootloader has started, the following procedure starts bootloader
operations:
1. The RCM_MR [FORCEROM] bits are set, so that the device will reboot back into
the ROM if/when the device is reset.
2. Initializes the bootloader's .data and .bss sections.
3. Reads bootloader configuration data from flash at address 0x3C0. The configuration
data is only used if the tag field is set to the expected 'kcfg' value. If the tag is
incorrect, then the configuration values are set to default, as if the data was all 0xFF
bytes.
4. Clocks are configured. See the
5. Enabled peripherals are initialized.
6. The bootloader waits for communication to begin on a peripheral.
• If detection times out, then the bootloader jumps to the user application in flash.
See
• If communication is detected, then all inactive peripherals are shut down, and the
command phase is entered.
NOTE
The flash sector containing the vector table should not be
located in the execute-only region, because the Kinetis
bootloader cannot read the PC and SP addresses in an
execute-only region.
Functional Description
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
178
Freescale Semiconductor, Inc.