17
\$\begingroup\$

Why not put the crystal oscillator inside the MCU itself, rather than using an RC internal oscillator? I could think of the following possibilities but not sure if they are valid:

  1. MCU manufacturer wants to keep a low price of their product. A crystal will be more expensive than RC oscillator.
  2. Designers might want to skip the crystal in a majority of the designs.
  3. Designers need the flexibility to choose the right crystal for the same MCU depending upon their application.
  4. Packing a crystal inside the MCU is not feasible.

I personally am unable to relate with 2 and 3. I typically use crystals in all circuits and just follow what they recommend in the application note. It will be great if they take the headache of layout, correct capacitor calculation, etc. away from me. It would save PCB space, and probably a packaged microcontroller would be cheaper than buying a microcontroller and crystal separately.

Are there other valid reasons for not putting the crystal inside the microcontroller?

I feel that having a precise internal crystal oscillator would be cost-effective and convenient to design, in general. At least for micrcontrollers that most probably need a crystal for functioning. Examples - any RF chip (wifi, BLE, zigbee.)

I recently came across what they call SIP modules for some wireless chips (EFR family from Silicon Labs and CC2652R from TI), where they make a 7 mm X 7 mm chip-like design containing a crystal, RF circuit etc. Designers just need to connect the antenna and other basic components.

I am wondering why not do it with general microcontrollers as well.

\$\endgroup\$
5
  • 3
    \$\begingroup\$ As I mentioned in my answer, (3) is actually a significant limitation. Some communications buses--including the ubiquitous USB!--require very tight tolerances on frequency, that you can only get using a crystal oscillator and (optionally) an integer-N PLL; using a fractional-N PLL is not feasible. Some, like RS-232, are pretty tolerant of frequency variation, but the fastest buses all have tight requirements. \$\endgroup\$
    – Hearth
    Commented Nov 15, 2023 at 15:58
  • \$\begingroup\$ @Hearth Depends on USB - I have seen MCUs and Audio headset USB ICs that are crystal-less. For RS-232, it would better to say UART, as UARTs are used in many places regardless of RS-232. Some MCUs may have internal oscillators within 1%-2% and that might suffice for UART. \$\endgroup\$
    – Justme
    Commented Nov 15, 2023 at 16:22
  • 1
    \$\begingroup\$ On chip, non crystal oscillators (MEMS oscillators) become more frequent and with new technologies as reliable if not more. \$\endgroup\$
    – Fredled
    Commented Nov 15, 2023 at 22:35
  • 1
    \$\begingroup\$ Its all about options. People want different ones, a crystal might even be too power hungry, you have something external for other purposes anyways, a gazillion different frequencies you need, all of these options would need to multiply the already giant product lines \$\endgroup\$
    – PlasmaHH
    Commented Nov 16, 2023 at 11:35
  • \$\begingroup\$ Not a significant argument, but crystals are also brittle and can break if you for example drop a tape & reel of them on the floor. Whereas most IC are quite tolerant to a bit of shock & vibration. \$\endgroup\$
    – Lundin
    Commented Nov 29, 2023 at 13:50

9 Answers 9

31
\$\begingroup\$

A crystal is very different in physical construction from an MCU, and most crystals are annoyingly large to integrate into a chip package. It's possible, however, to integrate other types of (smaller) resonators into a package, e.g. FBAR (Film Bulk Acoustic Resonator) devices that can be made as small as a few hundred microns on a side. Even in this case, it's two separate dies, with separate processes, packaged side-by-side.

Here's what this sort of FBAR co-packaging looks like (in this case for an RF application):

enter image description here

This particular image is from a chip-on-board integration for an academic research project. However, I'd imagine that for mass fabrication, the FBAR would be similarly bound to the die pad of the leadframe, next to the main die.

Compare this with the following crystal-based design:

enter image description here

The crystal is quite large compared to the silicon die, and requires packaging in a metal can with free air or vacuum around it. Getting these two devices co-packaged inside a single IC package would be much harder. You need a larger leadframe and die-pad, and a way of keeping an air/vacuum space around the crystal itself while still encapsulating the chip and wirebonds. On the other hand, we encapsulated our FBARs with epoxy without such considerations.

