NOTICE: This website will be shut down in the near future. Product content has moved to nxp.com. Forum content and FAQs have been moved to community.nxp.com. We encourage you to create a user account on nxp.com to use the new community forums and access NXP microcontroller content. We greatly appreciate your contributions and look forward to seeing you at our new web location.

 

Problems with LPC Link 2 and reset line

15 replies [Last post]
pockpock
Offline
Joined: 2014-07-05
Posts: 7

Hi,

I'm using the LPC Link2 with my LPCXpresso LPC1769. The LPC Link is brand new and has the J-Link firmware flashed. The chip gets recognized, I can read/write its memory and start debugging with Segger's GDB-Server. However it seems like the chip is never reset, which makes it difficult to start debugging from a known state.

It is possible to trigger the reset manually in the J-Link Commander. It also fails there, but luckily gives an error message:

J-Link>r0
WARNING: RESET (pin 15) high, but should be low. Please check target hardware.

I looked at the schematic and measured both signals the prebuffered GPIO5_5_JTAG_RESET as well as JTAG_RESET and they indeed stay high. Now I'm unsure if this is a bug in the firmware or a hardware defect. Can somebody try to reproduce the error?

Steps to reproduce:
1. Flash Segger J-Link Firmware
2. Connect LPC Link2 using J-Link commander
3. Try to pull the reset line low using the "r0" command

Other notes:
JP1 and JP2 are in place

Best regards,
Stefan

0
Your rating: None

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pockpock
Offline
Joined: 2014-07-05
Posts: 7

Update:
I ruled out a hardware defect by using the standard firmware and pulling the reset low from the RedLink Server. This works flawlessly, so I guess there might be an issue with the J-Link firmware?

bavarian's picture
bavarian
Offline
Joined: 2012-01-10
Posts: 322

Hello Stefan,

if I remember correctly there was a problem report from Segger with regards to the reset signal on the Link2.
As the Link2 is a kind of OEM hardware for Segger, they do not change the firmware for it on a daily basis.
Finally the Link2 board is an NXP tool and we will upgrade the J-Link firmware for it together with the Link2 config tool.
But I can't give a schedule for an update.

Regards,
NXP Support Team.

nLYjqmr0
Offline
Joined: 2014-03-16
Posts: 3

bavarian wrote:
But I can't give a schedule for an update.

Is there already an update planned? It seems to me that this issue still exists with LPC-Link 2 Configuration Tool v2.02.

Can this issue also be fixed applying a hardware patch?

SEGGER J-Link Commander V4.98a ('?' for help)
Compiled Mar 26 2015 18:40:28
DLL version V4.98a, compiled Mar 26 2015 18:40:07
Firmware: J-Link LPCXpresso V2 compiled Jan 28 2015 16:43:37
Hardware: V1.00
S/N: 720000000
VTarget = 3.300V
Info: Could not measure total IR len. TDO is constant high.
Info: Could not measure total IR len. TDO is constant high.
No devices found on JTAG chain. Trying to find device on SWD.
Info: Found SWD-DP with ID 0x0BB11477

**************************
WARNING: RESET (pin 15) high, but should be low. Please check target hardware.
**************************

lpcxpresso-support's picture
lpcxpresso-support
Offline
Joined: 2013-06-06
Posts: 2659

ISP mode provides a known state. See Boot into ISP mode at the following link:

http://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access

---
** Latest version of LPCXpresso IDE : v8.1.4 **
http://www.lpcware.com/content/forum/lpcxpresso-latest-release

Visit the LPCXpresso FAQs at http://www.lpcware.com/faq/lpcxpresso

---
** Latest version of LPCXpresso IDE : v8.1.4 **
http://www.lpcware.com/content/forum/lpcxpresso-latest-release

Visit the LPCXpresso FAQs at http://www.lpcware.com/faq/lpcxpresso

nLYjqmr0
Offline
Joined: 2014-03-16
Posts: 3

lpcxpresso-support wrote:
ISP mode provides a known state. See Boot into ISP mode at the following link:

The target MCU is working fine.
The LPC-Link 2 operating in "LPC Link" firmware mode (in comination with LPCXpresso 7) is also working.

But running LPC-Link 2 with the "J-LINK debugger" image is not working. Segger JLINK.exe is reporting on a reset command:

J-Link>r0
WARNING: RESET (pin 15) high, but should be low. Please check target hardware.

The reset pin (signal "JTAG_RESET") is not driven low, neither is the signal "GPIO5_6_JTAG_RESET_TXEN" driven high changing the signal direction of the bidirectional level translator U6.

pockpock
Offline
Joined: 2014-07-05
Posts: 7

Hi nLYjqmr0,

It's been quite a long time since I had this issue; but thanks reminding me that I should post some updates here. I actually managed to patch the binary. I used GDB to analyze the firmware (and I used my second Link 2 to do so). I traced writes to the GPIO registers. There were two problems with it:

  • The firmware doesn't explicitly set the alternate function to GPIO on some of the pins. It was GPIO5_5 and GPIO5_6 if I remember correctly.
  • Those are configured SGPIO per default. Then, as you noticed, the GPIO5_6 also isn't beeing set/cleared.

I was able to find the reset-IO functions inside the binary, which I modified to jump to my own functions, which fix the above two problems. I'm not sure whether I may distribte the modified binary, but I can post a diff patch, explain the changes I made and walk you through the process if you're interessted.

However after the firmware-mod I noticed that it doesn't really make any difference and the non-working reset line actually wasn't affecting me much. A hard reset throws the Link 2 and the target out of sync, so you have to reconnect to it and restart the debugging session (not very usefull). Soft resets should work correctly even with the "faulty" firmware.
There are some cases where the firmware on the target MCU might change some settings too quickly after a reset, such that SWD/JTAG wouldn't work, but for there it would be easier to fix by using one of the other firmwares for the Link 2. May I ask why do you need the reset line?

