We work at 88MHz. Yes, indeed 40 MHz is a bit slow, but I did the test to override the PLL and check the behavior of the board.
One of the tests I have done has been to remove the 100nF capacitor from the PLL power decoupling (after the filter) leaving only a 10µF ceramic capacitor and the two boards with BGA package tested do not boot with PLL. If I do the same test on the old board with the QFP package the board works OK. I know it is not correct to remove this capacitor, but it was to see the sensitivity of this part of the circuit on the two versions of the design.
The program runs from flash and we have static RAM using chipselect 1.
I have tried to modify the timings through the CSCR0 and CSCR1 registers to give more time to the bus by adding wait states and increasing the setup times, but it has not brought any improvement.
I have made a very short program that runs entirely inside the cache of the micro so that it does not access either the flash or the RAM. After starting the program I went up to 75 degrees and the board ran smoothly at 88MHz (PLL on). Then I repeated the test by accessing the flash but only doing data reading tests regardless of whether the read value was correct or not. The code was still in the micro's cache and accessing the flash to read its contents caused the board to hang.
I also tried with the normal program to disable the cache memory but I still have the same problems.
I did a test running with emulator and most of the times when the board hung, the connection with the micro was lost and we cannot know where the code is running. Sometimes the mcf5xxx_exception_handler() interrupt came in and would stop at the following options:
case 11: printf(EXCEPTFMT, "Unimplemented F-Line Instruction", \ MCF5XXX_SF_PC(framep));
case 4: printf(EXCEPTFMT, "Illegal instruction", MCF5XXX_SF_PC(framep));
With the PLL configuration we can only raise the working frequency and cannot lower it.
That's why we tried with an oscillator at 40MHz (maximum allowed speed) and disabling the PLL.
Jack