Kinetis Bootloader Demo Appln User Guide
Kinetis Bootloader Demo Appln User Guide
Contents
The Kinetis bootloader serves as the standard bootloader for all Kinetis devices. It provides a standard interface to the device
via all of the available peripherals supported on a given Freescale Kinetis device. The Kinetis bootloader interface comes in
several forms, ranging from ROM, serial flashloader, or a customized flash-resident bootloader. Some future Kinetis devices
arrive with a ROM containing the Kinetis bootloader, while others arrive pre-programmed from the factory with a one-time-
use serial flashloader. For a customized interface, customers can leverage the Kinetis bootloader source code to create a
unique flash-resident bootloader that is both compatible with tools that understand the bootloader interface, and are capable
of supporting application-specific features. Freescale provides utilities to demonstrate how to interface with the bootloader.
Host projects:
• Microsoft® Visual Studio® Professional 2013 for Windows ® OS Desktop
• Microsoft® .NET Framework 4.5 (included in Windows OS 8)
• Microsoft® Visual C++ Redistributable for Visual Studio 2013 (vcredist_x86.exe)
• Apple® Xcode v6.3.1 (for the blhost tool)
• GNU Compiler (GCC) v4.8.1 (for the blhost tool)
• Open a command prompt in the directory containing blhost. For Windows OS, blhost is located in
<install_dir>/bin/win. To open a command prompt, go to the Windows OS start menu and type "cmd" in the
search box at the bottom of the window. Navigate to the blhost folder using change directory (CD) commands.
• Type blhost --help to see the complete usage of the blhost utility.
For this exercise, verify the Kinetis device is running the bootloader firmware application.
• Press the "Reset" button on the platform.
• Note what the COM port that the platform is connected to. Refer to step 3 of Section 3.1. For this guide, the device is
connected to COM23.
• Type blhost -p COM23 -- get-property 1 to get the bootloader version from the Kinetis bootloader.
• Something similar to the screen shot below indicates that blhost.exe is successfully communicating with the Kinetis
bootloader on the platform.
Pressing the "Reset" button alone allows the Kinetis Bootloader to again launch the led_demo application.
NOTE
The base address of a user application for use with a flash-resident bootloader is different
than the application base address when using a ROM-based bootloader. The application
linker file must be updated to link teh image to the correct base address. In addition,
application vector table must be updated based on the correct application location.
Figure 14. User application vector table and Bootloader Configuration Area (BCA)
NOTE
If testing the UART interface on mbed port J37, add shunts on J25 pin 2-3. If testing the
UART interface on TWR-SER, add shunts on J25 pin 1-2 and J22 pin 1-2.
Table 3. MKL25Z4 bootloader – FRDM-KL25Z
Peripheral Instance Port Signal AltMode FRDM-KL25Z
Test points
UART 0 PTA2 UART0_TX 2 OpenSDA
PTA1 UART0_RX
I2C 0 PTC8 I2C0_SCL 2 J1 pin 14
PTC9 I2C0_SDA J1 pin 16
SPI 0 PTD0 SPI0_PCS0 2 J2 pin 6
PTD1 SPI0_SCK J2 pin 12
PTD2 SPI0_SOUT J2 pin 8
PTD3 SPI0_SIN J2 pin 10
USB USB0_DP Default USB connector
KL25Z
USB0_DM
NOTE
If testing the UART interface on OpenSDA port J511, add shunts on J505 pin 2-3 and
J506 pin 2-3.
Table 12. MKV11Z7 flashloader – TWR-KV11Z75M
Peripheral Instance Port Signal AltMode TWR-KV11Z75M
Test points
UART 0 PTD6 UART0_TX 3 J24 pin 27
PTD7 UART0_RX J24 pin 28
I2C 0 PTB0 I2C0_SCL 2 J18 pin 17
PTB1 I2C0_SDA J18 pin 18
SPI 0 PTE16 SPI0_PCS0 2 J18 pin 5
PTE17 SPI0_SCK J18 pin 6
PTE18 SPI0_SOUT J18 pin 7
PTE19 SPI0_SIN J18 pin 8
FlexCAN 0 PTA24 CAN0_TX 2 J24 pin 13
PTA25 CAN0_RX J24 pin 14
NOTE
CAN connection – option 1, use CAN transceiver on board:
1. Put jumper on J5 pin 1-2, and keep default jumpers on J5 5-6, and 7-8
2. Connect TWR-KV11Z75M J524 pin 2 to BusPal (KV46) J13 pin 2
3. Connect TWR-KV11Z75M J524 pin 1 to BusPal (KV46) J13 pin 1
10 Revision history