KL25Z programming problem with CW

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

KL25Z programming problem with CW

1,258 Views
nick92
Contributor II

Hey guys,


I'm trying to flash a simple ADC testing program onto my KL25Z with CodeWarrior; CW recognises the board so no USB connectivity issue there. I can also successfully erase the device. However, when I try to program it, I get this error message:

"Error:  Program Command Failed.   Security area should not be programmed with a value that leads to irreversible secure.

Error: Program Command Failed. Security area should not be programmed with a value that leads to irreversible secure

"

I've tried searching the web but no dice! I don't understand why 3 lines of codes can cause any security issues or why there's a security issue in the first place!

Any help and suggestions will be highly appreciated. Thank you all!

6 Replies

759 Views
nick92
Contributor II

Update: Now it won't even erase.

error message:

"

Error executing task KL25Z64M4.

Error:  Erase Command Failed.   Protect violation error.Device FTFA_PFlash64RAM8 is protected  

<s>thread exit: Stopped, 0x0, 0x0, cpuARMLittle, Unknown (state, tid, pid, cpu, target)</s>

Error: Erase Command Failed. Protect violation error.

"

0 Kudos

759 Views
hectorsanchez
Contributor IV

Hi Nicola,

I'm looking at your problem right now.

Are you sure you selected the correct device when you made the project in CW?

See if this thread helps you : http://mcuoneclipse.com/2012/05/28/device-is-secure/

Keep me informed,

Hector Sanchez

0 Kudos

759 Views
nick92
Contributor II

Hey Sanchez,

Thanks for getting back, I'm pretty sure I have chosen the right device when creating my project, but just to be 100% sure, is there a way to double check the actual device model? I know there are different types of KL25Z. Furthermore, I have looked at that thread previously and according to the steps, it lead me to a point where I could view whether or not the device is protected or not, it seems like it's all "unprotected", I'm really confused now, it doesn't really make sense.

0 Kudos

759 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Nicola,

If it is possible, could you post your code here and I could check that code on my site. Thanks.

best regards,

Ma Hui

0 Kudos

759 Views
nick92
Contributor II

Hey Ma Hui,

It's nothing complex of a code, I was just following a tutorial to test out the ADC:

http://mcuoneclipse.com/2013/02/10/tutorial-adc-with-the-freedom-board/

Update: The error that I receive when I try to Flash the board is now the following:

Error executing task KL25Z128M4.

"Error:  Program failed.   Flash driver reports the following error(s):  Secure operation with disabled mass erase detected. Aborting programming to prevent locking the device permanently

<s>thread exit: Stopped, 0x0, 0x0, cpuARMLittle, Unknown (state, tid, pid, cpu, target)</s>

Error: Program failed. Flash driver reports the following error(s):  Secure operation with disabled mass erase detected. Aborting

programming to prevent locking the device permanently"

Which is weird because I am successful in flashing the sample program from CW, the Tri-LED program. So I assume that the board is not bricked which makes sense because I wasn't fooling around with in the first place.

Cheers.

0 Kudos

759 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Nicola,

The KL25 ADC tutorial does not set Flash configuration filed to disable mass erase.

Please check attached project, I refer KL25 PE ADC tutorial created this demo, which based on FRDM-KL25Z board and works normally.

Please try this project on your CodeWarrior IDE and check if same issue also exists.

My CodeWarrior version is V10.5 and PE with latest updated (Rev. 10.5.1)

processor expert.jpg

Wish it helps.

Best regards,

Ma Hui

0 Kudos