LPCExpresso for LPC1114 lost connection too often

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPCExpresso for LPC1114 lost connection too often

3,740件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Sun Nov 06 21:27:01 MST 2011
Hi

I've been playing with such a board using FreeRTOS, but recently the IDE too often has lost connection with the board.

Seeing other posts and workarounds, they say it could be a problem with the debug ports. However, if I debug step by step, the IDE seems to work with no problems, but as soon as I click "Resume" button in the IDE, the board lost its connection (but still working). Let's see the two common message errors that shows up:

[FONT=Courier New]--------
Error reported by target
  Target reporte errors

  Reason:
  16: Target error from status-poll

--------
Error reported by target
  Target reporte errors
 
  Reason:
  15: Target error from Register access
[/FONT]

If I try to debug again into the same session, then this message shows up:

--------
Connect to emulator or board: NXP LPC1100
  No emulator or board available.
  This could be because it is unpowered, unconnected or already in use


Of course, the board is already connected and powered, indeed. Hope you understand that it's annoying to restart the LPCExpresso IDE every time I need to debug, just for realized that the same problem appears again and again.

Is there a workaround for these troubles? Thank you in advanced.


LPCExpresso v4.1.0 Build 190
0 件の賞賛
返信
19 返答(返信)

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Tue Nov 15 13:15:33 MST 2011

Quote: fjrg76

In order to add my own 3.3V power supply I would need to cut some traces, and by now I wouldn't like to mutilate my LPCXpresso :D.

Now I got a doubt. What if the application needs to update its firmware in field, or it's using FLASH as EEPROM, but its power supply is a single 3.3 coin battery?


