Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 7 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 ?
17 Answers
7 years, 6 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.
10 years, 4 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 29 Jul 201410 years, 5 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
9 years, 5 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, 12 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
8 years, 3 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 :)
8 years, 10 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
6 years, 2 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!
8 years, 10 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.
10 years, 5 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.
5 years, 10 months ago.
Just disabled Storage Service in the services.msc, press the reset button. And it worked amazingly
7 years, 3 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
10 years, 6 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 14 Jun 2014Thommen GK, provide details. What is your target, what binary are you loading, what is the firmware version !
posted by 14 Jun 2014Hi,
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:
- 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 15 Jun 20148 years, 7 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 04 May 2016
Same here on KL25Z
posted by Eric Fossum 18 May 2013we are getting this error also on a FRDM-K20D50M
posted by Louis Birk 03 Jul 2013https://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