I am unable to turn off flash sector protection on the Olimex LPC2103 dev board.
openocd config:
#Target configuration file for openOCD.
#Using with Olimex Dev Board for LPC-2103
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lpc2103
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x4f1f0f0f
}
jtag_khz 500
reset_config trst_and_srst
# reset delays
jtag_nsrst_delay 200
jtag_ntrst_delay 200
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
# 8kB of internal SRAM
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x2000 -work-area-backup 0
# 32kB of internal Flash, core clocked with 14.7456MHz crystal
flash bank lpc2000 0x0 0x8000 0 0 0 lpc2000_v2 14746 calc_checksum
openOCD startup:
$URL: http://svn.berlios.de/svnroot/repos/ope … /openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
500 kHz
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
Info : JTAG tap: lpc2103.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part: 0xf1f0, ver: 0x4)
Info : JTAG Tap/device matched
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x400000d3 pc: 0x40000070
Info : accepting ‘telnet’ connection from 0
Telnet session to openOCD server:
flash probe 0
flash ‘lpc2000’ found at 0x00000000
flash info 0
#0 : lpc2000 at 0x00000000, size 0x00008000, buswidth 0, chipwidth 0
0: 0x00000000 (0x1000 4kB) protected
1: 0x00001000 (0x1000 4kB) protected
2: 0x00002000 (0x1000 4kB) protected
3: 0x00003000 (0x1000 4kB) protected
4: 0x00004000 (0x1000 4kB) protected
5: 0x00005000 (0x1000 4kB) protected
6: 0x00006000 (0x1000 4kB) protected
7: 0x00007000 (0x1000 4kB) protected
lpc2000 flash driver variant: 2, clk: 14746
flash protect 0 0 7 off
cleared protection for sectors 0 through 7 on flash bank 0
flash info 0
#0 : lpc2000 at 0x00000000, size 0x00008000, buswidth 0, chipwidth 0
0: 0x00000000 (0x1000 4kB) protected
1: 0x00001000 (0x1000 4kB) protected
2: 0x00002000 (0x1000 4kB) protected
3: 0x00003000 (0x1000 4kB) protected
4: 0x00004000 (0x1000 4kB) protected
5: 0x00005000 (0x1000 4kB) protected
6: 0x00006000 (0x1000 4kB) protected
7: 0x00007000 (0x1000 4kB) protected
lpc2000 flash driver variant: 2, clk: 14746
flash erase_sector 0 0 7
erased sectors 0 through 7 on flash bank 0 in 0.550792s
flash erase_check 0
successfully checked erase state
0: 0x00000000 (0x1000 4kB) not erased
1: 0x00001000 (0x1000 4kB) erased
2: 0x00002000 (0x1000 4kB) erased
3: 0x00003000 (0x1000 4kB) erased
4: 0x00004000 (0x1000 4kB) erased
5: 0x00005000 (0x1000 4kB) erased
6: 0x00006000 (0x1000 4kB) erased
7: 0x00007000 (0x1000 4kB) erased
WTF? Anyone know how to unlock the flash on the LPC2103?
Cheers,
cesium