'flash erase' endless loop?

Hello,

I’m trying to flash an Intel XScale IX425-based device using OpenOCD (SVN copy from Thursday) and Amontec’s JTAGkey. I’ve configured the CFI flash driver like this:

working_area 0 0x10000000 0x0200000 nobackup
flash_bank cfi 0x50000000 0x1000000 2 2 0

I can run ‘flash probe 0’, ‘flash info 0’, or ‘flash erase_check 0’ just fine, but when I invoke ‘flash erase 0 0 3’, it runs for hours without returning anything. I’m new to flashing via JTAG so I don’t know if the process is supposed to take that long :oops: But it looks like an inifite loop to me. Here is a (very small) excerpt from the debug output:

Debug:   xscale.c:567 xscale_write_rx(): polling RX
Debug:   jtag.c:996 jtag_build_buffer(): fields[0].out_value: 0x00
Debug:   jtag.c:996 jtag_build_buffer(): fields[1].out_value: 0x00000001
Debug:   jtag.c:996 jtag_build_buffer(): fields[2].out_value: 0x00
Debug:   ft2232.c:1206 ft2232_execute_queue(): DR scan, 36 bit, end in 8
Debug:   jtag.c:1027 jtag_read_buffer(): fields[0].in_value: 0x03
Debug:   jtag.c:1027 jtag_read_buffer(): fields[2].in_value: 0x00
Debug:   xscale.c:567 xscale_write_rx(): polling RX
Debug:   jtag.c:996 jtag_build_buffer(): fields[0].out_value: 0x00
Debug:   jtag.c:996 jtag_build_buffer(): fields[1].out_value: 0x00000001
Debug:   jtag.c:996 jtag_build_buffer(): fields[2].out_value: 0x00
Debug:   ft2232.c:1206 ft2232_execute_queue(): DR scan, 36 bit, end in 8
Debug:   jtag.c:1027 jtag_read_buffer(): fields[0].in_value: 0x02
Debug:   jtag.c:1027 jtag_read_buffer(): fields[2].in_value: 0x00
Debug:   jtag.c:996 jtag_build_buffer(): fields[0].out_value: 0x00
Debug:   jtag.c:996 jtag_build_buffer(): fields[1].out_value: 0x00000001
Debug:   jtag.c:996 jtag_build_buffer(): fields[2].out_value: 0x01
Debug:   ft2232.c:1206 ft2232_execute_queue(): DR scan, 36 bit, end in 8
Debug:   jtag.c:1027 jtag_read_buffer(): fields[0].in_value: 0x02
Debug:   jtag.c:1027 jtag_read_buffer(): fields[2].in_value: 0x00
Debug:   jtag.c:996 jtag_build_buffer(): fields[0].out_value: 0x10
Debug:   ft2232.c:1206 ft2232_execute_queue(): IR scan, 7 bit, end in 8
Debug:   ft2232.c:1127 ft2232_execute_queue(): runtest: 1, end in 8
Debug:   ft2232.c:1166 ft2232_execute_queue(): pathmove: 3 states, end in 3
Debug:   ft2232.c:1206 ft2232_execute_queue(): DR scan, 36 bit, end in 8

Am I doing something wrong or is OpenOCD doing something wrong?

Henning

Henning,

Please provide us the part number of your on-board Flash.

Regards,

Laurent

The board uses two Intel 28F128J3D75 chips.

Hi,

hehol:
Hello,

I’m trying to flash an Intel XScale IX425-based device using OpenOCD (SVN copy from Thursday) and Amontec’s JTAGkey. I’ve configured the CFI flash driver like this:

working_area 0 0x10000000 0x0200000 nobackup

flash_bank cfi 0x50000000 0x1000000 2 2 0



I can run 'flash probe 0', 'flash info 0', or 'flash erase_check 0' just fine, but when I invoke 'flash erase 0 0 3', it runs for hours without returning anything. I'm new to flashing via JTAG so I don't know if the process is supposed to take that long :oops: But it looks like an inifite loop to me. 

[/code]

Am I doing something wrong or is OpenOCD doing something wrong?

yesterday I tried a IXP422 system. It has the redboot loader installed. Same Flash devices. Same problem.

I solved it by switching off the data caches and the mmu. RedBoot setup his own MMU tables and enabled caches. If you just take over this stuff, this is still enabled. Disabling the ‘Ecos’ setup seems to cure the problem.

Programming and Erasing is sometimes working. Most times I get a timeout and nothing is flashed. But just 10 min ago it just worked… it seems you have to try it several times.

I haven’t reported this to Dominic y,et as I couldn’t create a reproduceable test case for this yet. I will also have a look on the flash code and raise up some timeout limits or find some other hint for the timeout/alfunction. Maybe its possible to upload the flash code separately and check out whats up.

Carsten