blinky: failed on connect

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

blinky: failed on connect

2,095 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by skeeve on Wed Jun 19 15:08:41 MST 2013
I'm using a LPC1347 plugged into a XPR-021 base board.
So far I haven't been able to even make blinky work.
Following directions in the getting started guide,
I clicked on Debug 'Blinky' [Debug].
It did some stuff, compiling and linking I expect,
and then gave me the failed on connect message.
The google listing from the help with error button did not seem helpful.

I'm running CentOS 6.2 (yes, I know).
The 1347 is connected to the PC by a USB cable.
Three segments of the 7-segment display are lit.
One green LED from a bank of 8 is lit.
One green LED and an adjacent red LED are lit.
CentOS recognizes the board:
[hennebry@96-18-56-186 local]$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 03f0:5611 Hewlett-Packard PhotoSmart C3180
Bus 001 Device 006: ID 1fc9:0009 NXP Semiconductors
Bus 003 Device 002: ID 046d:c318 Logitech, Inc. Illuminated Keyboard
[hennebry@96-18-56-186 local]$

The second time I tried blinky, I had a console I could find:
LPCXpresso Debug Driver v5.2 (Apr 26 2013 19:56:48 - crt_emu_lpc11_13_nxp build 1153)
Looked for chip XML file in /usr/local/lpcxpresso_5.2.4_2122/lpcxpresso/bin/LPC1343.xml
Looked for vendor directory XML file in /usr/local/lpcxpresso_5.2.4_2122/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in /usr/local/lpcxpresso_5.2.4_2122/lpcxpresso/bin/crt_directory.xml
02: Failed on connect: Ee(07). Bad ACK returned from status - wire error.
Emu(0): Connected. Was: None. DpID:     EDB6. Info: LPCLINK_1_1

Suggestions?
A pointer to the right spot in TFM?
0 Kudos
Reply
14 Replies

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by skeeve on Wed Jul 03 23:02:32 MST 2013
Thank you.
I just knew it was something stupid.
Twinkle twinkles.  Yessss.
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Jul 03 00:59:07 MST 2013
First of all, note that CentOS is not a supported platform, though I suspect that this has little bearing on your actual issue.

Reading through the information in the thread, it looks like you are trying to program an example for the LPC1343 down to an LPC1347 part?

Note that despite the similarities in the name, these two parts are actually quite different. Examples for the LPC1347 can be found within the following LPCXpresso installation subdirectory...

lpcxpresso_5.2.4_2122\lpcxpresso\Examples\NXP\LPC1000\LPC13xx_12bitADC


