KE18 NMI and boot options

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

KE18 NMI and boot options

跳至解决方案
1,059 次查看
davidsherman
Senior Contributor I

We are using the MKE18F512VLH16, and using startup code from MCUXpresso with FreeRTOS.

A while back, we had altered the initial FTFE_FOPT byte from 0x7D to 0x79 to disable the NMI pin at boot because we don't use it.  On that particular board, we discovered that if that pin was pulled low at power up, it didn't boot properly.  We redesigned it to make sure that pin wasn't pulled low, not fully understanding why it wouldn't boot properly.

On a new board, I forgot that little quirk, and didn't take that into consideration, so if the pin is pulled low, it doesn't boot.  Looking into the FTFE_FOPT register, it appears that in the configuration it was using, pulling NMI low means "boot from ROM" and leaving it high means "boot from Flash"

What exactly is "boot from ROM" in a KE18?  I found if I simply change the FOPT[7]:FOPT[1] to 01, it seems to boot fine regardless of what PTD3 is pulled to.  If that's all it takes, that would save us from having to modify several boards.

0 项奖励
回复
1 解答
1,055 次查看
mjbcswitzerland
Specialist V

Hi

With FOPT[7;1] at 0x01 the ROM loader is disabled and the processor always boots up from its reset vector (as is the case in all Kinetis parts without BOOT ROM).

When set to 00 (Boot from ROM) the processor starts in the ROM boot loader, which checks the state of the BOOTCFG0 pin to decide whether to jump to the reset vector or to remain in the boot loader (which then allows loading new code via Kboot).

Therefore the setting 01 effectively disables the ROM boot loader.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or product development requirements

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,040 次查看
davidsherman
Senior Contributor I

Thank you for confirming that.  It seems to be working fine now.

0 项奖励
回复
1,056 次查看
mjbcswitzerland
Specialist V

Hi

With FOPT[7;1] at 0x01 the ROM loader is disabled and the processor always boots up from its reset vector (as is the case in all Kinetis parts without BOOT ROM).

When set to 00 (Boot from ROM) the processor starts in the ROM boot loader, which checks the state of the BOOTCFG0 pin to decide whether to jump to the reset vector or to remain in the boot loader (which then allows loading new code via Kboot).

Therefore the setting 01 effectively disables the ROM boot loader.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or product development requirements

 

0 项奖励
回复