Setting FTFA_FOPT with KDS 3.2.0 and OpenOCD?

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

Setting FTFA_FOPT with KDS 3.2.0 and OpenOCD?

跳至解决方案
2,840 次查看
mattsarnoff
Contributor I

I am using a Kinetis KL16 and attempting to clear the NMI_DIS bit in the FTFA_FOPT byte. I have modified my startup_MKL16Z4.S file like so:

 

/* Flash Configuration */
.section .FlashConfig, "a"
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.byte 0xFE /* FSEC */
.byte 0xFB /* FOPT; disable NMI */
.byte 0xFF /* reserved */
.byte 0xFF /* reserved */

 

I am using "GDB OpenOCD Debugging" to program the chip. But it looks like these values are not being written. If I reset the board and inspect address 0x40D it shows 0xFF, not 0xFB.

 

How can I configure my project/OpenOCD to write the correct flash configuration values?

标签 (1)
标记 (4)
0 项奖励
回复
1 解答
2,441 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Matt,

Could you please use the PEMicro interface debug or SEGGER J-LINK debug,

it test these two debug mode ,it clear the NMI_DIS bit .

Hope it helps


Have a great day,
Alice Yang

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

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,441 次查看
steverhodes
Contributor I

FYI I had a similar problem. openOCD defaults to protecting the FCF bytes. See the question Kinetis flash support in OpenOCD for options to either disable the protection or supply the values using openOCD's Kinetis flash driver.

0 项奖励
回复
2,441 次查看
mattsarnoff
Contributor I

Thank you, Alice. I used a J-Link interface and the flash configuration was programmed correctly.

0 项奖励
回复
2,441 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Sarnoff,

OK , welcome !

BR

Alice

0 项奖励
回复
2,442 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Matt,

Could you please use the PEMicro interface debug or SEGGER J-LINK debug,

it test these two debug mode ,it clear the NMI_DIS bit .

Hope it helps


Have a great day,
Alice Yang

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

0 项奖励
回复