10 years, 11 months ago.

SWD error

I coppied Bin file on usb drive and reset device. Create a fail.txt file and write SWD ERROR.

Why is board create a fail file ?

Same here on KL25Z

posted by Eric Fossum 18 May 2013

we are getting this error also on a FRDM-K20D50M

posted by Louis Birk 03 Jul 2013

https://drive.google.com/drive/folders/0B6fz4hKkIhQhb01hdVNYSjVYb0k?usp=sharing just go inside the folder and download it and then use the readme.txt folder All problems will be washed and you can use the FRDM KL25z easily

posted by Pratik Wagh 29 Aug 2017

17 Answers

6 years, 10 months ago.

I have this problem too. I've tried holding down the reset while dropping the hex file in the MBED drive and it doesn't work.

Any real solutions? I haven't been able to find anything official.

9 years, 8 months ago.

I do the same what @Andrea Corrado and my FRDM KL25Z works fine again

Have you updated the interface firmware lately? http://mbed.org/handbook/Firmware-FRDM-KL25Z

posted by Sam Grove 29 Jul 2014

I do this first. when I saw the fail document I upgrade the software and next I found this comment. I pushed the reset button and I tried to drop a .bin file to my FRDM then I saw another fail "bit reserved" or somethin like that and next I drop .bin file and board is ok.

posted by Wacław Czernecki 29 Jul 2014
9 years, 10 months ago.

Does anybody have solved the problem? I have the same thing with a freescale FRDM-K64F.

I just changed the card and it worked as it was supposed to be! Unfortunately it was a new one.

posted by Jorge Pardiñas 26 Jun 2014
9 years, 11 months ago.

i too how can i copy the file ... the memory size only 20 kbyte ???

Hello, can you elaborate? What target, share a binary, what program? Is it an output binary from the online compiler?

posted by Martin Kojtal 27 May 2014
9 years, 9 months ago.

Was there ever a solution to this problem? Granted I am new to the nucleo and mbed, but there seems to be a problem with either the drivers or these boards.

My nucleo worked great, was sending and receiving text over USB-serial, then it stopped. I got a copy error where the device was showing full. On an XP machine, I get that error, eject the device, then the device shows up again and it looks fine. I can copy to it, etc. but the serial USB no longer works. I can tell the board is running my code as the downstream device is initialized correctly.

What gives? Are the Nucleo boards worth the effort? I am moving from Arduino for higher performance and can't live with this, especially as I don't see anyone chiming in on the threads.

Thanks for reading at least!

Jerry

Can you full erase the chip? I would use one of examples to flash the board or update the firmware to the most recent one or connect the board to an external tool which would allow me to erase a chip.

Or does this issue persist if you use a simple Hello world example?

posted by Martin Kojtal 30 Jun 2014

I can't get any code to load on the board now. I suspect something popped and the SWD error is related to the pins on the processor not responding to the link?

posted by Jerry Hancock 30 Jun 2014
8 years, 9 months ago.

I am surprise no one has posted a solution to this issue

I have the same problem and no bin file seems to work. I followed the procedures described by others and yet the issue remains "fail: SW ERROR"

6 years, 4 months ago.

Solution : i tried this solution ans its work: launch the editor, use <Windows>+<R>, then type

gpedit.msc

and after go to

Computer Configuration \ Administrative Templates \ Windows Components \ Search \ Do not allow locations on removable drives to be added to libraries

and activate this option ('enabled').

For more information watch this video : https://www.youtube.com/watch?v=PbWO_Jk9yqc

Thanks, worked for me!

posted by Jose Mayoral 26 Mar 2018
7 years, 7 months ago.

Load it in bootloader mode (hold the reset button, then plug it to the usb cable), then put the newest firmware update. Worked here :)

Ha I tried that. It said something like "The file is too big for the filesystem" and now the board seems totally bricked. When I plug it in with or without the reset button held no LEDs light and no UMS drives are found. Pretty shit.

posted by Tim H 29 Oct 2016
8 years, 2 months ago.

Team

I had the same problem this AM. WE pushed the new firmware for the board and that didnt help either. INstead of a simple "SWD ERROR" we then started getting a "The interface firmware FAILED to reset/halt the target MCU".

Its possible that the new firmware (pushed as per below website) is giving a more descriptive error

https://developer.mbed.org/teams/Switch-Science/wiki/Firmware-LPC824

Andrea Corrado's procedure didnt help us. Heres what we did

