LPC 1788 JTAG not detect after flashing a code

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

LPC 1788 JTAG not detect after flashing a code

3,135 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by soorajmannangal on Thu Nov 07 22:38:14 MST 2013
hi,

I just flash a code to my LPC 1788 controller, After that i cannot detect the JTAG port in the controller.

I am using HY-LPC1788-SDK Development Board, which contain NXP LPC1788. For flashing i use JTAG , and Keil v4

Following message come when i try to burn the code. Before burning this code it was working perfectly

HY-LPC1788-SDK Development Board

Keil Log during Compilation

####################--------------------------------------------------------------##########################
..Compiled

linking...
Program Size: Code=33020 RO-data=69132 RW-data=220 ZI-data=3180 
FromELF: creating hex file...
".\obj\TAI_3000RS.axf" - 0 Error(s), 2 Warning(s).
Load "D:\\Keil to IAR\\LPCBoardSoftware\\r0.1\\obj\\TAI_3000RS.AXF"
* JLink Info: Device "LPC1788" selected (512 KB flash, 64 KB RAM).
Set JLink Project File to "D:\Keil to IAR\LPCBoardSoftware\r0.1\JLinkSettings.ini"

JLink info:
------------
DLL: V4.50j, compiled Jun 26 2012 09:19:07
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull

* JLink Info: TotalIRLen = 4, IRPrint = 0x01
* JLink Info: Found Cortex-M3 r2p0, Little endian.
* JLink Info: TPIU fitted.
* JLink Info: ETM fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
ROMTableAddr = 0xE00FF003
* JLink Info: Found Cortex-M3 r2p0, Little endian.
* JLink Info: TPIU fitted.
* JLink Info: ETM fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots

Target info:
------------
Device: LPC1788
VTarget = 3.300V
State of Pins:
TCK: 1, TDI: 0, TDO: 1, TMS: 0, TRES: 1, TRST: 1
Hardware-Breakpoints: 6
Software-Breakpoints: 8192
Watchpoints:          4
JTAG speed: 50 kHz

**JLink Warning: CPU is running at low speed (9947 kHz).
* JLink Info: J-Link: Flash download: Flash programming performed for 1 range (4096 bytes)
* JLink Info: J-Link: Flash download: Total time needed: 6.436s (Prepare: 3.559s, Compare: 0.275s, Program: 1.216s, Verify: 0.274s, Restore: 1.109s)
***JLink Error: Bad JTAG communication: Write to IR: Expected 0x1, got 0x0 (TAP Command : 10) @ Off 0x15D.
* JLink Info: CPU did not halt, trying to disable WDT.
***JLink Error: Failed to halt CPU
***JLink Error: Can not read register 15 (R15) while CPU is running
Erase Failed!
Load "D:\\Keil to IAR\\LPCBoardSoftware\\r0.1\\obj\\TAI_3000RS.AXF"
* JLink Info: Device "LPC1788" selected (512 KB flash, 64 KB RAM).
Set JLink Project File to "D:\Keil to IAR\LPCBoardSoftware\r0.1\JLinkSettings.ini"

################--------------------------------------------------------------------------------------------------------##############


After above operation when i try to compile again this message comes

#####################--------------------------------------------------------------------########################
JLink info:
------------
DLL: V4.50j, compiled Jun 26 2012 09:19:07
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull

* JLink Info: Could not measure total IR len. TDO is constant high.

#######################-------------------------------------------------------#####################################


Please help me to overcome this problem
Labels (1)
0 Kudos
Reply
3 Replies

1,923 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Fri Nov 08 06:32:24 MST 2013
This sort of failure can happen if there is some form of exception at the start of your code.

Try to insert an endless loop right at the start of your code, and debug from there.
0 Kudos
Reply

1,923 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by soorajmannangal on Fri Nov 08 02:49:16 MST 2013
Thanks a lot,
i can put my device in isp mode and then jtag detect again.

But while iam trying to flash new code it again come back to undetected jtag state.

Keil log is below
#################--------------------------------------------------------------------###################
Load "C:\\lpc demo\\GLCD_K4S561632C_32M_16BIT ( 4.3 inch LCD )\\KEIL-MDK\\obj\\project.AXF"
* JLink Info: Device "LPC1788" selected (512 KB flash, 64 KB RAM).
Set JLink Project File to "C:\lpc demo\GLCD_K4S561632C_32M_16BIT ( 4.3 inch LCD )\KEIL-MDK\JLinkSettings.ini"

JLink info:
------------
DLL: V4.50j, compiled Jun 26 2012 09:19:07
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull

* JLink Info: Could not measure total IR len. TDO is constant high.
***JLink Error: Failed to measure TotalIRLen.
Load "C:\\lpc demo\\GLCD_K4S561632C_32M_16BIT ( 4.3 inch LCD )\\KEIL-MDK\\obj\\project.AXF"
* JLink Info: Device "LPC1788" selected (512 KB flash, 64 KB RAM).
Set JLink Project File to "C:\lpc demo\GLCD_K4S561632C_32M_16BIT ( 4.3 inch LCD )\KEIL-MDK\JLinkSettings.ini"

JLink info:
------------
DLL: V4.50j, compiled Jun 26 2012 09:19:07
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDBFull

* JLink Info: TotalIRLen = 4, IRPrint = 0x01
* JLink Info: Found Cortex-M3 r2p0, Little endian.
* JLink Info: TPIU fitted.
* JLink Info: ETM fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
ROMTableAddr = 0xE00FF003
* JLink Info: Found Cortex-M3 r2p0, Little endian.
* JLink Info: TPIU fitted.
* JLink Info: ETM fitted.
* JLink Info: FPUnit: 6 code (BP) slots and 2 literal slots
* JLink Info: Core is locked-up!
* JLink Info: Can not halt CPU
**JLink Warning: CPU did not halt after bootloader.
* JLink Info: CPU did not halt, trying to disable WDT.
***JLink Error: Bad JTAG communication: Write to IR: Expected 0x1, got 0x0 (TAP Command : 11) @ Off 0x3E.
Failed to halt CPU

Target info:
------------
Device: LPC1788
VTarget = 3.300V
State of Pins:
TCK: 1, TDI: 0, TDO: 0, TMS: 0, TRES: 1, TRST: 1
Hardware-Breakpoints: 0
Software-Breakpoints: 8192
Watchpoints:          0
JTAG speed: 100 kHz

Cannot setup Breakpoint at Address
Cannot setup Breakpoint at Address
Erase Failed!

#################-----------------------------------------------------------------###############

0 Kudos
Reply

1,923 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Nov 08 00:39:14 MST 2013
Please read this FAQ:
http://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access
0 Kudos
Reply