In addition to the fab/integration considerations in my answer, I highly encourage everyone to read Hearth's answer which discusses the overall system design aspects of the issue.

Both images are sourced from: Koo, J. Reference clock design for low power and low phase noise with temperature compensation, 2016.

\$\endgroup\$
4
  • \$\begingroup\$ Is that a crystal oscillator? or an RC one? What is FBAR on the bottom side? I do agree, overall MCU size will increase and the manufacturing cost will increase. I have a feeling that it will still occupy less space on the end application PCB and it will still be cheaper than buying two separate components. Am i right in thinking so? If yes, don't the benefits outweigh the pain? In any case, the end application pcb needs to be small, having a small MCU that results in a larger PCB defeats the purpose, in my head. \$\endgroup\$ Commented Nov 15, 2023 at 15:42
  • 3
    \$\begingroup\$ @Whiskeyjack The image is neither a crystal oscillator not an RC one. It's an FBAR based oscillator, where the FBAR is fairly similar to a crystal, but physically much smaller and with different electrical performance. The crystal would be way too big, require a massive change in the packaging structure (to fit both a wider and thicker device) , and would require a larger, bespoke package to work. The FBAR is chip-scale, can be bonded to using standard wirebonding techniques, and is smaller than the chip and just as thin. \$\endgroup\$
    – nanofarad
    Commented Nov 15, 2023 at 15:45
  • \$\begingroup\$ So FBAR and oscillator work together to generate the clock frequency? Apologies if I am asking stupid questions. I am curious to know how they work. A link will suffice as well. \$\endgroup\$ Commented Nov 15, 2023 at 15:52
  • 4
    \$\begingroup\$ @Whiskeyjack An FBAR and oscillator circuit work together just like a crystal and its corresponding oscillator circuit work together. This old answer of mine gives some of the background - wherever you see "crystal" in the circuit analysis, replace it with "FBAR". I did my Masters' thesis on FBAR oscillators and such and that document gives some more of the math and design theory; I don't have a copy handy, but I can upload it tonight. \$\endgroup\$
    – nanofarad
    Commented Nov 15, 2023 at 15:54
23
\$\begingroup\$

A crystal is fabricated on a completely different process and from a completely different material than a microcontroller is. You can't integrate them both into a single chip, so you would have to have two co-packaged devices.

This is not inherently an issue, and could in theory be done, but it would make the MCU package physically larger (the crystal is going to need to be thicker than the silicon die, not to mention the space it takes up in the other dimensions) and it would significantly increase cost.

Additionally, it would severely limit the oscillator frequencies you can run the microcontroller at. A crystal's frequency can't be adjusted by more than a handful of ppm, so you'd need to include a fractional-N PLL (which limits the accuracy of your oscillator; you have to find a pair of [M,N] that are close enough, and sometimes 'close enough' means very close indeed. Not to mention taking up more silicon area and increasing power consumption!) in every microcontroller to generate different communication bus frequencies. If the oscillator is external, you can use an oscillator frequency that's easily multiplied or divided to the bus frequencies you're using, and just ignore any that you're not. Since most[citation needed] microcontrollers are going to be used with some form of digital communication going on, whether that be CAN, USB, SPI, ethernet, or some bespoke protocol, this is a significant restriction.

