Bare-metal on KL03:

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
2,137件の閲覧回数
chucksmith
Contributor II

Hello, after trying out some code on a FRDM-KL03Z, we now want to run it on our bare-metal KL03Z32VFG4 based design. Using KDS and a J-Link, I load the code into the board, but I cannot hit the breakpoint at main(), and cannot even hit a breakpoint in the .S startup file. When I pause the execution, the program counter seems to be in the ROM Bootloader (0x1C00070E). The NMI pin is pulled low on our board, but the flash configuration values in startup_MKL03Z4.s are:

/* Flash Configuration */

    .section .FlashConfig, "a"

    .long 0xFFFFFFFF

    .long 0xFFFFFFFF

    .long 0xFFFFFFFF

    .long 0xFFFF3DFE

I believe the 3D disables the NMI function, and says boot from Flash.

So, how to give our application control?

Thanks


0 件の賞賛
返信
1 解決策
1,874件の閲覧回数
chucksmith
Contributor II

Hi Jeremy - that got me looking in the right area. I actually had to use a value of 0x3B to get it to boot to flash. Its now working. Thanks.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,874件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Chuck,

According to your statement, the MCU obviously are stuck in the Bootloader mode, the 0x30 means the setting of Fig 1.

Actually, you should set the 0x3F to FTFA_FOPT register, instead of  the 0x3D.

2016-07-18_17-34-14.jpg

                                                                              Fig 1


Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,875件の閲覧回数
chucksmith
Contributor II

Hi Jeremy - that got me looking in the right area. I actually had to use a value of 0x3B to get it to boot to flash. Its now working. Thanks.

0 件の賞賛
返信