that should of course have been a 5V power supply. A regulated 5V supply to the Vin pin of the LPCXpresso module (J6-2) will do just fine as long as you have not cut away your LPC-Link module (the 5V is converted to 3v3 by the internal regulator of the LPC3154 on the LPC-Link section of the board.

It is perfectly possible to supply a 3v3 voltage to the LPCXpresso (at Vout, pin J6-28). The LPCXpresso's schematics state for this pin "VOUT (+3.3V out) if self powered, else +3.3V input".
There is a diode on the LPC-link to prevent the power feed-back to the LPC-Link section of the board. It makes sense to add an extra (schottky) diode in the 3.3V line towards this pin to prevent high currents if the external 3.3V is too low.
I have a number of systems that are self-powered but also allow the LPCXpresso module to be powered via the LPC-Link for debugging.

For battery operated applications it makes sense to provide a way to power the board using an external supply during a firmware update.

Regards,
[INDENT]Rob
[/INDENT]
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Tue Nov 15 12:57:09 MST 2011

Quote: CodeRedSupport
Almost certainly because your 'front' USB Panel ports do not meet the USB power requirements. Very many laptops and some desktops save power by providing less power to some (or even ALL!) USB ports. The LPCXpresso boards all require near-to the maximum power supplied by USB of 500mA. If the board is not properly powered, there can be all sort of strange issues.



Hello

That would be a good reason for most PC's. But now that you've mentioned that I remember (although I have not my PC's mother board manual at hand) that the manufacturer claims that their USB ports give more current than the standard, and that can be used for charging phones even faster. However, the important thing here is that now I can work without interruptions (of that kind).


Quote: Rob65
This is especially true during flash programming.
With power requirements going to the limit of what USB allows during programming or debugging you might see intermittent errors. In that case it is best to provide an external 3.3V power source to power your board.

Rob



Hi Rob

In order to add my own 3.3V power supply I would need to cut some traces, and by now I wouldn't like to mutilate my LPCXpresso :D.

Now I got a doubt. What if the application needs to update its firmware in field, or it's using FLASH as EEPROM, but its power supply is a single 3.3 coin battery? According to your comment those both scenarios won't work, or at least will drain the battery too quickly.


Thank you both !!
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Tue Nov 15 03:52:11 MST 2011

Quote: CodeRedSupport
The LPCXpresso boards all require near-to the maximum power supplied by USB of 500mA. If the board is not properly powered, there can be all sort of strange issues.


This is especially true during flash programming.
With power requirements going to the limit of what USB allows during programming or debugging you might see intermittent errors. In that case it is best to provide an external 3.3V power source to power your board.

Rob
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Nov 15 01:09:57 MST 2011

Quote:

I'll always have the doubt about why your IDE don't work with my PC's  USB front panel. Nevertheless, thank you for your time and support, and  you can be shure that I'll still asking you a bunch of things.



Almost certainly because your 'front' USB Panel ports do not meet the USB power requirements. Very many laptops and some desktops save power by providing less power to some (or even ALL!) USB ports. The LPCXpresso boards all require near-to the maximum power supplied by USB of 500mA. If the board is not properly powered, there can be all sort of strange issues.
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Mon Nov 14 17:50:54 MST 2011

Quote: CodeRedSupport
Thank you for the information. I'd like you to successively experiment with different software probes. I'm not sure which probe you're currently using, but it appears to be the WinUSB. There are three to choose from. Your choices are WinUSB, HID (high speed), and HID (full speed). You can use the <install>\lpcxpresso\bin\Scripts\bootLPCXpresso.cmd script to install the different probes. Each time you change software probes, you'll first need to power cycle your LPC-Link.

1. Navigate to the LPCXpresso installation directory:
cd <install>\lpcxpresso\bin\Scripts

2. Power cycle your LPC-Link (USB end of the standard LPCXpresso board).

3. At the command prompt, enter:
bootLPCXpresso.cmd help

You'll see a usage display like the following:

C:\nxp\LPCXpresso_4.1.3_206\lpcxpresso\bin\Scripts>bootLPCXpresso.cmd help
Usage: bootLPCXpresso.cmd [hid/hidfs/winusb]
where
- hid    = use HID HighSpeed driver
- hidfs  = use HID FullSpeed driver
- winusb = use WinUSB HighSpeed driver
Press any key to continue . . .

Successively experiment with the hid, hidfs, and winusb probes to see which offers the best results. Let us know your results.

Regards,

CodeRedSupport



Hello

I think the problem was solved, however I'm not happy at all. In my last post, when I wrote "USB ... front panel ..." I thought I should try the USB ports in the PC's back panel. So I did it and the board haven't lost its connection since then, and it means I have debbuged almost without problems. There are still problems like "... IDE cannot write to flash ...", or Eclipse exceptions, but I've been working smoothly.

I'll always have the doubt about why your IDE don't work with my PC's USB front panel. Nevertheless, thank you for your time and support, and you can be shure that I'll still asking you a bunch of things.

Kind regards :)
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Nov 11 14:42:33 MST 2011
Thank you for the information. I'd like you to successively experiment with different software probes. I'm not sure which probe you're currently using, but it appears to be the WinUSB. There are three to choose from. Your choices are WinUSB, HID (high speed), and HID (full speed). You can use the <install>\lpcxpresso\bin\Scripts\bootLPCXpresso.cmd script to install the different probes. Each time you change software probes, you'll first need to power cycle your LPC-Link.

1. Navigate to the LPCXpresso installation directory:
cd <install>\lpcxpresso\bin\Scripts

2. Power cycle your LPC-Link (USB end of the standard LPCXpresso board).

3. At the command prompt, enter:
bootLPCXpresso.cmd help

You'll see a usage display like the following:

C:\nxp\LPCXpresso_4.1.3_206\lpcxpresso\bin\Scripts>bootLPCXpresso.cmd help
Usage: bootLPCXpresso.cmd [hid/hidfs/winusb]
where
- hid    = use HID HighSpeed driver
- hidfs  = use HID FullSpeed driver
- winusb = use WinUSB HighSpeed driver
Press any key to continue . . .

Successively experiment with the hid, hidfs, and winusb probes to see which offers the best results. Let us know your results.

Regards,

CodeRedSupport
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Fri Nov 11 14:16:02 MST 2011

Quote:
1. What specific OS version are you using? Based only on what can be seen of your desktop, it appears it could be Windows XP. If so, which service pack?



Hello

This is the information you ask for. Hope it's complete.


Microsoft Windows XP Professional
5.1.2600 (WinXP RTM)
Service Pack 3


Quote:
Perhaps you can also answer the following.

2. It doesn't seem to be the case, but it's worth asking if the OS is running as a virtual machine?



No, it's running in real mode (no virtualization).


Quote:
3. Please provide details on your host system. That is, available RAM, processor speed, USB controller details (full/high speed capable), etc. Have you connected the LPC-Link to your host system through an external hub?



Total RAM=3GB
Available RAM=2GB

No hub, directly from the computer-case front panel, which in turns goes directly to the motherboard.

CPU specs
      Tipo de CPU                                       DualCore AMD Athlon II X2 245, 2900 MHz (14.5 x 200)
      Alias de la CPU                                   Regor
      Escalonamiento de la CPU                          DA-C2
      Juego de instrucciones                            x86, x86-64, MMX, 3DNow!, SSE, SSE2, SSE3, SSE4A
      Velocidad de reloj original                       2900 MHz
      Multiplicador de la CPU Min / Máx                 5.0x / 14.5x
      Engineering Sample                                No
      Caché de código L1                                64 KB per core
      Caché de datos L1                                 64 KB per core
      Caché L2                                          1 MB per core  (On-Die, ECC, Full-Speed)

    Multi CPU:
      Identificación del motherboard                    OEM00000 PROD00000000
      CPU #1                                            AMD Athlon(tm) II X2 245 Processor, 2913 MHz
      CPU #2                                            AMD Athlon(tm) II X2 245 Processor, 2913 MHz

    Información física de la CPU:
      Forma del componente                              938 Pin uOPGA
      Tamaño del componente                             4.00 cm x 4.00 cm
      Transistores                                      234 millón/es
      Tecnología utilizada                              45 nm, CMOS, Cu, Low-K, DSL SOI, Immersion Lithography
      Tamaño interno                                    118 mm2
      Voltaje de E/S                                    1.2 V + 2.5 V

    Fabricante de la CPU:
      Nombre de la empresa                              Advanced Micro Devices, Inc.
      Información del producto                          http://www.amd.com/us-en/Processors/ProductInformation/0,,30_118,00.html


USB specs

Descripción del dispositivoLPC-Link Debug Probe v1.1
Identificador del dispositivo1FC9-0009
Clase de dispositivo        FF / 00
Protocolo de dispositivo00
Fabricante                Code Red Technologies
Producto                LPC-Link Probe v1.1
Número de serie                T1S6RGRIA
Versión USB soportada        2.00
Velocidad actual        High  (USB 2.0)


If you need more information, please let me know it
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Nov 11 12:10:38 MST 2011
One question you haven't answered was posed earlier.

1. What specific OS version are you using? Based only on what can be seen of your desktop, it appears it could be Windows XP. If so, which service pack?

Perhaps you can also answer the following.

2. It doesn't seem to be the case, but it's worth asking if the OS is running as a virtual machine?

3. Please provide details on your host system. That is, available RAM, processor speed, USB controller details (full/high speed capable), etc. Have you connected the LPC-Link to your host system through an external hub?

Regards,

CodeRedSupport
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Fri Nov 11 09:36:19 MST 2011

Quote: CodeRedSupport
Please also check power. This is a very common cause of connection problems. For example, try the board completely standalone (without your baseboard attached) and see what happens.



Hello

Thank you for the advice, I did it, but guess what? The board still loses the connection

I took the LPCXpresso board apart from my base-board, just as you said, and then I commented
__WFI()
instrucion out. I've attached a shot from the IDE so you can see it by yourself. I think it's worth to mention that the LPCXpresso board is still working after loosing its connection, and maybe that's means something.

We need to add those two items to my list of things that aren't causing troubles:

- base-board of my own
- power-supply (or ground) issues

Thank you again
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Nov 11 00:39:53 MST 2011
Please also check power. This is a very common cause of connection problems. For example, try the board completely standalone (without your baseboard attached) and see what happens.
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Thu Nov 10 17:39:38 MST 2011

Quote: CodeRedSupport
Is this a custom board, or one of the standard LPCXpresso boards?



Hi

It's a standard LPCXpresso board:

LPC1114 REV A

I bought it in mouser.com a month ago or so. It's also complete (I haven't cut it yet). The LPCXpresso board is over a base-board of my own (by this time only includes a MAX232 from TI, please look at the pic I attached). According to my experience these last few days, this is a short list of what is not causing troubles:

