7 years, 6 months ago.

Dead frdm_kl25z?

Hi there...

Using someone else's PC, I just got my frdm_kl25z converted to mbed with the s19 upgrade file and my Mac (10.8.2) correctly sees it as an mbed device. Great so far. I get a green light when I plug it into the USB port, but that's about it. Here's a list of issues I've identified:

My programs don't run. I compiled and downloaded - saw the status light flickering indicating file transfer - the following:

int main(void) {
    DigitalOut led(LED_GREEN);
    Serial pc(USBTX, USBRX); // tx, rx
    pc.printf( "Freescale test\n\r" );
    while (true) {
        led = 1;
        led = 0;

I don't get the PC message and the green LED doesn't light. Nothing happens when I push the reset button, either. I tried other similar programs using different on-board LEDs and they didn't produce expected results, either. I just double-checked that the architecture selector in the compiler window is set for "Freescale KL25Z". Hmm. When I look at the contents of the KL25Z mbed device in the file browser, I don't see my program, unlike on the LPC1768. Is this a failure of the Mac -> mbed connectivity? I can program my LPC1768 just fine with my Mac. I do notice, just after the file copy completes, a consistent Mac alert about improperly disconnecting the mbed device. Is this a known issue? It doesn't happen with the LPC1768.

VIN doesn't light up the unit. I tried different voltages - 5 to 7.5 - with the same results: nothing. Same power supply lights up an LPC1768 just fine. Just tried two additional power supplies, rated for 2 amps, and same results: no green status light. Here's the curious part: the unit doesn't turn on, but I checked the power-related pins and the two 3.3V pins read 3V. However, the 5V pin fluctuates between a high of .66v and a low of .51v, over a period of about 5 seconds. If I plug in the USB cable, the unit goes green and the 5V pin measures 5v. If I unplug the USB cable, VIN does not keep the unit powered. All of the ICs feel cool to the touch.

I was very careful about static: I have a background in programming eeproms, so I'm aware of the risks and grounded often before touching the board.

I'll try flashing the unit back to the original OpenSDA firmware and run some tests. Any other suggestions?



I expect it to be broken if your Vin doesnt power it anymore, although no experience with the freescale board. Regarding your first point, that is by design: It has no flash memory chip, so after programming the main uC the program you uploaded will be removed.

posted by Erik - 09 Mar 2013

Hi Aaron, can you try several things;

  • first try to drag n drop your program from a windows machine
  • which browser are you using? try to download the .bin file on your desktop and then to drag n drop it from your desktop
  • do you have a file called fail.txt created after your transfer?
  • as Erik mentioned, as there is no external flash, you will not be able to see your file in the usb disk after a drag n drop. when a transfer is finished, the kl25z board is disonnected/reconnected that is why there is the message complaining that a device has not been removed correctly. You can just ignore this message.


posted by Samuel Mokrani 09 Mar 2013

4 Answers

7 years, 6 months ago.

It is normal that you don't see the program. The debugging part has no eeprom to store the program. There is a spare part U5 on the board for that ?? If you download a program it is flashed into the KL25, but you can't see it.

If you power the board with VIN only the KL25Z is powered - not the debug part ! The serial pc and the green led are the debug part. Your board will be OK. Check with the RGB led. This is connected to the KL25Z and will be working with external power.

7 years, 6 months ago.

Thanks for the input, so far.

In answer to Sam: I'm using Safari as the browser, but the "cp" terminal copy command to copy the file, which has worked fine and dandy for the LPC1768. I used the file browser - "finder" - as well, to see if it would make a difference, but it did not. At one point, I did notice a "fail.txt" file on the mbed device. I think it was "reserved bits," but don't quote me on that.

I flashed the OpenSDA firmware back onto the unit and restarted, connected to a PC. On both the PC and the Mac, it appears as FRDM-KL25Z. But, instead of running the default demo program, it's running the program, above. The big green LED is flashing on and off, two seconds each, and when I hit the reset button, I get the "Freescale test" on the console. Under VIN power, the big green LED flashes, as mentioned, and, as suggested by Peter, the little diagnostics green LED is not on. The 5V pin still fluctuates between .66 and .51 volts, while the two 3.3V pins are 3v.

Went to my neighbor's to change the firmware to the mbed, s19, version...

The unit now appears as MBED, as expected. Without having to reload the binary, it's running the program from above, and I get text on the console when I hit reset.

From the Mac, I changed the test program to use the blue LED instead of the green, and, after using the "cp" command on the Mac to copy the file to the mbed, I get nothing, again, like last night: the unit appears to be unresponsive. There is a "fail.txt" file, and it does, in fact, say "RESERVED BITS".

Went to my neighbor's - who happens to be my mother, so she's putting up with the frequent interruptions - and logged in to the compiler from there, on a Windows box, and downloaded the changes from there, and it works. So, it's clearly something to do with transferring the binary to the mbed board from a Mac. Something about that process causes the mbed to lock up, until it's reset from a PC.

Is this a known problem?

7 years, 6 months ago.

Hi Aaron,

The support for drag n drop without external flash on Mac is quite difficult. But I am sure that we will find something working to use your frdm board on your mac. Can you try the following tests and tell me what are the results:

  • from safari, dowload the .bin file to your desktop. Drag n drop the file from your desktop (without the 'cp' command)
  • from safari directly save the .bin file into the mbed disk
  • can you try as well to directly save the .bin file into the mbed disk from chrome/firefox


I flashed the OpenSDA firmware back onto the unit and restarted, connected to a PC. On both the PC and the Mac, it appears as FRDM-KL25Z. But, instead of running the default demo program, it's running the program, above. The big green LED is flashing on and off, two seconds each, and when I hit the reset button, I get the "Freescale test" on the console.

Before seeing the led flashing, did you drag n drop the .bin file in the FRDM-KL25Z disk?

Cheers, Sam

Hi, Sam...

The way Safari works is it automatically drops the downloaded file into a folder; by default, it's /Downloads. There's no "Save As". Per your request, I used Finder - the Mac's native file browser - to drag-and-drop the file onto the mbed, and it now seems to work. When I first tried this approach, the other day, it didn't work, but I'm not sure if that's because I tried it while it was locked up, or maybe didn't push the reset button, I don't know.

For giggles, I tried the "cp" command and it locked up, again. To unlock it, I ejected the volume, unplugged and plugged the unit back in, and then dragged the binary to the volume and hit the reset button. This seems to work consistently, now, so while it's a change in my workflow, the unit is working, and I appreciate the assistance.

Oh, to answer your last question, above, no, I hadn't dragged any binary to the unit: it was like the binaries that I "cp"d actually did get flashed to the unit, but the unit was locked up. I thought I'd triggered some weird error diagnostic code, until I recognized that it was running my own code. To reiterate: I took the locked up unit to a Windows box, re-flashed the OpenSDA firmware to the Bootloader volume, and then restarted. It ran my code immediately. I'll avoid the "cp" approach, going forward.


posted by Aaron Minner 10 Mar 2013

Hi Aaron,

Good to hear that you have something working. I will investigate at some point why it is not working with the 'cp' command. Thanks for your report!


posted by Samuel Mokrani 10 Mar 2013
5 years, 6 months ago.

hola tengo un problema, no enciende ningún led y la computadora no puede reconocerla freescale kl25z. ¡alguien me puede decir que hacer?

Hola, sabes que le paso ? Me acaba de suceder lo mismo

posted by yershon caro 20 Jun 2016