AN4767, UART Boot Loader Design on the Kinetis E Series ...
AN4767, UART Boot Loader Design on the Kinetis E Series ...
AN4767, UART Boot Loader Design on the Kinetis E Series ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
C<strong>on</strong>clusi<strong>on</strong><br />
The code start address should be RELOCATION_VERTOR_ADDR plus 0x410. The address space from<br />
RELOCATION_VERTOR_ADDR to RELOCATION_VERTOR_ADDR + 0x410 for <strong>the</strong> relocated<br />
interrupt vector table.<br />
2.4.2 Interrupt vector table<br />
Before entering into <strong>the</strong> user code, <strong>the</strong> boot loader has to write <strong>the</strong> relocati<strong>on</strong> address to SCB_VTOR register. If<br />
<strong>the</strong> user code needs to copy <strong>the</strong> vector table into RAM, copy <strong>the</strong> c<strong>on</strong>tents of<br />
RELOCATION_VECTOR_ADDR to <strong>the</strong> target RAM address before writing to SCB_VTOR. No o<strong>the</strong>r<br />
values should be written to this register.<br />
2.4.3 Flash c<strong>on</strong>figurati<strong>on</strong> regi<strong>on</strong><br />
The flash c<strong>on</strong>figurati<strong>on</strong> regi<strong>on</strong> is located in 0x400 to 0x40F, which is in <strong>the</strong> boot loader regi<strong>on</strong>. If it is<br />
protected, <strong>the</strong>n it cannot be modified. O<strong>the</strong>rwise, it is available for erasing and programming. The user<br />
code will first read out all of c<strong>on</strong>tents of <strong>the</strong> sector that c<strong>on</strong>tain a flash c<strong>on</strong>figurati<strong>on</strong> field at <strong>the</strong> address<br />
0x400 to 0x40F. Then, erase this sector, modify <strong>the</strong> buffer, and <strong>the</strong>n write back to this sector.<br />
NOTE<br />
Do not directly define c<strong>on</strong>stant variable whose address is from 0x400 to<br />
0x40F in <strong>the</strong> user code, because it is unavailable to download <strong>the</strong> code<br />
through this boot loader.<br />
3 C<strong>on</strong>clusi<strong>on</strong><br />
This document introduces a way of implementing <strong>the</strong> <str<strong>on</strong>g>UART</str<strong>on</strong>g> boot loader by using AN2295 PC side host<br />
software. It is c<strong>on</strong>venient for <strong>the</strong> user to update <strong>the</strong> user code in some special applicati<strong>on</strong>s without o<strong>the</strong>r<br />
programming tools.<br />
4 References<br />
KE02 Sub-Family Reference Manual (MKE02Z64M20SF0RM)<br />
Developer's Serial <str<strong>on</strong>g>Boot</str<strong>on</strong>g> <str<strong>on</strong>g>Loader</str<strong>on</strong>g> (AN2295)<br />
<strong>Kinetis</strong> L Peripheral Module Quick Reference User Guide (KLQRUG)<br />
5 Glossary<br />
<str<strong>on</strong>g>UART</str<strong>on</strong>g><br />
Universal Asynchr<strong>on</strong>ous Receiver/Transmitter<br />
FCCOB<br />
WDOG<br />
MCG<br />
FMC<br />
Flash Comm<strong>on</strong> Command Object<br />
Watchdog<br />
Multipurpose Clock Generator<br />
Flash Memory C<strong>on</strong>troller<br />
<str<strong>on</strong>g>UART</str<strong>on</strong>g> <str<strong>on</strong>g>Boot</str<strong>on</strong>g> <str<strong>on</strong>g>Loader</str<strong>on</strong>g> <str<strong>on</strong>g>Design</str<strong>on</strong>g> <strong>on</strong> <strong>the</strong> <strong>Kinetis</strong> E <strong>Series</strong>, Rev. 0<br />
Freescale Semic<strong>on</strong>ductor 5