2
\$\begingroup\$

I am in the process of doing more work on ARM platforms (specifically for this example the Atmel SAMD10 Cortex M0+ line). The clock flexibility and lack of ridiculous fuse settings feels like a (very much overdue) breath of fresh air.

However, I am completely ignorant as to the design compromises at play when considering which crystal frequency to choose and how much to then use the PLL to achieve my target instruction clock.

As an example, let's suppose that my main instruction cycle limitation is that I want to implement a 5Mbps UART using the SAMD10. I want to ensure that instruction cycles are ideally an integer subdivision of the UART bitclock. So I might choose a 20MHz crystal with no PLL multipler - 4 instruction cycles per UART bit and 0 error (theoretically). This all seems fine - 20MHz is a very common crystal value, which should mean good availability and low cost.

But then again 32.768kHz is pretty common - and it seems logical that the crystal oscillator might draw less current at a lower frequency - but I would then need a 1525.9x PLL multiplier to get a 50MHz instruction clock (the fractional PLL outputs only between 48MHz and 96MHz on this MCU). Would this give me worse timing jitter? Is a 1525.9x PLL multiplier big, or well within what you should expect to work for a modern MCU?

How do others choose their crystal / PLL multiplier values in a situation like this?

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Datasheet! atmel.com/Images/Atmel-42242-SAM-D10_Datasheet.pdf : says page 134 "48MHz to 96MHz output clock frequency, 32KHz to 2MHz input reference clock frequency range". So neither of your suggested options will work. \$\endgroup\$
    – pjc50
    Commented Oct 13, 2015 at 15:53
  • \$\begingroup\$ OK, good spot, I'll edit the question to have it make more sense! \$\endgroup\$
    – stefandz
    Commented Oct 13, 2015 at 15:55

1 Answer 1

1
\$\begingroup\$

Having got the datasheet, I'll now give a more general answer as to how I'd approach it:

Firstly, do you need a precise frequency in the first place? There is a certain amount of slack in most applications and you can probably just use one of the internal oscillators. I see this part provides a 32khz RTC oscillator and a 48MHz (USB2) one.

Secondly, is there something that does need a precise frequency that I can use as an input? For example, PAL video or USB. If I have to use a crystal, I don't want to have to add another crystal to the BOM if possible.

If I've got a free choice, pick a crystal in the middle of the operating range of the PLL which is cheap.

Smaller divider values are better for jitter, but check your fractional PLL's available fractions.

For your specific application of a UART, it's common to oversample because there may be jitter on the other end. So you might want a sampling frequency x3 or more times line speed.

\$\endgroup\$

Your Answer

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

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