KL02 Could not read flash

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

KL02 Could not read flash

跳至解决方案
1,161 次查看
hughesk
Contributor I

Hello,

I am using the KL02 in my design, and have produced a prototype board.  I'm having issues connecting to the chip, however.

using JLink Commander, I am apparently able to erase the chip, but I cannot successfully do anything else from, e.g., IAR.  Occasionally when trying to program the chip, but not always, I get the message that the chip is secured.  I select "unsecure," but the process still fails.  Here is the error message I've been getting:

Failed to prepare for programming.

Could not read target memory.

Please check your flash settings!

Besides selecting a device, there does not seem to be any other flash settings to check.

Has anyone seen this and successfully recovered from it?

Any ideas what I'm missing?

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
982 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

You should check some points:

1 Hardware

(1) RESET_b  pin need external 4.7K to 10K pullup resistor, and have a 100nF capacitor connect to the ground

(2) NMI_b pin need external 4.7K to 10K pullup resistor

(3) SWD_DIO need 10K external pullup

Please check these points

2 unsecure your chip

Use JLink commander, and input: unlock kinetis

Whether it can be unsecured.

3 Test code

Give me your IAR project, I need to check it whether your code is correct.

Waiting for your reply!


Have a great day,

Jingjing

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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
983 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

You should check some points:

1 Hardware

(1) RESET_b  pin need external 4.7K to 10K pullup resistor, and have a 100nF capacitor connect to the ground

(2) NMI_b pin need external 4.7K to 10K pullup resistor

(3) SWD_DIO need 10K external pullup

Please check these points

2 unsecure your chip

Use JLink commander, and input: unlock kinetis

Whether it can be unsecured.

3 Test code

Give me your IAR project, I need to check it whether your code is correct.

Waiting for your reply!


Have a great day,

Jingjing

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

0 项奖励
回复
982 次查看
hughesk
Contributor I

1. The hardware was not correct, but upon fixing it, the issue persists

2. The device can be unlocked.  When starting up from scratch in JLink Commander, I can:

- connect to the device (device MKL02Z32xxx4)

- erase device (erase)

- read device configuration registers (rconf)

- and get hardware status (st)

From IAR, however, nothing...still the flash settings issue

3. I will set up a simpler project and try it, then send it if there's still an issue. 

0 项奖励
回复
982 次查看
hughesk
Contributor I

I re-generated the CPU code from processor expert, and now IAR happily targets and debugs the processor...I didn't expect an incorrect processor selection (same family, different package) to generate a flash settings error, but thank you for your assistance.

0 项奖励
回复