AnsweredAssumed Answered

Help needed for debugging LPC2388 chip with Red probe+

Question asked by michele sponchiado on Jan 22, 2017
Latest reply on Feb 2, 2017 by LPCX presso support

Update of feb 2 2017,

Hi,

after a lot of checking, I found out that:

  • this driver works OK--> LPCXpresso Debug Driver v7.7 (Mar 31 2015 19:11:33 - crt_emu_a7_nxp build 59)
  • this driver works OK too --> LPCXpresso Debug Driver v7.6 (Jan 16 2015 10:09:45 - crt_emu_a7_nxp build 45)
  • this driver won't work, always gives me the error described in the original post -->LPCXpresso Debug Driver v7.8 (May 28 2015 03:16:00 - crt_emu_a7_nxp build 181)

Hi tech gurus, many thanks for your help: sorry for the following wall of text, I hope to give you some useful information about a problem I am stuck in in the last few days...

 

I work under Ubuntu 14.04 and I use LPC4357 for another project and it works really well.

Some weeks ago I was asked about the possibility to implement some major changes in an old LPC2388 project currently implemented with Raisonance IDE, so I decided to use instead LPCXpresso because it seemed a good improvement.

 

The code now compiles OK under my LPCXpresso 7.8.0 [Build 426] [2015-05-28], and I am very happy with it because t discovered a lot of warnings and the resulting code is smaller so I was very excited to start debugging the new code...

 

I purchased a Red Probe + emulator to debug my LPC2388 and so far I am stuck because I can't connect with the LC2388 chip.

The platform comes already programmed under Raisonance, and it boots OK and runs the existing code fine, so I am pretty sure the processor and the overall board is OK, but I just can't simply connect with the LPCXpresso debugger.

 

Typically the error code I get from the emulator driver is Ed:02: Failed on connect: Ep(04). Cannot halt processor.

In the following, some examples of the command line driver call output

./crt_emu_a7_nxp --vc -g -mi -2 -pLPC2388 -vendor=NXP --reset system -rh 250 -rd 10 -e0 -wire=jtag -scan ./test_lpc23xx_Debug.jtag
Ni: LPCXpresso Debug Driver v7.8 (May 28 2015 03:16:00 - crt_emu_a7_nxp build 181)

 

Pc: (  0) Reading remote configuration
Pc: (  5) Remote configuration complete
Pc: ( 15) VECTRESET assert (if available)
Pc: ( 30) Emulator Connected
Xw:
Wc: Cannot halt processor
Ed:02: Failed on connect: Ep(04). Cannot halt processor.
Et: Emu(0): Conn&Reset. Was: None. CpuID: 00000000. Info: FTXDQRDSA
Nc: Error 0: (null)
Nc: Last sticky: 16. AIndex: 0
Nc: MemAp selected: 0
Nc: Speed test resends: 0
Nc: Debug protocol: JTAG Frequency 250 KHz. RTCK: Disabled. Vector catch: Enabled.
Pc: (100) Target Connection Failed

 

I power off then on again the board, detach and attach the red probe and I try again with a different command line, but with the same result:

./crt_emu_a7_nxp --vc -g -mi -2 -pLPC2388 -vendor=NXP -e0 -wire=jtag -scan ./test_lpc23xx_Debug.jtag
Ni: LPCXpresso Debug Driver v7.8 (May 28 2015 03:16:00 - crt_emu_a7_nxp build 181)

Pc: (  0) Reading remote configuration
Pc: (  5) Remote configuration complete
Pc: ( 15) VECTRESET assert (if available)
Pc: ( 30) Emulator Connected
Xw:
Wc: Cannot halt processor
Ed:02: Failed on connect: Ep(04). Cannot halt processor.
Et: Emu(0): Conn&Reset. Was: None. CpuID: 00000000. Info: FTXDQRDSA
Nc: Error 0: (null)
Nc: Last sticky: 16. AIndex: 0
Nc: MemAp selected: 0
Nc: Speed test resends: 0
Nc: Debug protocol: JTAG Frequency 250 KHz. RTCK: Disabled. Vector catch: Enabled.
Pc: (100) Target Connection Failed

 

Here I tried enabling RTCK, that seems t work fine because the speed switches to 250kHz, and enabling the vector catch and setting the correct clock frequencies, but no luck:

 ./crt_emu_a7_nxp --rtck --debug 4 -vc -g -mi -2 -pLPC2388 -vendor=NXP -e0 -c12000,60000 -s50 -wire=jtag -scan ./test_lpc23xx/Debug/test_lpc23xx_Debug.jtag
Ni: LPCXpresso Debug Driver v7.8 (May 28 2015 03:16:00 - crt_emu_a7_nxp build 181)

 

Pc: (  0) Reading remote configuration
Pc: (  5) Remote configuration complete
Pc: ( 15) VECTRESET assert (if available)
Pc: ( 30) Emulator Connected
Xw:

 

Wc: Cannot halt processor
Ed:02: Failed on connect: Ep(04). Cannot halt processor.
Et: Emu(0): Conn&Reset. Was: None. CpuID: 00000000. Info: FTXDQRDSA
Nc: Error 0: (null)
Nc: Last sticky: 16. AIndex: 0
Nc: MemAp selected: 0
Nc: Speed test resends: 0
Nc: Debug protocol: JTAG Frequency 250 KHz. RTCK: Enabled. Vector catch: Enabled.
Pc: (100) Target Connection Failed

 

I have tried the same tests even setting the ISP pin P2.10 low on reset; I am pretty sure the ISP pin works because when I force the pin low, the software on the platform won't boot, and when the ISP pin is high at boot, the platform boots OK instead; but anyway the emulator wont connect and shows the same behaviour as if the ISP is not set low.

 

If I try to use the hard reset signal, it works fine (I checked with a SmartScope, the active low reset timing set with rh is OK and the reset level is pretty close to 0V, see the next figure), but when I use it in the command line, it just resets the platform and it won't proceed with the debug:

./crt_emu_a7_nxp --info-target -pLPC2388 -vc -s250 -rh 2500 -rd 1500 --vtreftrack --reset hard
Ni: LPCXpresso Debug Driver v7.8 (May 28 2015 03:16:00 - crt_emu_a7_nxp build 181)

 

Nc: Hard wire reset complete.

 

the reset timing as it appears from the RESET# pin, 250ms are set from the command line

 

I am using the same hardware platform where the R-Link Raisonance debugger works OK.

The emulator signals connected are in the following figure:The JTAG connections on my hardware platform

The RESET# signal line in the left corner then goes to a jumper, not inserted to avoid conflict with the RST* output of a DS3231.

 

Any hints would be very welcome!

BR

Michele

Outcomes