1. USB extension cable.
2. My base-board.
3. My code
4. Sleep modes

I've been playing around all of them in order to isolate the root of the problems.

BTW, while uploading the binary yesterday, java throw an exception. That made me think whether LPCXpresso includes a kind of log system, so I can send those logs to you (not about eclipse, but the platform).

If you need more info please let me know it. Thank you for your support :)
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Nov 10 01:27:53 MST 2011
Is this a custom board, or one of the standard LPCXpresso boards?
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Wed Nov 09 23:14:09 MST 2011
Hello again

Well ... I started from scratch so I can isolate the troubles I'm experiencing inside the LPCXpresso platform.

Sadly the board is still loosing its connection. This time, no external interrupts, nothing fancy or weirdo, not memory leaks, just two tasks that hooks each one from the freeRTOS function vApplicationTickHook().

I was debugging step by step, and suddenly this error showed up and everything stopped working:

[B][SIZE=3]15: Target error from Read Memory: Ee(02). Not connected to emulator[/SIZE][/B]

Is there something I can do in order to code and debug without being reseting the IDE every now and then?

Thank you in advanced.
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Tue Nov 08 12:58:03 MST 2011

Quote: CodeRedSupport
The WFI() is putting the chip to sleep. You need to look at the SLEEPMODES in the System Control Register to see which mode you are using.



Hello

I commented the WFI() instruction out but the problems are still there.



Quote:
Hard fault is most likely caused by you overwriting memory - most probably your task stack(s).



I also thought it could be stack memory issue, so I changed the default parameters for these ones:

#define configMINIMAL_STACK_SIZE      256 (64 original)
#define configTOTAL_HEAP_SIZE         7000 (2000 original)


