Author Topic: Odd power on bug.  (Read 859 times)

0 Members and 1 Guest are viewing this topic.

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 6624
  • Country: gb
Odd power on bug.
« on: July 04, 2025, 08:13:14 pm »
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.
"What could possibly go wrong?"
Current Open Projects:  68000 Self Build computer + OS.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 6624
  • Country: gb
Re: Odd power on bug.
« Reply #1 on: July 04, 2025, 08:39:29 pm »
Schematic:
* output.pdf (47.28 kB - downloaded 34 times.)
"What could possibly go wrong?"
Current Open Projects:  68000 Self Build computer + OS.
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3817
  • Country: us
Re: Odd power on bug.
« Reply #2 on: July 04, 2025, 08:53:46 pm »
I don't know why you would think that would work.  Leave all the pin drivers off until power is connected and stabilized.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 5400
  • Country: nl
Re: Odd power on bug.
« Reply #3 on: July 05, 2025, 05:53:18 pm »
This project does look a lot like a variant of:
https://hackaday.com/2025/07/05/software-defined-retro-rom-makes-8-bit-easy/

Which also links to a github repository:
https://github.com/piersfinlayson/software-defined-retro-rom/

STM32 needs a bit of startup time. After power up, one of the first thing it does is to configure some PLL's then waits for them to stabilize and then switch the clock from the internal RC oscillator to the configured clock. If your other device attempts to access the ROM chip in that timeframe, you will get undefined results.

In the video of that hackaday article, it also states that the STM32 has to run at 100MHz to be fast enough to emulate the ROM. I don't know your speed, but maybe your  timing is marginal.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->