\$\endgroup\$
9
  • 1
    \$\begingroup\$ @Whiskeyjack I was editing in more details about the frequency limitations. In general if you can avoid having to use a fractional-N PLL you should; some buses are very picky about frequency and you may not be able to find a pair of M and N that get you the right frequency within tolerance. Fractional-N PLLs also take up more silicon area and power than integer-N ones. \$\endgroup\$
    – Hearth
    Commented Nov 15, 2023 at 15:40
  • 1
    \$\begingroup\$ @Whiskeyjack Sometimes you need a bang-on frequency, and not jut a stepped frequency that is kind of close. \$\endgroup\$
    – DKNguyen
    Commented Nov 15, 2023 at 15:41
  • 2
    \$\begingroup\$ @Whiskeyjack And you're right about the crystal still taking up space, but you can adjust where exactly that space is taken up, and even choose a different crystal in a smaller package if needed. With an external oscillator, you get to decide where you want the price/size tradeoff to be, not the MCU's designer. \$\endgroup\$
    – Hearth
    Commented Nov 15, 2023 at 15:44
  • 2
    \$\begingroup\$ @JacobKrall No, for reasons that are too intricate to go into in a comment. If you want to ask this as a question, I'd be happy to write up an answer complete with visual aids! \$\endgroup\$
    – Hearth
    Commented Nov 18, 2023 at 21:26
  • 2
    \$\begingroup\$ @Hearth electronics.stackexchange.com/questions/689665/… \$\endgroup\$ Commented Nov 18, 2023 at 23:16
16
\$\begingroup\$

Here's a crystal oscillator (source):

enter image description here

In order to work, a crystal must be suspended in free air (or inert gas) by the edges. It works like a tuning fork, it is a mechanical resonator with electrical input/output via the electrodes, so it must be free to wiggle. This means the packaging must be hollow, for example a ceramic base with a metal cap.

This is not compatible with epoxy-based chip packaging processes which encase the chip inside a solid block.

It is possible to make a ceramic package with a crystal and a chip next to it: that's what the crystal oscillator in the above photo is. However, it will be much more expensive than plastic, especially if it needs to be large with lots of pins.

So you get a micro with a cheap plastic package, and a tiny crystal with a suitable package.

\$\endgroup\$
6
  • 10
    \$\begingroup\$ It appears the crystal in that oscillator was broken during disassembly, yes? It would normally be a perfect round disc for this type, I believe. \$\endgroup\$
    – Hearth
    Commented Nov 15, 2023 at 16:20
  • \$\begingroup\$ You can get RTC plastic DIP modules which are bulky and they integrate a tuning fork watch crystal and a backup lithium battery. Exactly same could be done with MCUs. \$\endgroup\$
    – Justme
    Commented Nov 15, 2023 at 16:26
  • 3
    \$\begingroup\$ @Hearth yes indeed! \$\endgroup\$
    – bobflux
    Commented Nov 15, 2023 at 17:07
  • \$\begingroup\$ @Justme I bet these contain a PCB with standard off the shelf parts. Also fun when the battery runs out before the 100 year calendar XD \$\endgroup\$
    – bobflux
    Commented Nov 15, 2023 at 17:09
  • 3
    \$\begingroup\$ @bobflux According to X-ray pics and teardows on the 'net, they are standard parts in PDIP package, with crystal and battery pins bent up, them soldered on, put into a plastic box and filled with epoxy resin. No PCB. \$\endgroup\$
    – Justme
    Commented Nov 15, 2023 at 17:32
10
\$\begingroup\$

The main reason is that MCUs and crystals use very different production processes. One is silicon etching in a photochemical process and the other is a mechanical machining one. Often you can't even integrate two silicon etching processes that use different materials. Analog and digital, for example, or MEMs.

It wouldn't make things cheaper. The reason things get cheaper when you integrate them onto a wafer is because it uses the same production process and the same wafer. That lets you get a two-for-one, but with a crystal you would just be building two things.

\$\endgroup\$
8
\$\begingroup\$

One issue with adding a crystal to a microcontroller is thermal considerations. The frequency of crystal oscillators varies with temperature, and they are typically tuned to be their designed frequency at 25°C.

Microcontrollers experience fairly rapid temperature changes as they wake up, do some work, and go back to sleep/idle. Thermally decoupling the crystal, and ideally encasing it in a package that has low conductivity for heat, helps produce an accurate frequency.

\$\endgroup\$
5
\$\begingroup\$
  1. Total system cost would be higher than with an external crystal.

