![NXP Semiconductors MKL27Z128VFM4 Reference Manual Download Page 181](http://html1.mh-extra.com/html/nxp-semiconductors/mkl27z128vfm4/mkl27z128vfm4_reference-manual_1721847181.webp)
Example code to get the entry pointer address from the ROM and start the bootloader.
NOTE
This entry must be called in supervisor (privileged) mode.
// Variables
uint32_t runBootloaderAddress;
void (*runBootloader)(void * arg);
// Read the function address from the ROM API tree.
runBootloaderAddress = **(uint32_t **)(0x1c00001c);
runBootloader = (void (*)(void * arg))runBootloaderAddress;
// Start the bootloader.
runBootloader(NULL);
13.3.6 Bootloader Protocol
This section explains the general protocol for the packet transfers between the host and
the Kinetis Bootloader. The description includes the transfer of packets for different
transactions, such as commands with no data phase and commands with incoming or
outgoing data phase. The next section describes various packet types used in a
transaction.
Each command sent from the host is replied to with a response command.
Commands may include an optional data phase:
• If the data phase is incoming (from host to bootloader ), then the data phase is part of
the original command.
• If the data phase is outgoing (from bootloader to host), then the data phase is part of
the response command.
NOTE
In all protocols (described in the next subsections), the Ack sent
in response to a Command or Data packet can arrive at any time
before, during, or after
the Command/Data packet has
processed.
Chapter 13 Kinetis ROM Bootloader
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
Freescale Semiconductor, Inc.
181