# External flash write error

**URL:** <https://community.sparkfun.com/t/external-flash-write-error/2558>\
**Category:** MicroMod\
**Tags:** arm-lpc\
**Created:** [August 29, 2006, 8:45pm UTC](https://community.sparkfun.com/t/external-flash-write-error/2558 "2006-08-29T20:45:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![branek](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@branek](https://community.sparkfun.com/u/branek)\
**Post date:** [August 29, 2006, 8:45pm UTC](https://community.sparkfun.com/t/external-flash-write-error/2558/1 "2006-08-29T20:45:23Z")

</div>

Hello,

thanks for great peace of software!

Earlier this year I successfully used OpenOCD for programing external

flash on my LPC2292 board. Flash is TE28F320C3 from INTEL.

Now, I am back to ARM again, and when I install last (SVN88RC2)

version of OpenOCD, and try to program my board I constantly getting

this message (OpenOCD window):

```auto
C:\Program Files\openocd-2006re82\bin>openocd-pp -f arm7_wig.cfg
Info: openocd.c:82 main(): Open On-Chip Debugger (2006-08-01 12:00 CEST)
Warning: arm7_9_common.c:675 arm7_9_assert_reset(): srst resets test logic, too
Info: server.c:67 add_connection(): accepted 'telnet' connection from 0
Error: arm7_9_common.c:1910 arm7_9_write_memory(): memory write caused data abort
Error: armv4_5.c:558 armv4_5_run_algorithm(): timeout waiting for algorithm to complete, trying to halt target
Error: arm7_9_common.c:1910 arm7_9_write_memory(): memory write caused data abort

```

and commands that I sends are:

```auto
Open On-Chip Debugger
> flash probe 0
flash 'lpc2000' found at 0x00000000
> flash probe 1
flash 'cfi' found at 0x80000000
> flash protect 1 0 40 off
> flash erase 1 0 40
> flash write 1 linux.bin 0x8000
flash program error
wrote file linux.bin to flash bank 1 at offset 0x00008000 in 29s 218750us
>

```

I tried on windows and on linux, I get same error on both platform,

with two diferent LPC2292 based boards.

Sometimes, some of location at 0x80008000 and above a successfully

written, sometimes there are no data in flash… everything is

still erased.

please can you help me to resolve this:

this is my config file:

```auto
#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface parport
parport_port 0x9800
parport_cable wiggler
jtag_speed 7
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe

#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
#target_script 0 reset h2294_init.script
run_and_halt_time 0 30
working_area 0 0x40000000 0x40000 nobackup

#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum
flash bank cfi 0x80000000 0x400000 2 2 0

```

and this dump from OpenOCD window when I start it with -d

switch.

[http://www.orpid.co.yu/test/dump\_flash\_error.zip](http://www.orpid.co.yu/test/dump_flash_error.zip)

thanks in advance

Branko Karaklajic

[www.orpid.co.yu](http://www.orpid.co.yu)

[www.bitgearwireless.com](http://www.bitgearwireless.com)
