LPC1519 Target error from Commit Flash write

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

LPC1519 Target error from Commit Flash write

1,464 Views
zoranradmilovic
Contributor I

Hi,

I am having a problems debugging LPC1519. I keep getting 

Target error from Commit Flash write: Ep(08).

This is the full log of debugging session:

LPCXpresso RedlinkMulti Driver v8.2 (Sep 5 2016 10:12:38 - crt_emu_cm_redlink build 725)
Found chip XML file in C:/ZDATA/00 - Projects/02 - LPCxx/LPC1519/periph_blinky/Debug/LPC1519.xml
( 5) Remote configuration complete
============= SCRIPT: LPC15RunBootRomConnect.scp =============
DpID = 2BA01477
APID = 0x24770011
Halt on reset vector catch
Halt on watchpoint write of ROMWSCTRL register
============= END SCRIPT =====================================
Probe Firmware: LPC-Link Probe v1.3 (NXP - LPC-Link)
Serial Number: WIN64HS12
VID:PID: 1FC9:0009
USB Path:
Vector catch on SYSRESETREQ signal
Emu(0): Connected&Reset. DpID: 2BA01477. CpuID: 410FC230. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Enabled.
inspected v.2 On-chip Flash Memory C:\ProgramFiles_xZ\nxp\LPCXpresso_8.2.2_650\lpcxpresso\bin\Flash\LPC15xx_256K.cfx
image 'LPC15 (256K Flash) Jun 21 2016 11:53:30'
NXP: LPC1519 Part ID: 0x00000000
Connected: was_reset=true. was_stopped=true
LPCXpresso Free License - Download limit is 256K
Opening flash driver C:\ProgramFiles_xZ\nxp\LPCXpresso_8.2.2_650\lpcxpresso\bin\Flash\LPC15xx_256K.cfx
Writing 6680 bytes to address 0x00000000 in Flash
Erased/Wrote page 0-1 with 6680 bytes in 323msec
Flash Write Done
Flash Program Summary: 6680 bytes in 0.32 seconds (20.20 KB/sec)
============= SCRIPT: LPC15RunBootRomReset.scp =============
Halt on reset vector catch
Halt on watchpoint write of ROMWSCTRL register
============= END SCRIPT ===================================
Target error from Commit Flash write: Ep(08). Cannot access core regs when target running.
(crt_emu_cm_redlink) terminating on communication loss: Pipe has been closed by GDB.

However, if I only program the flash, then it works. This is the log:

Ni: LPCXpresso RedlinkMulti Driver v8.2 (Sep 5 2016 10:12:38 - crt_emu_cm_redlink.exe build 725)
Pc: ( 0) Reading remote configuration
Nc: Found chip XML file in C:/ZDATA/00 - Projects/02 - LPCxx/LPC1519/periph_blinky/Debug/LPC1519.xml
Pc: ( 5) Remote configuration complete
Wc: ============= SCRIPT: LPC15RunBootRomConnect.scp =============
Wc: DpID = 2BA01477
Wc: APID = 0x24770011
Wc: Halt on reset vector catch
Wc: Halt on watchpoint write of ROMWSCTRL register
Wc: ============= END SCRIPT =====================================
Xe:
Nc: Probe Firmware: LPC-Link Probe v1.3 (NXP - LPC-Link)
Nc: Serial Number: WIN64HS12
Nc: VID:PID: 1FC9:0009
Nc: USB Path:
Pc: ( 30) Emulator Connected
Xc:
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Connected&Reset. DpID: 2BA01477. CpuID: 410FC230. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Nc: inspected v.2 On-chip Flash Memory C:\ProgramFiles_xZ\nxp\LPCXpresso_8.2.2_650\lpcxpresso\bin\Flash\LPC15xx_256K.cfx
Nc: image 'LPC15 (256K Flash) Jun 21 2016 11:53:30'
Nc: NXP: LPC1519 Part ID: 0x00000000
Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=true. was_stopped=false
Cr:v LPCXpresso Free License - Download limit is 256K
Pc: ( 70) License Check Complete
Nt: Loading 'periph_blinky.axf' ELF 0x00000000 len 0x1A18
Nc: Opening flash driver C:\ProgramFiles_xZ\nxp\LPCXpresso_8.2.2_650\lpcxpresso\bin\Flash\LPC15xx_256K.cfx
Nt: Writing 6680 bytes to address 0x00000000 in Flash
Pb: 1 of 1 ( 0) Writing pages 0-1 at 0x00000000 with 6680 bytes
Ps: ( 0) at 00000000: 0 bytes - 0/6680
Ps: ( 61) at 00000000: 4096 bytes - 4096/6680
Ps: (100) at 00001000: 4096 bytes - 8192/6680
Nt: Erased/Wrote page 0-1 with 6680 bytes in 285msec
Pb: (100) Finished writing Flash successfully.
Nt: Flash Write Done
Nt: Loaded 0x1A18 bytes in 446ms (about 14kB/s)
Nt: Reset target (core)

The application works until the power is gone. Then nothing happens until I program the flash again.

I use LPCXpresso v8.2.2 [Build 650] [2016-09-09] and LPC-Link Probe v1.3 to custom board.

Any help or input is appreciated.

Thanks,

Zoran

Labels (1)
0 Kudos
2 Replies

870 Views
lpcxpresso_supp
NXP Employee
NXP Employee

The first thing to note is that we don't strictly support LPC1500 debug with the original LPC-Link(1) - as detailed in the LPCXpresso IDE FAQ at 

Generally we would recommend using LPC-Link2 instead. These probes are available from many NXP distributors at low cost (around $20 typically) : LPC-Link2|NXP . You can also obtain one by purchasing a standard LPCXpresso1549 board (LPCXpresso Boards|NXP ).

That aside, I would suggest that you double check your board design against the information given in the FAQ at:

and then potentially try booting your board into ISP mode before starting a debug session:

Note that starting a debug session requires additional interaction with the target over just programming flash. And it appears to be that additional interaction to gain debug control that is failing in your situation.

Regards,

LPCXpresso IDE Support

0 Kudos

870 Views
ianbenton
Senior Contributor I

That aside, I would suggest that you double check your board design against the information given in the FAQ at:

That is the WRONG information, See Fig. 105 of the LPC15xx manual for the correct information. DO NOT put a pulldown resistor on SWCLK because it already has a pullUP resistor inside the IC. It will just bias the input into an indeterminate state,  remove any noise immunity that it has and probably make it draw current from the supply. 

Needless to say, I suspect that it is is a hardware problem as the SWD interface is particularly finicky. See my post 

https://community.nxp.com/thread/462362 

It's now 5 months since I did that work and the 74HC1G17 on the SWCLK input has made a huge difference in programming reliability.

Also - did you program any changes to the clock? TO change it to the crystal oscillator or to connect it to the PLL?

If the changeover isn't successful (perhaps you forgot to power up the new oscillator in PDRUNCFG or enable it in SYSAHBCLKCTRL) it will crash immediately after programming, like yours seems to do.

0 Kudos