Anda di halaman 1dari 2

Bootloader Project:

Introduction: Bootloader is a built-in firmware which is implemented to program the


application code to flash via the communication interface. This application note will
introduce how to use the board KL46Z, convert data from user application such .bin or
.srec file through the UART interface to implement update of the target application code.
1. Requirements:
A bootloader project must be satisfied following requirements:
+ The application code must be transferred from PC terminal through UART to
board KL46Z, then this application code be implemented to Flash to be processed
whenever board start working.
+ Low memory use: the bootloader must use resource of memory as low as
possible. For Kinestic family, it is not to higher than 2 Kb.
+ Low pin-count: the bootloader-PC communication use only the standard
communication such SCI use no more than 2 wires: RxD and TxD.
+ Transparent with respect S19 file: the application should transparent to user S19
file. In some cases, the interrupt vector must be modified the interrupt vector or
other modification to S19 file for it accept bootloader application.
2. Flow chart:
We can use software to encode to S19 format file.

Flow chart of Bootloader

After power on, bootloader start to run; the communication between PC and KL46Z is
UART, then the target board start to be configured by the flag from PC sends to target
board through UART. If success on receiving flag, the user code is updated by writing
application code to RAM at defined address call Entry Point; after that, the register
SCB_VTOR is written (the Stack Pointer is pointed to entry point of Application
Code), then the application code (user code) is processing immediately.

3. API: Pro-type function:

Bootloader need to:


+Relocate the interrupt vector table
+Modifies the linker file
+Writes application code to RAM
+ Pointing to Entry Point which is address of application code.
The communication between PC Target board is UART then UART module
must be configured such clock, baud rate.

Anda mungkin juga menyukai