AnsweredAssumed Answered

Boot from flash

Question asked by Onur Demirel on Sep 7, 2018
Latest reply on Sep 10, 2018 by Onur Demirel

Hello there,


I am using a custom board with MKE18F512VLH16 that is the 64 pinout and 512kb Flash memory version. I am using MCUXpresso v10.2. I want to boot my controller from flash memory. I have some problems about this issue.


I made a research about this issue and found a figure (Figure 3. Boot Flow Chart) in KE1xF datasheet: Technical Data document in subject 2.1.5. I need to set RCM_FM[FORCEROM] bits to 00 that means Boot from Flash as it says in Kinetis KE1xF Sub-Family Reference Manual subject 24.3.5. After that I need to program the FTFE_FOPT register properly as it explains in 22.3.1. However this FOPT register is a Read-only register.


In my situation, I only able to use Debug Mode to program and run my code. I set RCM_FM[FORCEROM] bits to 00 and I press reset button that pulls down the RESET_b pin[63] to GND. Afterwards it doesnt boot with the same program. When I use Debug Mode again and look to memory location of RCM_MR register it shows 0x06 in LSB; that means: "Boot from ROM due to both BOOTCFG0 pin assertion and FOPT[7] configuration" that is written in 24.3.5. RCM_FM register shows 0x04 that means: Force boot from ROM with RCM_MR[2] set.


As far as I read it says BOOTCFG0 and NMI pins and same and multiplexed that is PTD3[45]. Its voltage is 0.33V after and during pushing the reset button.


I am looking forward to how I can change FTFE_FOPT register [BOOTSRC_SEL] and [BOOTPIN_OPT] bits; or any other solutions for this issue.


Thanks in advance,