Content originally posted in LPCWare by TommyBurger on Thu Jul 15 11:53:04 MST 2010
I have been using LPCXpresso for a few months on two projects using LPC1754. Today we decided we needed a crystal. We added a 4.91 MHz crystal and I changed the constants in system_LPC17xx.c to multiply that up to 98304000. It worked fine the first time, but then when trying to download to flash again I get an error reported by target dialog box:
Details:
15: Target error from Commit Flash write
Flash erase or write operation aborted.
And the following MCU Debug Log:
(crt_emu_cm3_nxp) terminating on communication loss: Pipe has been closed by GDB.
LPCXpresso Debug Driver v2.0 (Jun 10 2010 11:46:27)
Looked for chip XML file in C:/nxp/lpcxpresso_3.4/bin/LPC1754.xml
Looked for vendor directory XML file in C:/nxp/lpcxpresso_3.4/bin/nxp_directory.xml
Found generic directory XML file in C:/nxp/lpcxpresso_3.4/bin/crt_directory.xml
( 5) Remote configuration complete
( 30) Emulator Connected
( 40) Debug Halt
( 50) CPU ID
NXP: LPC1754 Part ID: 0x25011722
( 65) Chip Setup Complete
Connected: was_reset=false. was_stopped=true
v Registered license, download limit of 128K
( 70) License Check Complete
( 85) Registered Semihost Handler
(100) Target Ready
Writing 31312 bytes to 0000 in Flash (assumed clock: 240.0MHz)
1 of 1 ( 0) Writing pages 0-7 at 0x00000000 with 31312 bytes
( 0) Page 0 at 00000000
(100) Writing Flash ended with an error.
15: Target error from Commit Flash write: Ef(9). Flash erase or write operation aborted.
Stopped: VectorCatch:HardF (PC was 0xFFFFFFFE)
If I use another JTAG tool to erase the flash first, then flash downloading succeeds once.
I notice in the log it says "assumed clock: 240.0MHz". That is not right. Is there a way to overide this? Any other solution or workaround? Please help.