Page 1 of 1

Flash ROM too fast?

Posted: Fri Dec 05, 2025 6:48 pm
by speculatrix
Here's an interesting conundrum. I have an issue with my new homebrew machine setup that uses flash (an SST39SF010) in place of an EEPROM. But I'm not (yet) asking for solutions to this problem. I want to explore it myself some more first because ... well, it's fun.

But I am interested in getting responses from the greybeards hereabouts to the one source of advice I've had so far. And I know some people are going to have an allergic reaction to this, but that's really why I'm doing this.

I asked an AI for help.

And yes, I'm an AI sceptic, while also finding some AIs to be useful in certain contexts. I'd just be interested in hearing opinions on how well the AI did in responding to the question.

Which was: with my 1MHz 65C02-based homebrew computer, what was working fine with 150ns EEPROM is now seeing crashes with 55ns flash. Most operating system commands work fine and shorter programs also perform without problems. But some longer programs crash, and always in the same places. So I asked Perplexity whether it's possible that the flash ROM is too fast.

And this is what it said:
Quote:
At 1 MHz, a full CPU cycle is around 1000 ns, and even old 150 ns EEPROMs are fast enough to present valid data well before the CPU samples the bus. Moving to 55 ns parts only increases this timing margin; the processor has no requirement for a minimum access time.

So if the machine ran reliably with 150 ns and crashes with 55 ns, the root cause is almost certainly:

- The faster device responds earlier to brief address or control glitches.
- The faster device has different output‑enable / chip‑enable timing, so data appears or changes while the CPU is still switching bus lines.
- Different input thresholds or drive strengths change how ringing or reflections show up on the data bus.

## Typical failure mechanisms

Common concrete ways this shows up in 8‑bit homebrew / retro builds:

- Address decode hazards: A combinational decoder that briefly asserts the ROM chip‑enable on wrong addresses (e.g. when A15..A0 are transitioning) may not bother a slow 150 ns ROM, but a 55 ns flash can output “real” data for that short hazard window. If the CPU happens to sample during that window, it may see a bogus opcode (often $$00$$ on 6502, interpreted as BRK, or similar) and “randomly” reset or crash.
- Read/write overlap: If /OE or /CS timing is marginal relative to /RD and /WR, the faster chip may drive the bus at times when the CPU or another device is also driving it, causing contention or corrupted reads.
- Missing latching for multiplexed or slow signals: If any address lines are derived via latches or glue logic, faster memory may expose setup/hold violations that used to be masked by slow ROM access.

## Things to check in your design

Given your symptom (“programs crashing after switching from 150 ns EEPROM to 55 ns flash”), worthwhile checks are:

- Verify address decode: Scope /CS and /OE for the ROM/flash while the CPU runs; look for narrow pulses when the ROM should be deselected. If you see glitches, add registered /CS, or simplify the decoding so that only stable signals feed the ROM select.
- Check data bus timing: Use a logic analyzer to confirm that data lines are stable during the CPU’s documented data‑sampling window, and that no other device is driving the bus at the same time as the ROM/flash.
- Compare control timing from datasheets: Make sure the faster flash meets all minimum pulse widths and setup/hold requirements for your CPU, and that you are respecting its own /CE, /OE, /WE timing (especially if the part supports byte‑programming).
- Power and decoupling: Faster edges mean higher di/dt; ensure good decoupling close to the ROM/flash and CPU so that supply dips or ringing do not cause bit errors at higher edge speeds.

## Practical workarounds and experiments

To narrow it down and/or make it robust:

- Try adding a small series resistor (e.g. 47–100 Ω) in the ROM/flash data lines or /OE line to tame edge rates and ringing; this often stabilizes marginal buses with very fast modern parts.
- If your CPU supports it (e.g. 6502 RDY, Z80 /WAIT), experiment with inserting a wait state on ROM reads; if crashes disappear with an added wait, that points strongly at a timing hazard rather than a logic error.
- If possible, temporarily under‑clock the CPU further (e.g. 500 kHz) with the 55 ns flash. If it still crashes at very low speed, then the failure is not “flash too fast” but some incompatibility (e.g. wrong pin function, voltage, or write‑protect feature) or decode bug triggered by the new device.

In summary, the ROM is not “too fast” in the sense of violating a minimum access time; instead, the faster device makes subtle bus‑timing or decode issues visible, and solving those (or slightly slowing / shaping the signals) should restore stability.
So what do you think? Good advice? Misleading? I'm about to crack out the scope and logic analyser.

Re: Flash ROM too fast?

Posted: Fri Dec 05, 2025 8:11 pm
by gfoot
Certainly the first few paragraphs are not bad - but it (rightly) veers off into a lot of fairly open-ended troubleshooting tips because I'm not sure there is a concrete reason why this would happen - it's unusual, so you do just need to diagnose it carefully. I think the suggestions it gave are mostly sensible but didn't read them all in detail.

