I am trying to write to the Flash on a Logic PD Development Kit using a Sharp LH79524 to write to a Sharp LH28F128SPHTD. I know the hardware is fine because I can program the flash using a debugger and code happily runs from it.
The flash uses the CFI interface and writing 0x98 to (Flash Base) + 0x55h correctly returns the 'Q' 'R' and 'Y' query string. Writing 0x60 and then0xD0 is supposed to unlock the bank (there are two banks, controlled by the top address line) and a read of the status word after sending these claims that the banks were unlocked. I then wrote 0x20 and 0xD0 to the base of the flash to try and erase the first block and again the status returns that it was done, although the erase never actually happens.
Trying to write a word by writing 0x40 and the the data to the desired location intially appears to work (according to the status bit) but then fails after a number of locations have been done (up to 17 but often only1). The writes never actually program any locations though and the failure status word reports that I've tried to write to a locked area.
Can anyone shed any light on what may be happening? I have remembered to set the Program Enable line, which was my first thought, but other than that the CFI should make this simple. Shouldn't it?