KL25Z problem

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

KL25Z problem

Jump to solution
5,559 Views
jeffhaller
Contributor II

I just started playing with a FRDM-KL25Z development board today but now I can't get it to run firmware.  I tried a couple of the pre-built firmware files from the freescale Quick Start Package without issue but now whatever I load onto the drive during bootloader mode does not run when I restart the device.  I can always go into bootloader mode and see the flashing LED and the rate of the flashing changes when I put a program on the board but nothing ever runs upon restart.  Does anyone know what has happened and if there is a way to fix it? 

1 Solution
4,440 Views
BlackNight
NXP Employee
NXP Employee

If it blinks, usually this means

a) wrong file format you try to load

b) no OpenSDA (e.g. MSD bootloader) firmware loaded

c) wrong OpenSDA firmware loaded

I suspect the later.

>>I have tried loading basically every file in Freescales quick start package while in boot mode.

What is 'boot mode' for you? To load an S19 file, the device needs to show up as 'FRDM-KL25Z' device. If it shows up as 'BOOTLOADER', then you are in the wrong mode.  Plug in the KL25Z with the OpenSDA USB port. Does the device show up named "FRDM-KL25Z" as MSD Bootloader Device' (see The Freescale OpenSDA Trap: “No Device Available”, or something like that… post)? If not, then it is not in MSD mode.

To get into MSD (Mass Storage device bootloader) mode, see "Changing the Board back to MSD Bootloader (P&E OpenSDA)" in above post.

I hope this helps.

View solution in original post

0 Kudos
Reply
16 Replies
4,440 Views
jeffhaller
Contributor II

So, here is my current state.  I have tried loading basically every file in Freescales quick start package while in boot mode and each time the SDA led will change from alternating every .5 second to blinking in groups of 7 flashes.  When I power cycle the board I get no response.

My theory is that the K20 mcu that manages boot mode is operating normally but the kl25z mcu has died.  I did some probing around while the board was connected via USB (not in boot mode) and I measured 3.3V across C8 and C9, so it looks like the board is getting power, but only 1.08V across C7.

I'm not sure how this could have happened.  I literally just opened the box and started trying to load code onto it from IAR and after a couple power cycles it became unresponsive.  I've put lots of MCUs from Analog Devices through hell and they always fire right up.  Any thoughts?

0 Kudos
Reply
4,441 Views
BlackNight
NXP Employee
NXP Employee

If it blinks, usually this means

a) wrong file format you try to load

b) no OpenSDA (e.g. MSD bootloader) firmware loaded

c) wrong OpenSDA firmware loaded

I suspect the later.

>>I have tried loading basically every file in Freescales quick start package while in boot mode.

What is 'boot mode' for you? To load an S19 file, the device needs to show up as 'FRDM-KL25Z' device. If it shows up as 'BOOTLOADER', then you are in the wrong mode.  Plug in the KL25Z with the OpenSDA USB port. Does the device show up named "FRDM-KL25Z" as MSD Bootloader Device' (see The Freescale OpenSDA Trap: “No Device Available”, or something like that… post)? If not, then it is not in MSD mode.

To get into MSD (Mass Storage device bootloader) mode, see "Changing the Board back to MSD Bootloader (P&E OpenSDA)" in above post.

I hope this helps.

0 Kudos
Reply
4,440 Views
jeffhaller
Contributor II

Your post was a success!  Extracting the files to the drive first then copying to the device worked for some strange reason.  Thanks for all your help.

0 Kudos
Reply
4,440 Views
BlackNight
NXP Employee
NXP Employee

Hi Jeff,

uffff!!!

It is not that strange that it fails if you copy the file e.g. from WinZip (without extracting the files first), as this likely changes the order how the file blocks are written. That dependency on the file blocks is a big problem for MSD bootloaders like the one used in OpenSDA. I know that e.g. Linux or Mac systems are causing this kind of problems, and I believe that P&E has fixed some problems around it. But it is still a problem :-(.

0 Kudos
Reply
4,440 Views
emmanuelballest
Contributor III

Hi Jeff,

I'm working for the first time with the FRDM-KL25Z and had similar problems, I recommend watching this link about OpenSDA.

OpenSDA on the Freedom KL25Z Board | MCU on Eclipse

I hope this helps,

Emmanuel.

4,440 Views
BlackNight
NXP Employee
NXP Employee

Hi Jeff,

>>"see the flashing LED and the rate of the flashing changes"

Which LED? The OpenSDA one? If you are using the P&E OpenSDA, than the rate shall not change. If it does, then this indicates an error.

Are you sure you are loading an S19 file (and not something else)?

If the application does not start, then I suggest that you debug it? Does it work if you debug it on the board?

I hope this helps,

Erich

0 Kudos
Reply
4,440 Views
VinGanZ
Contributor III

hey,

i have a similar problem with my custom board.

The code runs well with a debugger connected to it and running from the IAR IDE.

if i remove the debugger and power the board, nothing works.

What i have already tried is

1. Verified whether the flash is getting programmed. (The same code runs on another custom board which is the earlier revision of the board under test)

2. The reset line looks fine. the reset pin is at proper 3.3V when its powered.

3. Also the TSI routines does not work in the new board which has little changes to the layout compared to the older board which works with TSI

Can anyone help?

Vinod

0 Kudos
Reply
4,440 Views
luisburgos
NXP Employee
NXP Employee

Hi Vinond, the debugger is very slow. I recommend you to check the ramp up of the VDD and Reset and you can increase the reset time too.

Do you have a screen shot of your ramp up?

Regards, Burgos.

4,440 Views
VinGanZ
Contributor III

HI burgos,

Thanks for the answer.
I am able to debug the code but the downloaded code is not executing on the board.
How to check the ramp up of VDD and how can this affect the programming?

The reset time is currently fairly big with a 10K pull-up and 10uF capacitor on it.

The situation is,

1. The debugger works without problems. But the touch sensor does not work with the debugger

2. After downloading the code, it fails to execute although i am able to run other parts of the code other than TSS working with debugger running in debug mode.

Regards

Vinod

0 Kudos
Reply
4,440 Views
luisburgos
NXP Employee
NXP Employee

Can check your ramp up with a oscilloscope and sent it to me?
You can try increasing the value of your capacitor, you will have a bigger time of ramp up and your micro controller will have more stability.

Burgos.

0 Kudos
Reply
4,440 Views
VinGanZ
Contributor III

Hi Burgos

I have found an issue with IAR embedded workbench. As I said before I have two different revisions of boards.

1. Revision A board gets programmed without any issues which has mkl25z128vkl4 part with IAR embedded workbench.

TSS works well on this board.

2. Revision B board with same program does not get programmed correctly with same mkl25z128vkl4.

3. However Revision B board worked with code warrior ide program. TSS still does not work with code warrior on Revision B board but same code works on Revision A board

the touch sensors from revision a through revision b remains c the same.

Does this point to a silicon anomaly ?

0 Kudos
Reply
4,440 Views
luisburgos
NXP Employee
NXP Employee

Hi Vinond,

What are the difference of hardware between both boards?

1) Check the mask set of both micro controllers (It´s under the part number of your micro controllers), there are two erratas of TSI for mask sets 1N97F and 2N97F.

    

     links: http://cache.freescale.com/files/microcontrollers/doc/errata/KINETIS_L_1N97F.pdf?fpsp=1&WT_TYPE=Erra...

               http://cache.freescale.com/files/microcontrollers/doc/errata/KINETIS_L_2N97F.pdf?fpsp=1&WT_TYPE=Erra...

2) Also it can be problem of the PCB, to check that you can change the micro controller of the board that it´s working well and do a test in the PCB that is not working well.

Hope this helps.

Burgos.

0 Kudos
Reply
4,440 Views
VinGanZ
Contributor III

Hi Burgos

both the boards have same silicon revision 2N97F. Since code warrior is able to program both boards and most things other than touch buttons are working I believe there's something that can be corrected.

The touch sense interrupt does not fire on Rev B board. Only change between Rev A and B are 2 extra io pins connected.

0 Kudos
Reply
4,440 Views
luisburgos
NXP Employee
NXP Employee

Vinod, I talked with Vicente Gomez and he will have a solution for your problem.

Regards, Burgos.

0 Kudos
Reply
4,440 Views
VinGanZ
Contributor III

Well, the touch buttons does work when i checked through the calibration routines.

The interrupt does not fire at all?

What does the TSI0 interrupt depend on?

0 Kudos
Reply
4,440 Views
jeffhaller
Contributor II

I have tried both the blinky.s19 file from your blog and pretty much every .srec file in the quick start package for this board and I see no life in the board in either of the LEDs.  It also does not communicate with either of my computers in control mode.  I have connected it to both windows and linux and it only shows up as a usb device in boot mode.  Consequently, I'm not sure how I would debug the board if it doesn't communicate to the computer and I don't have a programmer.  There is another board at work that I could possibly use as an swd programmer as per the instructions on your blog if worst comes to worst.

0 Kudos
Reply