I used KL03 and based on blhost to download FRDM_KL03Z4.bin file. Then reset to my target, I can display the message on the Hyperterminal. My question are as below.
1. How to upgrade the image again(blhost is not connected) by the UART?
2. If not, how to change back boot from ROM?
Thanks and best regards
Ken
Hello Ken Hsu:
The state of the KL03 MCU depends on the value stored in the FOPT configuration byte from flash at address 0x40D, specifically the bits 7-6 (BOOTSRC_SEL) and the bit 1 (BOOTPIN_OPT). You find the next descriptions in the manual:
So, it can boot directly from Flash, from ROM or depend on the state of the NMI pin.
Check that binary you loaded and see what value it has for the 0x40D address. Another option is if you have an external tool you can perform a mass erase. By default in an erased device (all flash 1's) the device would boot from ROM.
Let me know if you have doubts.
Best regards,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Dear Jorge Gonzalez,
So I must be used by external tools(MultiLink or OpenSDA) to erase Flash, am I right? Does other method erase Flash? Because our environment still have some problems for MultiLink.
Thanks a lot.
Ken
Hello Ken:
If the conditions to enter bootloader mode are not met (either directly or with the NMI pin), then yes, I am afraid that you would need to erase flash via the SWD interface with an external tool.
Regards!
Jorge Gonzalez