OpenOCD CFI flash issues

I’m working on a board with a NXP LPC32x0 ARM9 processor, with a 4Mbyte Micron 28F320J3 “Q-flash” chip attached to it. This chip uses the same command set as an Intel 28F320J3 part, and should be pin/function compatible.

The flash is 16-bit, and the flash bank configuration is: “flash_bank cfi 0xe0000000 0x400000 2 2 0”. All registers required to access the flash (external memory bus configuration, etc) are all set up.

“flash_probe 0” works, and finds a 0x0089 manufacturer and 0x0000 ID code (should be 0x0089, 0x0016).

“flash_info 0” works, and gives the correct CFI information for the flash (shows ‘QRY’ code, Intel PRI command set V1.1, etc).

However, “flash write” hangs OpenOCD. After restarting OpenOCD and looking at memory using mdh, the first 16-bit word of flash is programmed (with correct data) but that’s it. Executing “flash erase” also hangs OpenOCD, but will erase the flash.

I can manually program/erase the flash using mdh/mwh commands, which works fine, so everything should be OK electrically. Plus, if I put an Intel TE28F128J3 (16Mbyte) flash on the board, the flash_erase and flash_write commands work fine. So presumably OpenOCD doesn’t like something about the Micron chip. I can’t seem to find a command to make OpenOCD’s flash programming process act more verbose, to give me any sort of clue of what’s going on.

Any suggestions on what I should do next?

Late update: Cleared a solder bridge on DQ7 and everything works fine now. :smiley: