Hi Rob,
I'm very interested in what you conclude here because I am in the same position, using the internal relaxation oscillator PLL'd up to 48MHz and running USB (I am in device mode -- are you in host or device mode?).
The USB Full Speed Spec really demands you use a crystal, at 2500 ppm, but my experience with the M52221DEMO board (both mine work fine with the relaxation oscillator) led me to take a chance otherwise.
So far I have assembled just under 20 boards (by hand) and what I have noticed is that immediately following assembly they *never* work with USB (everything else works and I can load code and run it).
The strange thing is, following *cleaning*, every single board works on USB (on multiple computers). It is perplexing to me that cleaning should have such an effect.
What percentage of your boards work?
My board is *very* simple and adding a crystal will not only increase cost by 10%, it will increase board size... I'm considering laying out for the crystal and depopulating it by default, but have not done so yet.
As far as the accuracy of the relaxation oscillator is concerned, my parts run from 8.01 to 9.43 MHz as measured from PSTCLK (which is more than the +/-20,000 ppm I expected), and all of them are fine on USB (device mode).
My startup code is below.
-- Rich
Code:
// we use the 8MHz internal oscillator MCF_CLOCK_CCHR = 0; // and multiply by 6 to get 48MHz MCF_CLOCK_SYNCR = MCF_CLOCK_SYNCR_MFD(1)|MCF_CLOCK_SYNCR_CLKSRC|MCF_CLOCK_SYNCR_PLLMODE|MCF_CLOCK_SYNCR_PLLEN; while (!(MCF_CLOCK_SYNSR & MCF_CLOCK_SYNSR_LOCK)) { // NULL }