KE18 NMI and boot options

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KE18 NMI and boot options

ソリューションへジャンプ
1,060件の閲覧回数
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,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 件の賞賛
返信
2 返答(返信)
1,041件の閲覧回数
davidsherman
Senior Contributor I

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

0 件の賞賛
返信
1,057件の閲覧回数
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 件の賞賛
返信