smultron
Offline
Joined: 2012-07-29
Posts: 5

I just got an LPCxpresso LPC11U68

I flashed the j-link image onto the LPClink-2

I start GDBServer and

"WARNING: RESET (pin 15) high, but should be low"

Is it so that this issue has NOT been fixed yet by NXP ?

If so, please confirm so I do not waste time with it.

nLYjqmr0
Offline
Joined: 2014-03-16
Posts: 3

Quote:
(...) Is it so that this issue has NOT been fixed yet by NXP ?
If so, please confirm so I do not waste time with it.

That is a good question. I cannot make a statement about a possible fix.

Since I wasted a lot of time with the LPC Link2 J-Link firmware, I finally decided buying a J-Link EDU (since I use it for personal purpose only) and it worked fine out of the box.

SEGGER - Alex
Offline
Joined: 2014-01-28
Posts: 15

Hi,

Sorry for the long delay.
Just got informed about this yesterday..

Has been fixed.
New firmware + tutorial how to get it into LPC-Link 2 can be found here:
https://www.segger.com/lpc-link-2.html

Best regards
Alex

smultron
Offline
Joined: 2012-07-29
Posts: 5

Thanks!

However

JP1 = NC, JP2 = 1&2, JP3=NC

Latest firmware patched as instructed

Quote:
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link LPCXpresso V2 compiled Oct 6 2015 20:21:28
Hardware: V1.00
S/N: 725268322
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...

Error, target connection failed. Could not connect

SEGGER - Alex
Offline
Joined: 2014-01-28
Posts: 15

Hi,

I assume it is still the LPCxpresso LPC11U68?
Just got an e-mail from another customer some minutes ago that says the new firmware is working perfectly fine on exactly this board.
We can give it a try tomorrow but I am pretty sure that we will come to the same conclusion: It works.

- Alex

smultron
Offline
Joined: 2012-07-29
Posts: 5

Nope.

I just went through the LPCScrypt routine and was extra careful. It says firmware has been burned OK.

Quote:
LPCScrypt - J-Link firmware programming script v1.5.2 June 2015.

Connect an LPC-Link2 or LPCXpresso V2/V3 Board via USB then press Space.

Press any key to continue . . .

Booting LPCScrypt target with "LPCScrypt_83.bin.hdr"
LPCScrypt target booted
.
Programming LPCXpresso V2/V3 with "Firmware_JLink_LPCXpresso_V20150128.bin"

- LPCXpresso V2/V3 programmed with chosen image
- To use: remove DFU link and reboot.

CONNECT NEXT BOARD THEN PRESS SPACE (or CTRL-C to QUIT)

That firmware is the new firmware from the link you provided, renamed to the name of the old existing firmware.

I then remove the DFU jumper, power cycle, launch J-Mem with LPC11U68 SWD as target.

When I try to connect, led D8 on the the LPC link led flashes rapidly in 3 successive tries, flashing led on target stops for a while (the target is clearly reset) but eventually:

Quote:
J-Mem V5.02f Error
Could not connect to target for unknown reason

The Jlink control panel says that its
"J-Link LPCXpresso V2 compiled Oct 6 2015 20:21:28 V1"

JLINK_IsConnected

The board:

Xpresso v2 rev C.
E225430 KB-04 x

SEGGER - Alex
Offline
Joined: 2014-01-28
Posts: 15

Not sure what the "Nope" refers to, but I gave it a try here 1 minute ago.
J-Link Commander as well as J-Mem work fine.
See screenshots in attachment.

PreviewAttachmentSize
LPC11U68_Commander.png20.1 KB
LPC11U68_JMEM_1.png11.43 KB
LPC11U68_JMEM_2.png22.25 KB
smultron
Offline
Joined: 2012-07-29
Posts: 5

"Nope" refers to the fact that its not working.

I am beginning to fear that I have a faulty board. If so thats a bummer because I'll have to go through the hassle of sending it back.

I can get the USBISP mode working on the target, so I know its alive.

I took a fresh computer, dl'd LPCscrypt, got the firmware, put it in LPCScrypt binaries folder, renamed them as instructed.

I then ran the J-link script on the LPCScrypt with DFU jumper in place. It said that firmware had been burned ok.

But, then. DFU jumper off, power cycle, ran J-link commander and you can see the result in attachment below. No go. No device found in SWD

Could you confirm you have a Rev C board ?

UPDATE: with CMSIS-DAP firmware LPCLink is working fine in LPCXpresso IDE. However, I need J-link for my toolchain.

Either you have a different revision board to mine, or then the J-link firmware juuuust manages to work on your board but not mine. Would like to hear from others, what are your experiences ?

PreviewAttachmentSize
nogo.png39.1 KB
smultron
Offline
Joined: 2012-07-29
Posts: 5

Hey SEGGER-Alex

I'm serious. its not working. CMSIS-DAP firmware works, but J-link doesnt find the SWD device. I have tried several times now.

I'm not a complete newb. I know how to flash a new firmware and put the cable in the right USB connector. I also have a genuine J-Link EDU, so I know how it is supposed to work.

I don't want to start sending it back to Digikey if there is something I can still check before I claim a defective product. I paid customs and handling fees so this has cost me a pretty penny if I have to return it. I am developing a custom board based on LPC11U68 and this was supposed to be my kit for developing while on the road.

So

Is there anything I can check with my oscilloscope/logic analyzer/another j-link probe to try to troublehoot why the j-link firmware is failing to find the LPC11U68 target on my board? I repeat that debugging through CMSIS-DAP works 100%.

feedback