[ The "12bitADC" being how NXP wished us to distinguish the 'new' LPC13's from the originals. ]

You can find a useful comparison of the two at:

http://www.microbuilder.eu/Blog/12-03-28/LPC1347_to_LPC1343_Comparison.aspx

And for reference, there is information on the status-poll error at:

http://support.code-red-tech.com/CodeRedWiki/StatusPoll

Regards,
CodeRedSupport
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by skeeve on Tue Jul 02 19:07:08 MST 2013

Quote: TheFallGuy
The screenshot is too small to read.

Sorry about that, but I don't have any way to make it bigger: it is already pixel-for-pixel what I saw on the screen.
Are you sure your image viewer is not shrinking it to get it into a window?
Quote:

You might also want to post your complete debug log
http://support.code-red-tech.com/CodeRedWiki/DebugLog

Here 'tis:
LPCXpresso Debug Driver v5.2 (Apr 26 2013 19:56:48 - crt_emu_lpc11_13_nxp build 1153)
Looked for chip XML file in /usr/local/lpcxpresso_5.2.4_2122/lpcxpresso/bin/LPC1343.xml
Looked for vendor directory XML file in /usr/local/lpcxpresso_5.2.4_2122/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in /usr/local/lpcxpresso_5.2.4_2122/lpcxpresso/bin/crt_directory.xml
Emu(0): Conn&Reset. DpID: 2BA01477. Info: LPCLINK_1_1
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
Loaded LPC11_12_13_32K_8K.cfx: LPC11_12_13 (32K Flash, min 8K RAM) Apr 22 2013 12:14:02  On-chip Flash Memory
NXP: LPC1343  Part ID: 0x00000000
Connected: was_reset=false. was_stopped=false
v Registered license, download limit of 128K
Writing 2252 bytes to 0000 in Flash (assumed clock: 12.0MHz)
Erased/Wrote page  0-0 with 2252 bytes in 430msec
Flash write Done
nSRST assert (if available)
Executing in user flash.

16: Target error from status-poll: Ee(92). Unknown error
16: Target error from status-poll: Ee(02). Not connected to emulator.
Quote:

BTW: If it says "already running" that implies that the application has crashed before it hits main(). In which case, press the "Pause" button and see where it is.

system_LPC13xx.c
433   while (!(LPC_SYSCON->SYSPLLCLKUEN & 0x01));     /* Wait Until Updated */

Don't know what to do with it.
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Jul 02 11:18:53 MST 2013
The screenshot is too small to read.

You might also want to post your complete debug log
http://support.code-red-tech.com/CodeRedWiki/DebugLog

BTW: If it says "already running" that implies that the application has crashed before it hits main(). In which case, press the "Pause" button and see where it is.
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by skeeve on Tue Jul 02 10:46:14 MST 2013

Quote: TheFallGuy
What you have described sounds like it has downloaded the application and stopped at the first breakpoint in main(). Having got there, have you actually started you program (by pressing the green "play" (resume) button?

That is what it seems like to me too, but nothing seems to make it run.
When I hover over the green button (second row, between Search and Project), it tells me "Run blinky Debug (already running)", but I clicked it anyway.
Quote:
Have you read Chapter 5 in the LPCXpresso getting started guide, which describes how to start a simple debug session? I think you should...

That was my starting point.
It's how I got as far as I've gotten.
Not far enough.

In case it helps, I've attached a screenshot of Code Red.
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Jul 02 00:02:32 MST 2013
What you have described sounds like it has downloaded the application and stopped at the first breakpoint in main(). Having got there, have you actually started you program (by pressing the green "play" (resume) button?

Have you read Chapter 5 in the LPCXpresso getting started guide, which describes how to start a simple debug session? I think you should...
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by skeeve on Mon Jul 01 19:12:16 MST 2013
blinky still does not blink for me.
From source and schematic, I gather that LED2 is the one that is supposed to blink.
Is that correct?

I can avoid "failed on connect" if I reseat the LPCXpresso connector in the USB hub.
I get an error message after reseating.  I just click ok on the dialog.
At that point, LED2 is lit and LED1 is not.
After clicking on Debug 'blinky' [Debug]
it appears to compile and link and tell me nothing to be done for all.
It tells me something about user flash,
something about gdb and stopped=false.
Both LEDs are lit, but LED1 flickers a bit.
Changing LED_TOGGLE_TICKS in config.h does not affect this.

How do I make blinky blink?
I just know I'm doing something stupid.
I've not used Code Red or an ARM before and my previous attempt to use eclipse was a dismal failure.
The available (ungrayed) options under Run seem to suggest that Code Red thinks blinky is running.
Suggestions on how to find out for sure?
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by skeeve on Tue Jun 25 13:24:25 MST 2013

Quote: TheFallGuy
Are you connecting to the correct USB port on the LPC1347 LPCXpresso board? You need to be connecting to the one on LPC-Link (just above where the screen print says "NXP") - NOT the other one...

Yes.
Also, from lsusb:
Bus 001 Device 015: ID 0471:df55 Philips (or NXP) LPCXpresso LPC-Link
(no 016)
which later becomes
Bus 001 Device 016: ID 1fc9:0009 NXP Semiconductors
(no 015)
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Jun 25 09:25:43 MST 2013
Are you connecting to the correct USB port on the LPC1347 LPCXpresso board? You need to be connecting to the one on LPC-Link (just above where the screen print says "NXP") - NOT the other one...
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by skeeve on Tue Jun 25 08:35:01 MST 2013
I disconnected from the baseboard, but blinky still does not blink.
I can click on Debug 'blinky' [Debug] without an error message when lsusb gives me this:
[root@localhost dev]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 03f0:5611 Hewlett-Packard PhotoSmart C3180
Bus 003 Device 002: ID 046d:c318 Logitech, Inc. Illuminated Keyboard
Bus 001 Device 008: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 015: ID 0471:df55 Philips (or NXP) LPCXpresso LPC-Link
[root@localhost dev]#
blinky still does not blink.
I've tried clicking on things like resume, but to no avail.
Is there a glossary somewhere that will tell me what all those mysterious icons are supposed to do?
Hovering will give me words, but the words are not all that meaningful to me.
Do I need to do a separate search for every icon?
After  Debug 'blinky' [Debug] seems to finish, lsusb gives me this:
[root@localhost dev]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 03f0:5611 Hewlett-Packard PhotoSmart C3180
Bus 003 Device 002: ID 046d:c318 Logitech, Inc. Illuminated Keyboard
Bus 001 Device 008: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 016: ID 1fc9:0009 NXP Semiconductors
[root@localhost dev]#
Clicking on  Debug 'blinky' [Debug] again gives me error messages.

I infer from the schematic and config.h that LED2 is supposed to blink.
Is that correct?
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jun 25 01:18:41 MST 2013
Try connecting WITHOUT the baseboard. i.e. remove the LPCXpresso board completely, so it is standalone, and then connect to that.

If you connect successfully, you will know the problem is with the baseboard.
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by skeeve on Mon Jun 24 15:17:06 MST 2013
I bought a new powered hub.
Its documentation claims that it can do 500ma per port.
blinky still doesn't blink.
I've got both boards connected to  the hub,
but only one shows up:
[root@localhost gdm]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 03f0:5611 Hewlett-Packard PhotoSmart C3180
Bus 003 Device 002: ID 046d:c318 Logitech, Inc. Illuminated Keyboard
Bus 001 Device 004: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 006: ID 1fc9:0009 NXP Semiconductors

On the LPCX board, the connector is the one beyond the base board.
On the base board, the connector is the device connector next to the host connector.

From dmesg:
usb 1-1: new high speed USB device number 4 using ehci_hcd
usb 1-1: New USB device found, idVendor=1a40, idProduct=0201
usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
usb 1-1: Product: USB 2.0 Hub [MTT]
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 7 ports detected
usb 1-1.6: new high speed USB device number 5 using ehci_hcd
usb 1-1.6: New USB device found, idVendor=0471, idProduct=df55
usb 1-1.6: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 1-1.6: configuration #1 chosen from 1 choice
usb 1-1.6: USB disconnect, device number 5
usb 1-1.6: new high speed USB device number 6 using ehci_hcd
usb 1-1.6: New USB device found, idVendor=1fc9, idProduct=0009
usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.6: Product: LPC-Link Probe v1.3
usb 1-1.6: Manufacturer: Code Red Technologies
usb 1-1.6: SerialNumber: WIN64HS12
usb 1-1.6: configuration #1 chosen from 1 choice
usb 1-1.6: usbfs: process 18313 (crt_emu_lpc11_1) did not claim interface 0 before use
[root@localhost dev]#

Any more ideas?
0 Kudos
Reply

2,065 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by skeeve on Fri Jun 21 23:49:15 MST 2013

Quote: TheFallGuy
You did provide separate power to the baseboard, didn't you? As described in TFM...

Oops.
Thanks.
I finally found my other USB cable with a small connector.
I'm still having trouble, but not quire the same.
I'm going to try to find my USB hub.
Haven't used in in quite a while and my recolection is that it is small.
0 Kudos
Reply

2,063 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jun 19 23:16:37 MST 2013
You did provide separate power to the baseboard, didn't you? As described in TFM...
0 Kudos
Reply