> I found a couple cases with absolute address in the instruction, something like
>"MOVE.B D0,(00012345)" that gave a buserror with the fault address FFFF2345
Do you have 16-bit Flash bus or 32-bit Flash bus? If you're using 16 bit, then the addresses are being fetched in two cycles, high word first, and that one went wrong somehow.
if you have 32-bit bus, then the upper half got read badly.
The fact that it read all-ones is either an open bus with pullups (do you have pullups?) or it is has read an erased part of the FLASH. I'm guessing you don't have pullups, so I'm suspecting the latter.
The way that might happen is if one of the upper address bits is being sampled as "high" by one of the Flash chips, and it is reading a high (erased) memory location instead of the one you intended it to read. Strangely the other Flash got the right address.
Which seems to indicate you've got marginal levels and/or timing. The worst case is where all of the address bits have changed from all-zeros to all-ones, with the exception of one poor address bit that is trying to stay low. The combination of capacitive coupling (from all the other tracks) and inductive coupling, together with "ground bounce" on the driving chip (the CPU) can lift that low address above the threshold when the Flash chip latches that address.
So you want an increased timing margin between when the addresses transition and when the signal is sent to the Flash chips to start a new cycle.
You should also be looking for this sort of thing on the address bus with a good oscilloscope. You should also look for evidence of undershoots and overshoots, They can cause RAM and FLASH chips to go slightly insane, especially as the frequency of the "shoots", the number of pins they're happening too and the temperature increase.
if your code has changed to it is getting "busy" across an address boundary (0x07fffff0 to 0x08000000) and the addresses on the data bus are also "busy" it can cross a threshold and trigger this.
Do you have SERIES resistors in the address bus? Do you have them in the data bus?
The data bus transitions (remember the CPU, RAM and ROM alternate driving this bus) can also couple through to the address bus. What are the theoretical and measured/observed timing relationships between data bus transitions and address bus transitions? And the Control bus signals?
This chip has variable drive strength on some clock lines, but not on the data, address or control lines. Newer chips have this capability and it is very useful. I had bad RAM corruptions on an MCF5329 which only went away when I turned the drive strength down as the undershoots and overshoots were causing the SDRAM to go crazy.
Is your chip in BGA, PGA or QFP? What's your grounding and bypassing like?
Does this happen on multiple boards? Has it started happening with newly built hardware, or is new software triggering it on all boards?
Tom