and guess what? Problems are still there too.



Quote:
My guess is that you are putting your data into a queue faster than it is able to take the data off and it is overflowing somewhere.



I realized that it doesn't matter the external pulses frecuency, because at 10Hz (ten hertz) the application gets a hard fault issue after few minutes.

When I started to play with the board I was using a 80cm USB cable, too short for my bench-table, so I bought a 1.5m USB extension cable. Now I return to the original 80cm cable, but that is not the root of my problems. All I've talked about in this particular post was using the 80cm USB cable.


At this point I think I should spend my time starting from scratch instead of still looking for two ghosts: IDE issues and FreeRTOS issues. May be at the end I find what is causing all this misbehaviors and then share my answers with you all guys, what do you think?


What I still don't understand is why the board lose its connection. The SWD module is vendor independent, but a problem in a peripheral module is affecting the core (of course, without touching shared pines, or strange memory configurarions).



Any more ideas are welcomed. Thank you
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Nov 08 02:42:27 MST 2011
The WFI() is putting the chip to sleep. You need to look at the SLEEPMODES in the System Control Register to see which mode you are using.

Hard fault is most likely caused by you overwriting memory - most probably your task stack(s). My guess is that you are putting your data into a queue faster than it is able to take the data off and it is overflowing somewhere.
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Nov 08 02:23:19 MST 2011

Quote: fjrg76
I'm not shure about the vectors, 'cause I haven't touched them.



'Vector catch' is an IDE option :)

See: http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip?highlight=%28vector%29%7C%28catch%29
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Mon Nov 07 19:20:49 MST 2011

Quote: CodeRedSupport
What is your code doing? Examples of things that can affect your debug

connection, include:
- you have a watchdog running that is resetting the core
- you are changing clock speeds
- you are putting the core to sleep

EDIT: Please also provide your OS version. And, does your OS run as a virtual machine?



Hello Support and Zero

Let me start with a brief explanation of my code:

1. It's based in the freertos_lpc11xx example that I downloaded from your website.

2. This is the idle task, as shipped:

[FONT=Courier New]
void vApplicationIdleHook( void )
{
__WFI();
}
[/FONT]

3. It's running five simple tasks:

a) real time clock emulator,
b) toggle_led task, internally using vTaskDelay(),
c) external event counter task using P0.6 (EXTI). The character 'Z' is sent-out every 100 events
d) vApplicationTickHook(), which is running at 10ms
e) gpio_task() that toggles P0.1 every two seconds
f) echo_task(), which echoes a character received by the UART


I have not watchdog running.
I do not change clock speeds.
The only sleep mode the code uses is the same as the example includes.
OS version: WinXP 3SP, running in real mode (no virtual machine).

This little application uses printf() and RedLib none library, and one FreeRTOS' semaphore.



A thing that I forgot to mention is that when the frecuency of external pulses in P0.6 (see point 3-c

above) is bigger than 1Khz the whole system crashes, IDE included. Well, it doesn't crash at all, but let

see these:

IDE

-- Error Reported by target
-- Target reported errors
--- Reason:
--- 15: Target error from Read Memory

Processor
-- It goes to HardFault_Handler()

This is the stack:

[B]************************************************
freertos_lpc11xx (Debug) [C/C++ MCU Application]
MCU GDB Debugger (07/11/11 18:51) (Suspended)
Thread [1] (Suspended: Signal 'SIGSTOP' received. Description: Stopped (signal).)
5 HardFault_Handler() cr_startup_lpc11.c:284 0x000000d8
4 <signal handler called>()  0xfffffff9
3 xQueueGenericReceive() queue.c:819 0x00000cca
2 rtc_task() main.c:733 0x000005a6
1 <symbol is not available> 0x00000000
arm-none-eabi-gdb (07/11/11 18:51)
C:\example_lpc1114_ws\freertos_lpc11xx\Debug\freertos_111x.axf (07/11/11 18:51)
************************************************[/B]

Although it seems to be a FreeRTOS issue I still don't understand why the tool lost the connection. Right now I'm not very confident because I need to count external pulses with higher frecuencies (100KHz), and this behaviour freaks me out.


Zero: I'm not shure about the vectors, 'cause I haven't touched them. Do I need to relocate them?



I hope all this information is helpful. If not, please let me know it.


Thank you in advance for your kind support.
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Nov 07 01:30:15 MST 2011
What is your code doing? Examples of things that can affect your debug connection, include:
- you have a watchdog running that is resetting the core
- you are changing clock speeds
- you are putting the core to sleep

EDIT: Please also provide your OS version. And, does your OS run as a virtual machine?
0 件の賞賛
返信

3,642件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Nov 07 00:57:12 MST 2011
Did you switch on Vector catch already ?
0 件の賞賛
返信