Having Problem with device security KL05

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Having Problem with device security KL05

443 Views
bouhady
Contributor II

I'm using KL05Z32M4 device and I'm tring to sequre the code for reading .

I've read the tuturials and manuals and undestood the FSEC(SEC) register.

I enable the FSEC(SEC) using the PEX and verify the register supposed to have 11 insead of 10.

I generate the code and compile my project. I generate even HEX file and check the 0x40C address and it was 0xBF (11 at the LSBs).

I flash the device using the "Flash file to target" (CodeWarrior 10.3), select the right device (for configuration file) and check the results:

the   debugger manage to connect with no problem the device (using "CodeWarrior Connect" profile).

I check the memory with this prespective the the address 0x40C was 0XBE (10 at the SEC register).

I've tried even to edit and create a custom version of the Configuration XML file and set the "Action_Secure_Device_0="true" and "Action_Secure_Device_1="true".

nothig was changed.

I've created a Task for the Flash including pre-erase the device and verify after the programming and the results was:

"

Device FTFA_PFlash32RAM4   

Erasing ..............

Erase Command Succeeded.  

Device FTFA_PFlash32RAM4   

cmdwin::fl::write verify

Beginning Operation ...   

-------------------------

Flash Operation.  ...

Device FTFA_PFlash32RAM4   

Programming ....

Reading 0x000000C0 bytes starting from address 0x00000000  

Programming .....

Reading 0x00000D0C bytes starting from address 0x00000400  

Data Mismatch at address: 0x0000040C. Expected: 0xBF. Actual:   0xBE  

Device FTFA_PFlash32RAM4   

Error:  Program Command Failed.  ...Program with Verify failed.

Error: Program Command Failed....Program with Verify failed."

What am I doing wrong? Help!

Labels (2)
Tags (1)
0 Kudos
1 Reply

311 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Yaniv,

    In CW, "Flash file to target" really have the secure code download problem, it will modify the code to unsecure in default, it is the bug.

    If you use the PE project, you can use the debug mode to download the code, or if you are using JLINK, you can use the Jflash to download the secured hex file to your chip directly.

Wish it helps you!

If you still have question, please contact me!


Have a great day,
Jingjing

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

0 Kudos