Help needed for debugging LPC2388 chip with Red probe+

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

Help needed for debugging LPC2388 chip with Red probe+

Jump to solution
1,697 Views
michelesponchia
Contributor II

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. :smileysad:

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.

reset_250ms.png

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

The emulator signals connected are in the following figure:LPC2388_JTAG.png

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

0 Kudos
Reply
1 Solution
1,236 Views
michelesponchia
Contributor II

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)
  • BTW I was actually using LPCXpresso 7.8, the one with the not working driver!:smileyangry:

So ATM I managed to use a previous version of the driver

  • can you please confirm this is an issue of the driver?
  • is there any other workaround I can use?

Best regards

View solution in original post

0 Kudos
Reply
6 Replies
1,236 Views
lpcxpresso_supp
NXP Employee
NXP Employee

We aren't aware of any specific issues with any of those versions - though they are all fairly old now. The current LPCXpresso IDE v8.2.2 certainly seemed to work OK when I was using another LPC23xx part with a Red Probe+ last week.

Note that if you do try using a more recent version, you may encounter the message similar to the following when you try to start a debug session :

Debug probe not supported with this target
Reason:
LinkServer does not support NXP LPC2368 (arm7tdmi)

This is because the latest LPCXpresso IDE defaults to using a debug connection mechanism that will not work with ARM7 based parts. To resolve this simply go to the workspace preferences ...


Window - Preferences - LPCXpresso - Debug Emulator Selection

and untick "LinkServer".

Note that this means that if you want to debug Cortex-M based parts rather than ARM7 based ones, you should use a different workspace where you have not made the above preference change.

Alternatively if you want to use LPCXpresso IDE v7.8 to build, you ought to be OK to just copy the crt_emu_a7_nxp exe file that works for you across from your older installer and into the \bin directory of v7.8.

Regards,

LPCXpresso Support 

0 Kudos
Reply
1,236 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Michele,

You could also take a look at the following link for additional information:

https://www.lpcware.com/content/faq/lpcxpresso/red-probe-support


Hope this will be useful for you.
Best regards!
/Carlos

0 Kudos
Reply
1,236 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Generally we would recommend that you have a 10K to 100K Ohm pull up resistor on the ISP pin, otherwise you are unlikely to be able to make a successful debug connection. When you try using ISP, you are releasing it again after booting the board / resetting with it pulled low - before you try to make a debug connection? 

I would suggest that you delete your current launch configurations from the project, and also the .jtag file from the Debug/Release directory. Then boot the board into ISP mode. Then try starting a debug session again from scratch.

Although it is mainly focussed at Cortex-M based parts, rather than old ARM7 based parts, it might be worth skimming - Design Considerations for Debug 

Regards,

LPCXpresso Support

0 Kudos
Reply
1,237 Views
michelesponchia
Contributor II

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)
  • BTW I was actually using LPCXpresso 7.8, the one with the not working driver!:smileyangry:

So ATM I managed to use a previous version of the driver

  • can you please confirm this is an issue of the driver?
  • is there any other workaround I can use?

Best regards

0 Kudos
Reply
1,236 Views
michelesponchia
Contributor II

Hi LPCXpresso Support,

many thanks for your help!

Your question:

  • When you try using ISP, you are releasing it again after booting the board / resetting with it pulled low - before you try to make a debug connection?

My reply;

  • Yes, I tried pulling down the ISP pin, then applying the reset, then releasing the ISP pin and at this moment I start the debug connection.
  • I'll give a try tying  the ISP pin high through a 10K resistor, after the reset has been applied, but I am a little suspicious this will solve because the R-Link connects OK on the same board with the same settings using under RIDE.

A question about the nSRST signal:

  • while using the R-Link debugger the nSRST signal is applied low for some milliseconds while starting the debug connection
  • while using the LPCXPresso debugger, the  nSRST is not pulsed low, evenif I set the vector catch option;
    • the nSRST is forced low only if I set the --reset hard option on the command line, but in this case the whole procedure seems to complete after the nSRST has been applied
  • Q: do you know if the debug connection is expected to activate the nSRST signal?

Two questions about the JTAG signals:

  • Q: Would it be useful to check with an oscilloscope the various JTAG signals, or are they too much a mess to check?
    • Q: If yes, have you any reference for the expected patterns?

Many thanks again!

Michele

0 Kudos
Reply
1,236 Views
michelesponchia
Contributor II

Hi guys, thanks for your patience:

  • can you please confirm this is the correct forum or would it be better to move the topic elsewhere?

Many thanks again!

0 Kudos
Reply