The IC supplier would have to source the crystal from another supplier most likely, one who could guarantee supply over the life of the IC product at an acceptable price, mount it on a special leadframe prior to encapsulation. It would have to have its own packaging anyway to protect the crystal from the high pressure transfer molding. Chip area might have to be devoted to load capacitors. They would have to mark up the cost of the crystal and other extra costs. The overall package might have to be thicker or larger.

MEMs processes are making inroads in replacing quartz in some applications, not without some hiccups such as the infamous iPhone failures.

\$\endgroup\$
2
3
\$\begingroup\$

Mostly because no one else does, why make an obscure non-standard product which can't be easily replaced.

  1. Yes you could glue a crystal in top of MCU (or mold it inside the plastic package). It will be expensive and custom, and MCU would be bigger. And if you don't need the crystal, you would not buy this MCU, and so the MCU die would have to anyway contain the oscillator for crystal, and the RC oscillators.

  2. True - if you don't need the crystal you don't want to pay for a MCU with built-in crystal.

  3. True - You might have specific tolerance requirement over specific temperature range. So either you would have to manufacture MCUs with different tolerance and temperature ranges or have a very precise crystal which allows you to guarantee tolerance over temp range, but such crystals will be expensive.

  4. Likely not feasible within MCU but with crystal right next to MCU. You can have separate chips like memory bonded to MCU chips and they can be in same package, likely possible but crystals being larger and bulkier as they need a sealed package over them.

Crystals are not that big headache you think. I have yet failed to get a crystal ticking even if the layout has not looked like theoretical ideal world examples. Generally MCUs and other ICs that require a crystal say an example crystal with example parameters and tolerance requirements if necessary. You might even get an example part number for the crystal. Yes it is difficult to estimate the stray capacitance for ending up with a capacitor value, but with general purpose MCUs, the deviation due to load capacitance mismatch is generally insignificant for normal purposes.

\$\endgroup\$
2
\$\begingroup\$

In conclusion to the above answers ... (and because noone explicitly mentiones it):

Cost would go up, size of target market would shrink.

Why do something which increases design and production costs significantly, while making the product less flexible and more expensive?

In the case that a customer wants a uC at absolute minimum cost, and doesn't need crystal accuracy, the RC oscillator is just fine and production cost is minimised. (Often they also want low power operation, which goes well with an integrated RC oscillator.)

Where crystal accuracy is needed, the actual frequency is always going to be important, so an external crystal makes perfect sense.

Integrating the crystal with uC would be a lose-lose proposition from the marketing point of view. You would significantly increase the cost, while at the same time reducing the utility to customers.

\$\endgroup\$
1
\$\begingroup\$

CC2652RB is an example of a SimpleLink™ Crystal-less BAW Multiprotocol 2.4 GHz Wireless MCU.

The datasheet contains:

The SimpleLink™ CC2652RB device is the industry’s first multiprotocol 2.4 GHz wireless crystal-less microcontroller (MCU) with integrated TI Bulk Acoustic Wave (BAW) resonator technology supporting Thread, Zigbee®, Bluetooth® 5.2 Low Energy, IEEE 802.15.4, IPv6-enabled smart objects (6LoWPAN), proprietary systems, including the TI 15.4-Stack (2.4 GHz), and concurrent multiprotocol operation through the Dynamic Multiprotocol Manager (DMM) software driver Integrated BAW resonator technology eliminates the need for external crystals without compromising latency or frequency stability.

BAW resonator technology has some more information on this technology. However, doesn't seem to describe the feature size.

\$\endgroup\$
2
  • \$\begingroup\$ There are some specialty MCUs that include a MEMs oscillator, if I recall. \$\endgroup\$
    – DKNguyen
    Commented Nov 15, 2023 at 15:38
  • 4
    \$\begingroup\$ @DKNguyen IIUC, a number of oscillators marketed as MEMS are in fact that same FBAR (aka BAW) technology. (I'm not 100% certain, since I designed such oscillators academically, but never attempted to bring one to market) \$\endgroup\$
    – nanofarad
    Commented Nov 15, 2023 at 15:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.