Clock Configuration; Bootloader Entry Point - NXP Semiconductors MKL27Z128VFM4 Reference Manual

Table of Contents

Advertisement

Functional Description

13.3.4 Clock Configuration

By default, the bootloader does not modify clocks. The Kinetis Bootloader in ROM will
use the clock configuration of the chip out of reset unless the clock configuration bits in
the FOPT register are cleared, or if a USB peripheral is enabled.
• Alternate clock configurations are supported, by setting fields in the Bootloader
Configuration Area (BCA) shown in
• If the HighSpeed flag of the clockFlags configuration value is cleared, or if a USB
peripheral is enabled, the bootloader will enable the internal 48 MHz reference clock.
• In high speed mode, the core and bus clock frequencies are determined by the
clockDivider configuration value.
• The core clock divider is set directly from the inverted value of the clockDivider
unless a USB peripheral is enabled. If a USB peripheral is enabled and the inverted
value of the clockDivider is greater than 2, then the value is reduced to 2, in order to
keep the CPU clock above 20 MHz.
• The bus clock divider is set to 1, unless the resulting bus clock frequency would be
greater than the maximum supported value. In this case, the bus clock divider is
increased until the bus clock frequency is at or below the maximum.
• Note that the maximum baud rate of serial peripherals is related to the core and bus
clock frequencies. To achieve the desired baud rates, high speed mode should be
enabled in BCA.

13.3.5 Bootloader Entry Point

The Kinetis Bootloader provides a function (runBootloader) that a user application can
call, to run the bootloader.
To get the address of the entry point, the user application reads the word containing the
pointer to the bootloader API tree at offset 0x1C of the bootloader's vector table. The
vector table is placed at the base of the bootloader's address range, which for the ROM is
0x1C00_0000. Thus, the API tree pointer is at address 0x1C00_001C.
The bootloader API tree is a structure that contains pointers to other structures, which
have the function and data addresses for the bootloader. The bootloader entry point is
always the first word of the API tree.
The prototype of the entry point is:
void run_bootloader(void * arg);
The arg parameter is currently unused, and is intended for future expansion (for example,
passing options to the bootloader). To ensure future compatibility, a value of NULL
should be passed for arg.
180
Table
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
13-3.
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents