Trouble with security flash on KL46Z

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

Trouble with security flash on KL46Z

ソリューションへジャンプ
3,643件の閲覧回数
frdmcharly
Contributor III

Hello Freescale Community! I'm using a FRDM-KL46Z and enabling the security flash option on the "Component Inspector - CPU". Which is the way to download the program on the board?

 

If I download the program with "Run", CW asks me "Device is secure. Erase to unsecure?" then I click yes and the console say:

 

INF: CMD>RE

INF: Initializing.

INF: Device is Secure.

INF: Device is secured. Erasing ...

INF: Target has been RESET and is active.

 

But the program never starts running on the board. Somebody knows why?

 

If I download the program with "Flash File To Target" choosing:

 

* The correct connection

* Flash configuration file: KL46Z256M4.xml

* The .elf of the program on file to flash

 

Clicking on "Erase and Program" the program downloads to the board and runs well after pressing the reset button... but when I try the attach option in debug mode, it allows me to debug as if the security flash option is disabled.

ラベル(1)
タグ(4)
0 件の賞賛
返信
1 解決策
3,181件の閲覧回数
frdmcharly
Contributor III

Hello Jorge! Thanks for your reply!

Correct, the way to download a program with security flash option enabled is throwing the "Flash File To Target" choosing:

* The correct connection

* Flash configuration file: KL46Z256M4.xml

* The .elf file of the program on "file to flash"

But! Before clicking on "Erase and Program" it's necessary "Erase Whole Device". If you don't erase the whole device it's then permitted to enter the debug mode even if the security mode is enabled.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
3,181件の閲覧回数
frdmcharly
Contributor III

In the document "Using the Kinetis Security and Flash Protection Features" at FSEC field description says when "FSEC[SEC] = 01" the "MCU security status is secure" then the debug mode must be disabled, but I still can get access the debug mode, somebody know why?

FSEC_K20_Debug.png

Please help me :-/ !

0 件の賞賛
返信
3,179件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Carlos,

I just made a video that shows how flash secure works. see attached.

can this help you?


Have a great day,
Zhang Jun

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

0 件の賞賛
返信
3,179件の閲覧回数
frdmcharly
Contributor III

Hi Zhang Jennie! Thanks for your video, but doing those steps, even after pressing restart button, the program never starts on the board.

Do you know why? Maybe I need doing something else, or download the program to the board in a different way.

0 件の賞賛
返信
3,179件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Carlos Miguens:

From Processor Expert set the security bits to "00". Then use the "Flash file to target" instead of the debugger to load the .elf as you did before.

Then try to launch an "Attach" or "Connect" debug configuration. You should not be able to access the KL46.


Regards!,
Jorge Gonzalez

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

3,182件の閲覧回数
frdmcharly
Contributor III

Hello Jorge! Thanks for your reply!

Correct, the way to download a program with security flash option enabled is throwing the "Flash File To Target" choosing:

* The correct connection

* Flash configuration file: KL46Z256M4.xml

* The .elf file of the program on "file to flash"

But! Before clicking on "Erase and Program" it's necessary "Erase Whole Device". If you don't erase the whole device it's then permitted to enter the debug mode even if the security mode is enabled.

0 件の賞賛
返信