1) Put the LPC824 chip in ISP mode

2) Pushed a sample code using FlashMagic using Uart0

3) rebooted the entire chip and the sample code worked

4) then we repowered the entire device and tried to use the NORMAL harddrive copy way and it worked

My theory is that the LPC824 is "stuck" in some kind of format and is not moving to ISP mode (which I am again guessing) is required for the program to be pushed from MBED into the chip. Once FlashMagic got involved it must have "cleared" the chip and all went back to being normal

These are wild theoritical guesses. BUT IT Worked :)

Any questions please dont hesitatte to write back

Best Regards Siva S

5 years, 6 months ago.

PEMicro OpenSDA firmware needs to be updated. The instructions for updating the board to PEMicro firmware is as follows- 1. Connect the board in bootloader mode 2. Copy the "BOOTUPDATEAPP_Pemicro_v111.SDA" file to the BOOTLOADER drive. 3. Unplug and replug the board (do no hold reset button). Check if board now opens in BOOTLOADER mode. 4. Copy the "MSD-DEBUG-FRDM-KL25Z_Pemicro_v118.SDA" to the BOOTLOADER drive. 5. Unplug and replug the board. Check if board opens as FRDM-KL25Z drive. Cheers man and fukc you!

thanks bro love u

posted by nitin lalwani Ulhasnagar 17 Oct 2018
8 years, 2 months ago.

Solve some probem wiht: :)

1) Plug Board in, wait for solid status LED

2) Press and hold reset button and at same time drag blinky on to Mass storage device.

3) Release reset and program should now load, no error.

9 years, 9 months ago.

Just started MBED, i got this issue and believe i solved my SWD error, blinky now operational again.

1) Plug Board in, wait for solid status LED 2) Press and hold reset button and at same time drag blinky on to Mass storage device. 3) Release reset and program should now load, no error.

Worked for me!!!!!

posted by Brendon Schenecker 25 Oct 2015

Sucess!

posted by Mário Wilson Pereira 30 Apr 2017
5 years, 2 months ago.

Just disabled Storage Service in the services.msc, press the reset button. And it worked amazingly

7 years, 7 months ago.

deleted

6 years, 7 months ago.

https://drive.google.com/drive/folders/0B6fz4hKkIhQhb01hdVNYSjVYb0k?usp=sharing just go inside the folder and download it and then use the readme.txt folder All problems will be washed and you can use the FRDM KL25z easily

9 years, 10 months ago.

Same problem here. Any bin file that I try to load onto the board results in 'SWD error'

Is there any code running on the processor that may have disabled the SWD pins. Some SWD ports dont use the reset pin. Try pressing and holding reset while downloading the file. You could also try to boot the device in ISP mode and then reset again to start the SWD flashing.

posted by Wim Huiskamp 14 Jun 2014

Thommen GK, provide details. What is your target, what binary are you loading, what is the firmware version !

posted by Martin Kojtal 14 Jun 2014

Hi,

I am just compiling the hello world program using the mbed online compiler. Once it is compiled, the binary file gets downloaded, which I copy into mbed usb drive. I reset the device, but nothing happens. When I view the contents of the USB device, it has a fail.txt which says 'SWD error'. Here is the hello world program:

  1. include "mbed.h"

int main() { DigitalOut gpo(PTB8); DigitalOut led(LED_RED);

while (true) { gpo = 1; led = 1; Off wait(1); gpo = 0; led = 0; on wait(1); } }

I also tried upgrading the firmware as per the instructions here: https://mbed.org/handbook/Firmware-FRDM-KL25Z But I end up with the same result.

Any help would be appreciated. Thanks.

posted by Thommen GK 15 Jun 2014
7 years, 11 months ago.

Guys did any of you solve the SWD Error issue? I did the same thing: I am just compiling the hello world program using the mbed online compiler. Once it is compiled, the binary file gets downloaded, which I copy into mbed usb drive. I reset the device, but nothing happens. When I view the contents of the USB device, it has a fail.txt which says 'SWD error'.

I am using Windows 10 and 2013 FRDM KL25Z with TFC shield connected standard to the freescalecup. Please let me know how to solve this issue!

Did you load the mbed firmware (so when you plug it in with reset button pressed) on a W7 or before PC? If no, try that.

Also if you have't tried it yet, reboot your PC. For some reason my W10 is sometimes writing stuff to mbeds they don't like, after a reboot it stops screwing it up.

posted by Erik - 04 May 2016