Hello all,
I’m new to ARM development, and have run into a problem regarding programming my device.
The hardware is custom, and uses an LPC2134, supplied with a 10MHz clock. My initial attempt on programming the most simple assembly language application was successful, after finding and correcting a few hardware bugs: first the JTAG interface was disabled due to P1.26/RTCK being high on startup. Then after I got the code flashed in the controller, it was not executing. Turned out that the controller was entering ISP mode, because P0.14 was not connected. Added a pull-up, and it worked.
Then I tried to bootstrap some C-code, and was initially successful at this - code runs. But after making some changes to the makefile and programming once again, I am now unable to erase/program the flash.
Of course I have tried changing the makefile back, and also tried using an older version (even going back to the assembly code). I am using an Amontec JTAGkey for programming.
./openocd-ftd2xx.exe -f amontec_lpc2134.cfg
Info: openocd.c:84 main(): Open On-Chip Debugger (2007-01-31 12:00 CET)
Info: target.c:223 target_init_handler(): executing reset script 'openocd_lpc 2134.script'
Info: configuration.c:50 configuration_output_handler(): dcc downloads are enabled
Info: configuration.c:50 configuration_output_handler(): waiting for target halted...
Info: configuration.c:50 configuration_output_handler(): target halted
Error: armv4_5.c:584 armv4_5_run_algorithm(): timeout waiting for algorithm to complete, trying to halt target
Warning: lpc2000.c:443 lpc2000_erase(): lpc2000 prepare sectors returned 11994472
Info: configuration.c:50 configuration_output_handler(): flash erase error
Info: configuration.c:50 configuration_output_handler(): target state: halted
Info: configuration.c:50 configuration_output_handler(): target halted in ARM state due to debug request, current mode: Abort
Info: configuration.c:50 configuration_output_handler(): cpsr: 0x600000d7 pc: 0x00000010
Error: armv4_5.c:584 armv4_5_run_algorithm(): timeout waiting for algorithm to complete, trying to halt target
Warning: lpc2000.c:443 lpc2000_erase(): lpc2000 prepare sectors returned 11994472
Info: configuration.c:50 configuration_output_handler(): flash erase error
Error: armv4_5.c:584 armv4_5_run_algorithm(): timeout waiting for algorithm to complete, trying to halt target
Warning: lpc2000.c:565 lpc2000_write(): lpc2000 prepare sectors returned 11994472
Info: configuration.c:50 configuration_output_handler(): failed writing file ca4.bin to flash bank 0 at offset 0x00000000
Info: configuration.c:50 configuration_output_handler(): flash program error
Is it possible that something “wrong” has been programmed into the flash, and I can no longer erase/write it?