Flash Magic Forum

In-System Programming Support => ARM Cortex => Topic started by: ektos_team on September 18, 2015, 03:16:37 AM

Title: SWD over Link2
Post by: ektos_team on September 18, 2015, 03:16:37 AM
Hi!
I use Flash Magic 9.4 and have LPC Link2(LPC4370) board. So I want program other board LPCXpresso lpc1114 reva via SWD interface. The Flash Magic write always "...autobaud - step 1" message. What is wrong? The LPC Link2 is in USB DFU mode and I have choose "SWD over Link2" mode.
Title: Re: SWD over Link2
Post by: Andy Ayre on September 22, 2015, 12:45:21 AM
Is the LED on the Link2 flashing?

Please send us a debug file - instructions: http://www.flashmagictool.com/debugfile.html

Andy
Title: Re: SWD over Link2
Post by: akhirules on November 13, 2015, 02:46:43 AM
I too had the same problem and the LED is Blinking
Title: Re: SWD over Link2
Post by: navin.gautam on March 16, 2016, 08:23:39 AM
I also have the same problem with LPC-Link2 trying to program LPC4357..
It complains about autobaud fail and LED on Link2 blinks.
I am selecting SWD over Link2...
Is there any solution yet?

I have attached degug log file.. if anybody need it
Title: Re: SWD over Link2
Post by: Andy Ayre on March 16, 2016, 09:34:36 AM
It says that the core on the LPC43xx didn't halt when expected.

What board are you using?

This isn't related to the problem you are having, but the oscillator frequency should be the crystal frequency, not the core frequency. E.g. 12MHz.

Andy
Title: Re: SWD over Link2
Post by: navin.gautam on March 18, 2016, 06:52:39 AM
The LPC4357 board is our custom board.
We are using LpcXpresso to program and debug it. But since recently we needed to program few tens of test boards and we decided to use flashmagic. However there is no luck. The SWD interface is working well with LpcXpesso. I am attaching the schematic that has SWIO interface connector.
I tried the crystal value of 12 and it is same.

Title: Re: SWD over Link2
Post by: Andy Ayre on March 21, 2016, 03:56:16 AM
We made a change in version 9.71, now available. Please give it a try. We have tested this with a Keil MCB4300 board populated with a LPC4357 and a LPC-Link2 board.

Note: for this to work the boot pins must NOT be set to boot the part from external memory.

Andy
Title: Re: SWD over Link2
Post by: navin.gautam on March 21, 2016, 07:30:40 AM
Thanks for update.

I downloaded the new Flashmagic. There is an improvement. Now I can read Chip ID and check blank status.
However, when I tried to program a hex file it did not work.

First it complained about the Chip signature not matched and it asked if I want to continue. I press ok to continue. Then it started to erase flash block 0. But it never passed.

I have attached the debug log file for your reference.

How I did see the device signature not matched? I have selected right CPU. LPC4357.

Thanks
Title: Re: SWD over Link2
Post by: Andy Ayre on March 22, 2016, 05:15:44 AM
We will discuss this with NXP and post back when we have an update.
Title: Re: SWD over Link2
Post by: hctek on July 18, 2016, 09:47:32 AM
Quote from: Andy Ayre on March 22, 2016, 05:15:44 AM
We will discuss this with NXP and post back when we have an update.

Hello, I am facing the same problem has described in this topic. You have some news?
Title: Re: SWD over Link2
Post by: Andy Ayre on July 19, 2016, 12:31:53 AM
We are working on it, but I don't have an ETA.
Title: Re: SWD over Link2
Post by: hctek on July 19, 2016, 02:03:07 AM
If you need my log file let me know.
Title: SWD over Link2
Post by: stevewald on August 17, 2017, 10:19:55 AM
I am trying to reprogram to the NHS3100 which came with the Temperature Logger ADK using FlashMagic (version 10.55.4768 on PC-windows7). The FlashMagic interface button does not have the required "SWD over Link2" item. What now?

Answered my question by reading Chapter 17 of the FM Manual -- I didn't have the SWD interface configured with the initial install. It's working now.
Title: Re: SWD over Link2
Post by: Andy Ayre on August 17, 2017, 02:52:29 PM
Thanks for posting the solution - it helps users that come after you.
Title: Re: SWD over Link2
Post by: psh on August 21, 2017, 09:09:35 AM
Can't get SWD to work over LPC-LINK2 either. Keep getting the autobaud  error.

For reference, the same pins can be used with Keil and ULINK-ME to both push down a Flash image as well as debug code on the target MCU. But when I try to download the image with Flash Magic, via the LPC-LINK2, I get the error. I believe I have it setup correctly and I have tried various tips to get it working to no avail.

My configuration is Windows 7, FM 10.60, Installed the NXP drivers with FM kit, No jumpers on the LPC-LINK2 (e.g., DFU), 50 mil ribbon from J7 to Adafruit's CORTEX SWD ADAPTER (basically 50 mil 2x5 to 100 mil 2x10), jumper from SWDIO, SWCLK, RESET and GND) to bread-board and then onto PCBA. The jumpers join same BB rows as for ULINK-ME. I have checked and re-checked jumpers and I see nothing wrong with them. I've even run continuity tests from the J7 for the lines I'm interested in to the bread-board to confirm. I am able to select "SWD over Link2" from FM Interface menu. When I conduct my FM tests, the ULINK-ME is not plugged in.

I am at a loss at this point and could use some tips. Any ideas?

Thanks,
Title: Re: SWD over Link2
Post by: Andy Ayre on August 24, 2017, 08:18:11 PM
As mentioned via email, the SWD communications are not reliable. Sometimes you are getting a parity error, other times a malformed packet. I would suspect an electrical issue between the LPC4300 on the LPC-Link2 and the target part.