> Flash must be faster than 73ns (address) and 57ns (OE), correct?
Near enough. To generate 110ns timing the wait states have to be (2 + W)*t = 110+13+14, or W = ((110+13+14)/t)-2.
For "t" = 20.833ns, W = 4.57, so round up to 5 wait states.
Recalculating (2 + 5)*20.833-13-14=118ns, which is within spec for the Flash.
Why did you choose 7 wait states? Do you have address and data buffers between the CPU and the Flash?
> The flash has 110ns CE# Access Time
> 25ns OE# Access Time
> 30ns Data setup time
The Data Setup time for the FLASH is only for when you're writing to it. There's no "data setup time" for that chip when reading it. Instead you have to use the "B4 Data input (D[31:0]) valid to SDCLK (setup)" time for the CPU of 14ns, which is already in the calculation.
So you can use 5 Wait States. But you should check every other part of the timing in case the Flash has a requirement that needs RDAH, WDAH or ASET.
Where did the original "3 wait states" come from? Was that from a previous project with a slower bus clock, or from Freescale (or other) sample code for a different chip?
So you'll be using 5 wait states on top of the minimum 3 bus cycle read timing. That's 8 clocks at 48MHz or 166.7ns or 6MHz. Since you're using a 16 bit chip, than means a maximum 32-bit read rate of 3MHz which will limit your 48MIP CPU to about 3MIP for instructions that need 32 bits. Or about the same speed I was getting from 68300 series chips in 1991. Is performance important in your application?
Most FLASH chips support burst or page mode which reduces the page access time to 30ns or less. The MCF5272 Chip Select module doesn't support Burst Mode. You need to use the MCF53xx chips to get that.
If you have an SDRAM chip on your board, then the code will run a lot faster from there than from the FLASH. The SDRAM controller supports burst/page mode. You can also load small critical functions into the SRAM, but as there's only 4k of that they have to be small. You also have to put the stack somewhere fast (but then you have to be very careful to not run off the end of the stack).
This CPU has an instruction cache, and it can get the CPU back near one instruction per clock. It is a relatively tiny cache, being only 1 kbyte, or 256 32-bit words arranged in 64 16-byte lines. It is very easy for a long function call or long loop to break it. If your current code isn't fast enough there's a lot of scope for tuning.
I also wrote:
> The manual doesn't say you CAN'T reprogram Chip Select decoders that are currently operating, but it doesn't say you CAN either.
> The safest approach is to copy a small function to RAM that reprograms the registers and to call that instead of programming the registers "in-line".
I looked back through some previous code. I found code changing the chip-selects (while running in the memory they address) in 68331 code in 1993, apparently without problems. But the CPU32 in that chip probably didn't "pipeline". I was more paranoid programming an MCP860 in 1998. In that code I call a function in RAM to change the chip selects. Where I work at the moment we use MCF5235 and MCF5329 chips. We reprogram the Flash chip-selects on both of them while running from them, so it seems to work.
Tom