My nor flash programmer (STM32).
If the flash chip is connected when the STM32 is powered on, it will not talk, it's dead, incognito.
If I remove the chip and re-insert it, there is a 80% chance it will work. Once connected and verifying reads I can hammer it, load tests, negative tests the works. The firmware, once in a stable state is solid.
The same IC in a real circuit also performs flawlessly for reads. Writes untested.
The flash rom is an SST39F010A (1Mbit Nor Flash) (Microchip). I can't see anything in the datasheet to suggest something that can upset it so badly when it first sees power to cause it fail to write.
For now it matters less as I still need to remove the ROM, put it into the programmer, flash it and reverse. So, I can just leave the programmer power and insert the chip into the ZIF socket "powered". This works.
If I move to "incircuit" programming this kind of "bug" will cause havoc.
Do do I begin to find the cause?
A long arm solution is to power the IC form a GPIO pin. That allows me to power cycle the IC. (Assuming all other inputs are LOW). It doesn't help with in circuit though.
This is a classic "power up transient" isn't it. Something is latching the chip up in the microseconds of it powering on. Either a pin it drives high the STM is sinking to ground or wise versa.