1
\$\begingroup\$

I am working on a very small device and would like to use the Atmel SAM D20 as MCU (this variant ATSAMD20E16).

Reading the data sheet, there is only one point I do not find clearly spelled out:

Do I need a crystal to run this MCU at 48 MHz?

I found, there are various internal clock sources. Also the feature list states "Internal and external clock options with 48 MHz Digital Frequency Locked Loop". But interestingly every existing design I checked had an crystal added to the board.

For my device, the clock can be imprecise.

\$\endgroup\$
1
  • \$\begingroup\$ Pretty much all microcontrollers have built-in PLL/FLL nowadays. The crystal is not there to get the 48MHz, but to get clock accuracy. \$\endgroup\$
    – Lundin
    Sep 21, 2017 at 11:16

3 Answers 3

3
\$\begingroup\$

From the SAMD20 datasheet, you have the internal 8MHz RC clock.

This can be routed to the generic clock multiplexer 0, which is used as source for the DFLL48M.

Please note that the RC oscillator could be imprecise (EDIT: precision is greatly improved by loading factory calibration parameters), so it will be the DFLL, but you stated that you can live with this.

To increase accuracy, you can use the 32768 Hz oscillator (with a 32768 Hz external crystal) and the DFLL.

On SAMD21 (i.e. not your case), you can also use the USB start of frame (1ms) as synchronization (in device mode), without having to use any crystal!

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Thank you for pointing out the location in the data sheet where you found this. It seems I completely missed this section. \$\endgroup\$
    – Flovdis
    Sep 21, 2017 at 10:15
  • \$\begingroup\$ In the SAMD/C/L series the RC oscillator can be tuned with factory tuning figures taking from special register locations, allowing anything but USB High Speed to work perfectly fine from the RC. \$\endgroup\$
    – Asmyldof
    Sep 21, 2017 at 11:14
2
\$\begingroup\$

Page 162-163, System Controller feature overview:

Digital Frequency Locked Loop (DFLL48M)

– Internal oscillator with no external components

– 48MHz output frequency

– Operates standalone as a high-frequency programmable oscillator in open loop mode

– Operates as an accurate frequency multiplier against a known frequency in closed loop mode

In closed loop mode you can use the internal oscillator as a known frequency or an external crystal which provides more accurate frequency than the internal oscillator.

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

No, you do not need a crystal.

This MCU has a build-in 8 MHz oscillator and a "48MHz Digital Frequency Locked Loop", I would call that a PLL. The PLL can convert that 8 MHz into 48 MHz (it multiplies the frequency by a factor 6).

I do not believe you would ever need a 48 MHz crystal for this MCU as 48 MHz crystals are not so common and some are "overtone crystals" meaning they're actually 16 MHz crystals that can be used at their 3rd overtone which is 48 MHz. But forget that, it is inconvenient and not needed here.

The designs you have seen that are using a crystal are probably using an 8 MHz crystal and then the internal PLL is used to make 48 MHz from that.

You could do the same. Then you would have an accurate clock and you can do accurate timing with that clock.

You can also opt to use the internal 8 MHz oscillator, do realize that that is not an accurate oscillator! That 8 MHz will vary over time and with temperature. So if you would use this as a basis for an alarm clock, don't be surprised if the clock is a few minutes off after only a day.

If you need accurate timing: use an 8 MHz crystal

If you don't care about timing accuracy: you could use the internal oscillator.

In both cases you can run the MCU at 48 Mhz using the PLL.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ The OP does not mention 48 MHz crystal just "a crystal" for running the board on 48 MHz, which could be a 8 MHz one just as you said. \$\endgroup\$ Sep 21, 2017 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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