I think AI can be (increasingly) good as a source for these sorts of troubleshooting ideas, and it does tailor them to your situation based on the information you give it - but you need to read the suggestions carefully and decide whether they do make sense in your system, and you may find some of the advice wouldn't make sense for any system. It's the same when taking advice from humans though because we too can have incorrect assumptions about your system. I think that beyond the most simple mistakes, odd errors from homebrew computers are generally due to something quirky about the way some of your glue logic is set up, which neither humans nor AI are going to know about.

Re: Flash ROM too fast?

Posted: Fri Dec 05, 2025 8:18 pm
by BigEd
I'm not too happy with being asked to proof-read AI output for someone else's query: we all know that AI is always plausible, and confident, but often mistaken. Proof-reading takes effort.

Better, if you have a question, to ask it here and see what people say. Most people will only comment when they have a clue, unlike AI.

Re: Flash ROM too fast?

Posted: Fri Dec 05, 2025 8:54 pm
by speculatrix
BigEd wrote:
I'm not too happy with being asked to proof-read AI output for someone else's query.
Not sure what you mean by proofreading but I am sure that's not what I was asking.

We all know that people come to forums like this as a way of getting answers to problems they're having. That's wasn't what I was doing here (although that may still come later :wink: ).

In this age of vibe coding, even professional programmers are turning to AI to solve coding issues. I'm intrigued by how much we can trust it. So the response I was seeking was how good a job you think it did in answering a question that might normally have been asked of humans. It's the people's opionions of the overall quality of the response I'm interested in, not the specifics.

Re: Flash ROM too fast?

Posted: Fri Dec 05, 2025 9:31 pm
by BigDumbDinosaur
Initially, the AI response seemed reasonable.  However, it quickly veered off into “what ifs”, which are the philosophical equivalent of troubleshooting via Easter Egging.  :D

Addressing your problem, I will say all of my POC units to date have been equipped with 55ns EPROMs.  I’ve never encountered any flaky operation with these EPROMs, even with the clock throttled back to as low as 500 KHz.

It would be useful to see a complete schematic of your unit.  I highly doubt the speed of the 39SF010 in itself has anything to do with the instability issues.

Re: Flash ROM too fast?

Posted: Sun Dec 07, 2025 10:18 am
by PaulaM
I'm using the same chip as you SST39F010 and I have no problems at pretty much any speed (I started at 1MHz and went up to the 14MHz of the 65c02).

Re: Flash ROM too fast?

Posted: Sat Dec 13, 2025 10:31 am
by J64C
I’m using 5ns ROM without any issue, with the 6502 running anywhere between 1 Hz and 25 MHz.

So 55ns ROM doesn’t seem ‘too fast’ at all.

Re: Flash ROM too fast?

Posted: Sat Dec 13, 2025 6:37 pm
by BigDumbDinosaur
J64C wrote:
I’m using 5ns ROM without any issue, with the 6502 running anywhere between 1 Hz and 25 MHz.
From where are you sourcing those 5ns ROMs?  :D  I'd like a few to play with.  :lol:

Re: Flash ROM too fast?

Posted: Sun Dec 14, 2025 2:06 pm
by plasmo
5ns ROM would be nice to have, especially for fast 6502. I generally resort to CPLD or 22V10 for 10ns ROM, but their size is limited to 64-128 bytes.

Re: Flash ROM too fast?

Posted: Sat Jan 31, 2026 4:51 am
by J64C
BigDumbDinosaur wrote:
J64C wrote:
I’m using 5ns ROM without any issue, with the 6502 running anywhere between 1 Hz and 25 MHz.
From where are you sourcing those 5ns ROMs?  :D  I'd like a few to play with.  :lol:
Mouser

Re: Flash ROM too fast?

Posted: Sat Jan 31, 2026 6:53 am
by J64C

Re: Flash ROM too fast?

Posted: Sat Jan 31, 2026 8:25 am
by GARTHWILSON
Oh, so it's a 1.2V FPGA.

Re: Flash ROM too fast?

Posted: Sat Jan 31, 2026 9:01 am
by barnacle
Are logic levels the other way up in Australia?

Asking for a friend. I'll just get my coat...

Neil :mrgreen:

Re: Flash ROM too fast?

Posted: Sat Jan 31, 2026 9:18 pm
by J64C
barnacle wrote:
Are logic levels the other way up in Australia?

Asking for a friend. I'll just get my coat...

Neil :mrgreen:
In what way?

Re: Flash ROM too fast?

Posted: Sat Jan 31, 2026 9:41 pm
by J64C
GARTHWILSON wrote:
Oh, so it's a 1.2V FPGA.
For the core yes, but the I/O's max out at 4.6v, making them ideal for most scenarios.

My two chip board has been running fantastic at 25 MHz for months.