Is my FDRM-KL25Z broken?

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

Is my FDRM-KL25Z broken?

Jump to solution
4,569 Views
lukep
Contributor I

I got my FDRM-KL25Z in the mail a few days ago, it's my first time using an ARM based MCU (used atmel 8-bit µC's for about a year). It worked fine for a while, I tried some pre-compiled examples and wrote my own blinky program. Always programming it with the MSD flash programmer.

Yesterday I tried to flash another example app onto it to try the virtual serial port. However I got the 8 blinks 2 second pause "error" from the LED and the application didn't run. LASTSTAT.txt says "programming...". I tried reloading the MSD programmed SDA application, no dice.

So then I tried using the CMSIS-DAP in combination with keil µvision to flash a program to it (one the example projects from the keil MDK). I get three messages: "Kinetis Device is locked! Do you want to unlock it? Mass erase will be executed!" followed by "AGDI-Cortex M error: Cannot access memory". The IDE is configured the right way - if I disconnect the device it simply says "no debug unit found".

It seems the openSDA chip works fine, as does the KL25Z128xx. It runs the last program that was on it when programming still worked, and loading new openSDA applications works as well (it recognizes the CMSIS-DAP in keil and the MSD shows up when the MSD programmer application is loaded).

Does this mean the board is broken or is there more troubleshooting I should do before I RMA it?

Labels (1)
0 Kudos
1 Solution
1,761 Views
JimDon
Senior Contributor III

Well, you DO NOT need a J-Link to "unlock" it.

I can not say exactly what to OP's issue is, but I DO know that the OpenSDA + CE 10.3 will program it from any state.

That post will explain how to do ti with CW and OpenSDA.

If you ask Keil I am sure they will figure out what is up with your situation.

I had no issues using CW and Keil myself.

http://mcuoneclipse.com/2012/10/26/unsecuring-the-kl25z-freedom-board/

View solution in original post

0 Kudos
7 Replies
1,761 Views
JimDon
Senior Contributor III

Did you load the DEBUG dap?

Do  you have the Firmware apps from:

http://www.pemicro.com/opensda/

You need to load the debug dap. Hold the reset button, plug and un plug the usb, UNZIP the zip file and drag and drop the debug dap.

0 Kudos
1,761 Views
lukep
Contributor I

Ok I loaded the debug app. Keil recognizes the debugger, first I get "device is secure. Erase to unsecure?" and then I get the error "can't communicate with the target processor! Please check your connections between the cable and the target and make sure the target has power."

Again it seems the programmer/debugger can't communicate with the MCU.

0 Kudos
1,761 Views
rogerzhong
Contributor III

Maybe the MKL25Z128xxx chip on the board was secured, you can refer to discussion that linked as below to unlock the chip by using J-Link.

How to unlock a secured Freescale Kinetis L chip

0 Kudos
1,762 Views
JimDon
Senior Contributor III

Well, you DO NOT need a J-Link to "unlock" it.

I can not say exactly what to OP's issue is, but I DO know that the OpenSDA + CE 10.3 will program it from any state.

That post will explain how to do ti with CW and OpenSDA.

If you ask Keil I am sure they will figure out what is up with your situation.

I had no issues using CW and Keil myself.

http://mcuoneclipse.com/2012/10/26/unsecuring-the-kl25z-freedom-board/

0 Kudos
1,761 Views
lukep
Contributor I

Thanks, I have CW installed so I'll try what they did in that post. Hoping the disable mass erase bit isn't set :/

EDIT: I looked at the last file I flashed to it, it used 0x00 for undefined bytes which means it enabled security, luckily that should mean the disable mass erase bit isn't set. It was the pwm_led from the example projects supplied by freescale :s

0 Kudos
1,761 Views
BlackNight
NXP Employee
NXP Employee

I have put together some background details around security and mass erase bit, and as well how to check the settings (e.g. in a binary file): How (not) to Secure my Microcontroller | MCU on Eclipse

Hope this helps,

Erich

1,761 Views
lukep
Contributor I

Fixed it :smileygrin: thanks for all the help. I used this guide Jim Donelson posted to fix it and the link you posted led me to check the .bin file for the security bits. And I learned to check precompiled programs before flashing them x_x

0 Kudos