Debugging problem with LPC Link 2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugging problem with LPC Link 2

1,562 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Patrick_W on Thu Apr 09 08:32:46 MST 2015
Hi Community,

i'm starting to work with NXP. I developed a board which uses the LPC1763 as MCU. I use the LPCXpresso v7.6.2 to develop.
The Supply Voltage on the board is about 3V and if switched on, the LPC takes a current of 1.6mA.

As Debugger i use the LPC Link 2 which is as followed connected to the board:

Jumper 7           Pin on LPC
2 (TMS)             3 (TMS)
4 (TCK)             5 (TCK)
6 (TDO)             1 (TDO)
8 (TDI)               2 (TDI)
10 (Reset)          17 (Reset)

All Pins are connected to 10k Pull ups.

So my problem is if i try to debug (first time) i always get the following error:
RedlinkAPI: Hardware interface transfer error

I suggest that the LPC Link can't find the device because the server also says:
redlink>CoreConfig 1
Number of CORES/TAPs = 0, Fully recognized: True


So i tried different USB cabels and ports, Jumper 2 set (LPC Link 2 powers the device) and also a new MCU.
Because i never flashed the device i cannot imagine that i got any problems with CPR Modes or some system configs (PLL and so on).

Is it a problem that i don't have connected a main oscillator to the MCU?

Every kind of advice would be great.

Thanks



0 Kudos
Reply
9 Replies

1,204 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Patrick_W on Mon Apr 13 00:44:02 MST 2015
Hey Guys,

i found the error on my board. So everything works pretty well now.
Thank you very much for your advices.

Regards
0 Kudos
Reply

1,204 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Patrick_W on Fri Apr 10 07:56:28 MST 2015
Hey R2D2

1) Sorry, my fault i switched the SWDIO and SWO
2) I just wanna give it a chance  ;-)

I wish a nice weekend
Regards
0 Kudos
Reply

1,204 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Apr 10 07:16:26 MST 2015
#1: Why do you think my pinning isn't correct  :quest:  :quest:

#2: Why do you use DAP?

As mentioned already 1.5mA is by far too low, so your hardware isn't working  :exmark:

So neither SWD nor UART will work...
0 Kudos
Reply

1,204 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Patrick_W on Fri Apr 10 07:00:21 MST 2015
Hey,

If i try to debug via LPCxpresso IDE (Jumper 1 disconnected)  the full Error message is seen in the
attached picture. May it helps you.

Regards

0 Kudos
Reply

1,203 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Patrick_W on Fri Apr 10 06:50:09 MST 2015
Hey,

so to clarify the Problem: i just want to debug my controller on the external board.

So i tried different ways: debuging via the Redlink and the CMSIS DAP. Nothing worked.
After the advice of R2D2 i just tried to flash the external MCU with Flash Magic. Doesn't worked.

Regards 
0 Kudos
Reply

1,203 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Apr 10 06:06:38 MST 2015
Please can you clarify exactly what you are trying to do..

Are you trying to build and debug your code using LPCXpresso IDE? In which case, remove the jumper from JP1 and let LPCXpresso boot the appropriate firmware for you when you start a debug session. There is information on how to do this in the LPCXpresso User Guide, and you might want to watch the "Rapid Embedded Development with LPCXpresso" video too : http://www.lpcware.com/lpcxpresso. i.e. this should not involve flash magic at all!

Or are you trying the download your code to your target using Flash Magic? In which case, you should not be trying to do this from LPCXpresso IDE.

Regards,
LPCXpresso Support
0 Kudos
Reply

1,204 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Patrick_W on Fri Apr 10 05:57:11 MST 2015
Hey guys,

Thanks for the answers.
First of all i am using the LPC1763 so i think the pinning of R2D2 isn't correct.  0:)
I am working on Windows 7 (x64) without VM.

I build an other board without any other Hardware. Just the MCU, Pull up resistors, buffer capacities for the MCU Supply and the connector for the LPC Link 2.
If i try to flash this board with flash magic i get two different errors depending on Jumper 1 on the LPC Link 2:

Jumper 1 is connected: Operation Failed. USB DFU failed with exit code 74. (COM Port is connected)
Jumper 1 is not connected: Operation Failed. Failed to autobaud - step 1. (There is also no COM Port connected -> Windows Device Manager)

I configured the Flash Magic Software as followed:

LPC1763
SWD over Link2
Oscillator: 4

The internal oscillator is given with 4MHz in the Manual.

I programmed the LPC Link2 with the CMSIS-DAP. Could this be the reason for this behaviour?
Another question because of the SWD:

In the Manual is written that by default the JTAG is configured and once in JTAG Debug mode the debug tool can
switch to SWD mode. So what is now the default protocol?

Thanks




0 Kudos
Reply

1,204 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Apr 09 11:58:00 MST 2015

Quote: Patrick_W
Every kind of advice would be great.



Since Link2 is using SWD a correct SWD connection is:

J7-2 SWDIO - LPC1769-3
J7-4 SWCLK - LPC1769-5
J7-10 Reset - LPC1769-17
J7-9 GND - LPC1769-GND

Close J2 (if your Link2 powers the target or not)...


Quote: Patrick_W
The Supply Voltage on the board is about 3V and if switched on, the LPC takes a current of 1.6mA.



From your description I would guess your board isn't working  :(( 

An empty LPC17xx should consume about 15mA  :O

An empty MCU is booting into UART ISP, so I would suggest to use FlashMagic first  :) 
0 Kudos
Reply

1,204 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Apr 09 09:21:10 MST 2015
In addition to R2D2's notes on hardware connections, you might also want to read...

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

But that aside, if you continue to see the same issue after checking your hardware, then very occasionally we have seen hardware interface transfer errors being triggered by USB bandwidth issues. So try removing any non-essential USB devices from your computer before the LPC-Link2 boots. You might also want to check out the troubleshooting information at:

http://www.lpcware.com/content/faq/lpcxpresso/booting-lpc-link2

If you continue to have problems, please can you also confirm what OS you are using (and whether you are running natively or using a virtual machine)?

Regards,
LPCXpresso Support
0 Kudos
Reply