JFFS2 filesystem integrity issue
Jamie Lokier
jamie at shareable.org
Wed Mar 19 11:15:28 EDT 2008
Duke wrote:
> > > For some reason it either seem to read the file incorrectly or the
> > > file is corrupt some how. When this happens I don't loose the
> > > calibration altogether but it is intermittent and sporadic at times.
> > > Has anyone seen something similar? Does the cause seem realistic?
> > > Has anyone had a possible corruption like this?
> >
> > I have seen similar, and it was due to borderline timing or signal
> > integrity issues, possibly affected by what else the CPU was doing at
> > the time.
>
> Didn't adjusting the timing of the banks help you any?
I'm not sure what you mean by this. The only adjustment that can be
made in software on our device, as far as I know, is to reduce the
clock frequency.
> > It was fixed in our case by improving the PCB design.
>
> I'm doing a rev of the board but as far as improving the design, I
> have no reason to adjust my memory design.
> Perhaps you have something I can look for?
I don't know what fixed our design. A new hardware rev arrived, and
the problem no longer occurred. But my instincts suggest two
possibilities:
- Supply voltage too low, or insufficient stabilisation near the chips.
- Excessive propagation delay between the CPU and flash, failing
to meet timing specs.
Both of these I've observed on our boards, and both of them cause
spurious bit errors when reading flash (or RAM for that matter). I
noticed that these bit errors, in both cases, are dependent on what
other activity the board is doing at a similar time - e.g. reading
from disk, booting, CPU busy or idle, even specific code sequences, etc.
Spurious bit errors results in JFFS2 temporary file corruption on
reads, similar to what you have. Unfortunately, JFFS2 doesn't report
this as an error. Because of the way it works, it can only silently
change the file contents.
If you can reproduce these occasional errors by soak testing, try
lowering the clock frequency. If the errors go away, you know it's
probably a marginal hardware problem.
-- Jamie
More information about the linux-mtd
mailing list