KL02 Could not read flash

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

KL02 Could not read flash

ソリューションへジャンプ
1,268件の閲覧回数
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 解決策
1,089件の閲覧回数
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 返答(返信)
1,090件の閲覧回数
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 件の賞賛
返信
1,089件の閲覧回数
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 件の賞賛
返信
1,089件の閲覧回数
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 件の賞賛
返信