If you want to us USB the crystal should be 48 MHz. But there is problems with that from the errata. It recommends <25 Mhz crystal. So then go with an oscillator. But must limit to < 3.0 volts.
What do people out there do?
Risk it & go with a 48 MHz crystal? (How do you do a negative resistance measurement?)
Go with a 48 MHz oscillator @ 3.3V? with series resistor? value? or another LDO to < 3.0V for osc.
Go with 24 MHz crystal & PLL. But can't do USB & ethernet.
What do others do?
When I look at the schematics of the reference boards, the simplest part of the circuit looks to be the crystal oscillator. There's a lot of complexity in there, and a lot of things that can go wrong.
Anyone interested in the details can start at this Wikipedia page, with the linked section hinting at problems:
Then check the excellent set of references on that page and head off to the IEEE:
The listed Tutorial by John R Vig is excellent:
Also from Wikipedia is the following very old paper on oscillator design:
It deals mainly with discrete transistor oscillator design. It also contains the following rather blunt observation on driving crystals with digital circuits (like we all do now):
"These oscillators are usually used where they are least suitable: in frequency and period counters, clocks and other measuring equipment."
But what could possibly go wrong? The following sentence on the above Wikipedia page caught my eye:
"A badly designed oscillator circuit may suddenly become oscillating on an overtone; in 1972, a train in Fremont, California crashed. An inappropriate value of the tank capacitor caused the crystal in a control board to be overdriven, jumping to an overtone, and causing the train to speed up instead of slowing down."
Tom (THE Random Poster)
Regardless of what a random poster might say, I just spend some quality time with a mcf52259 and its crystal oscillaor.
I used a fairly run of the mill, $1.166 each 20Mhz crystals with no issues, even after removing the 48 MHz by hand and hand soldering in another The package has little indentation on the side that if you get up close with your 30x stero Nikon you can solder pretty easy.
Sorry to I saw no issue.
I also found that having CLKMOD1:0 at 11 seem to make it work correctly Also 01 worked just fine for the internal on chip oscillator.
I am sorry, but has just not been an issue: not for me. Try it as 11.
Also the crystral I used was reate at 18pf, but was able to operate on overtones as well (I did not see that but the spec said so.
Perhaps I just have random ludck.
This is the part I used:
I go 80,100 and 120MHz from the PLL to work jusr fine, right on the money, If you haven't done so put a scope on the CLOCKOUT so you can quickly see whats up.
You can waste time doing all the esoteric research you want, but in the end all you have is whats on the chip, and this seem to be what works and works well.
I appreciate everyones comments.
I've gone with the crystal approach. I've modified the layout such that I can go to a oscillator with a BOM change only.
Freescale tech support ... whats that?
The only tech support I can find is basically you all in this forum. I do have another friend engineer that is using this part.
Thanks to you all.
P.S. I'll do another message about compiler suites. There has to be something better than Coldwimp!
> How do you do a negative resistance measurement?
So that's the instruction in the chip errata that tells you do to that. First you need the "series resistance" of the crystal from the manufacturer or from their data sheet.
The usual way is to measure the "negative resistance" is to add positive resistance in series with the crystal until it stops working, or stops working reliably over a scan of your entire temperature range. Note the Errata warns the crystal may go to low amplitude at certain temperatures only. That's a characteristic of crystals, when a "spur" (spurrious oscillation) from one ot the other modes interferes with the main mode and frequency.
They suggest a margin of "2" at least. Than means if the crystal is 30 ohms, ...
Why am I telling you this?
Just type "crystal negative resistance measurement" into Google and the whole first PAGE of results is full of instructions on how to do this!
> What do others do?
Pick a different chip. You should pick the chip to suit your requirements, not fight to make an unsuitable chip work for you.
These instructions (found by Google as noted previously) are seriously complicated, but very professional:
These instructions are nice and simple, and what you should try. I like the "wet finger test" too:
Don't miss the bit that says "run this test across your whole temperature range" as it is the "spur" (spurious oscillation) from the crystal changing with temperature that interferes with stable oscillation. Test more than one crystal too. Test LOTS of them.
Freescale suggests a margin of "2". Daishinku suggests "5" for normal products and "10" for Automotive and safety critical.
For volume production I think that the excercise with the 48MHz crystal is the way to go - this is the best method to achieve USB and Ethernet operation at the same time at the best component price. Presumably, when the circuit is matched correctly for the used parts and layout, the solution is OK.
For low volume production it may be easiest and safest (less time to invest) to use an external clock generator at 48MHz. The 3.0V limit shouldn't be a big deal because, as the errata suggests, the signal amplitude can also be reduced by using a simple resistive divider. Probably a serial resistor of appropriate value will do it too (input loading).
Alternatively a lower frequency crystal can be used - as long as the bus speed is increased by the PLL to at least 50MHz (same is true when using 48MHz) Ethernet will be OK. USB can be driven by an external 48MHz clock on its alternative clock input (port NQ1) , which is 3.3V tolerant, so also no divider needed. This means that the main crystal frequency is more flexible but the component costs are probably highest. [Note that some applications may get away with using the internal 8MHz RC oscillator as main clock source and the external 48MHz fo USB]
We're using 48MHz crystal on MCF52259 with no issues (we weren't aware of the errata!), over 100 boards built and working so far...
I don't know the part # we're using but coud look it up if it would be helpful.
> Presumably they tested it.
And then wrote the errata as a result of the tests failing? That errata just says "test your board with your crystal" which is what every designer should do anyway. Even if you do get the one they used, your board layout or crystal loading may be different and may need trimming to guarantee reliability over temperature and production variation.
The only "solution in a box" that you don't have to worry about, measure, understand, temperature test (in an environmental chamber) and document is to use an external oscillator because the people who made it have already done all that necessary work.
Like I said, contact tech support and go with their guidance and possible clarification.
Better chance they actaully will know what they are talking about than a random poster.
It's most likely not that a big a deal, since the twr board ships and works just fine with the 48MHz xtal.