What to expect from STM32 clock outputs ? - Page 1
Forum section: electronics / beginners

author: Koen
author_rank: Frequent Contributor
timestamp: December 22, 2016, 03:38:27 pm
content: Hello,a new design will need 26MHz (MCU, USB, GPS) and 32MHz (RF) input clocks. It is easy and cheap to find quality 0.5ppm 26MHz oscillators. It is impossible for 32MHz. I was thinking of using the clock output of the STM32 to produce this 32MHz oscillation from the 26MHz oscillator. ((26MHz / 26) * 192) / 6 = 32MHz. Is there a catch ?What equipment could I use to make sure this solution is equal or better than a 32MHz 15ppm crystal ?Thank you very much,Koen

author: Koen
author_rank: Frequent Contributor
timestamp: December 22, 2016, 08:22:15 pm
content: Thank you very much for your answer. I have the holidays to figure this out. Is an oscilloscope enough to verify jitter ?I went scouting ST documentation for "jitter" and found this interesting bit :QuoteYet, all I ever seen from ST demos is 1MHz VCO input frequency (8MHz crystal / 8 PLLM or 25MHz crystal / 25 PLLM).It seems I can do ((26MHz TCXO / 13 PLLM = 2MHz VCO) * 96 PLLI2SN) / 6 PLLI2SR = 32MHz.The "RF" is an SX1276 chip using LoRa modulation which boast the feature of not needing a high-tolerance oscillator. They recommend 10ppm crystals. I haven't found anything related to jitter in the datasheet nor the "oscillator guidance" document. Yet, this will be a six-layer board and every square mm counts which is the reason for this question. Thank you for your answer.

author: niekvs
author_rank: Contributor
timestamp: January 05, 2017, 12:51:40 pm
content: First of all, before going into complicated hacks like this, ask yourself the simple questionwhyit would be "easy and cheap" to find a "quality 0.5ppm" 26MHz oscillator and "impossible" to find one for 32MHz, even more considering 32MHz is a lot more common. Wouldn't you agree this is very hard to believe?You're probably making a false assumption. Where did you search for these oscillators and find this "0.5ppm" 26MHz oscillator? Can you point it out on digikey.com or mouser.com, and show the difference between them there?

author: Koen
author_rank: Frequent Contributor
timestamp: January 05, 2017, 03:36:36 pm
content: NT2016SA-26.000000MHZ-NBG2 and KT2520K26000ACW18TAS are both stocked at ~1.5USD / piece / 100 at Digikey and Mouser.Digikey added Taitien 0.5-1.5ppm 32MHz for < 3 USD / piece / 100 recently but their stock levels are low and I haven't found them anywhere else.

author: niekvs
author_rank: Contributor
timestamp: January 06, 2017, 08:54:33 am
content: Those are TCXO's (temperature compensated crystal oscillators), see more info here:http://www.radio-electronics.com/info/data/crystals/tcxo.phpYou can find those easily in 32MHz with comparable performance, e.g.:http://www.digikey.com/product-detail/en/epson/TG2016SBN-32.0000M-TCGNNM3/SER4167CT-ND/6238094Here's whole list of them:http://www.digikey.com/products/en/crystals-oscillators-resonators/oscillators/172?k=&pkeyword=&pv183=2633&pv139=1316&FV=ffe000ac&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=25In other words: there should be no need to come up with complicated "solutions" for using that 26MHz oscillator. By the way: what is the need for using such a high precision oscillator in your specific design?Good luck!

author: AndyC_772
author_rank: Super Contributor
timestamp: January 06, 2017, 09:27:33 am
content: Quote from: evb149 on December 22, 2016, 11:36:12 pmJust for the sake of completeness, I'd add that what this is really measuring is the combined jitter of the clock you're testing and the oscilloscope's own internal time base.The test result from a jittery clock measured with a perfect scope, and a perfect clock measured with a jittery scope, will be indistinguishable. The variation in position of an edge relative to the trigger point gives a measure of the extent to which the two clocks (one under test, one in the scope) disagree on the 'correct' position.Some scopes have excellent time bases and are designed to do this sort of thing. Most inexpensive bench scopes use a standard CMOS oscillator which can and will drift with time and temperature, coupled with a PLL which may or may not have good jitter performance (for any given application's definition of "good").

author: Koen
author_rank: Frequent Contributor
timestamp: January 06, 2017, 10:58:46 am
content: I don't understand your post niekvs. The one you directly linked isn't stocked. And the only one stocked in the list you provided is 5 USD / piece / 100.

author: niekvs
author_rank: Contributor
timestamp: January 06, 2017, 02:01:15 pm
content: Ok - it's not currently stocked, but you can still order it. You didn't say what kind of project you're working on, but in most cases having a good design is much more important than creating some hack based around the components you can get on any given day.But, if for some reason you want to use your stm32 to generate the clock, you can also choose to power your stm32 from a more common 8MHz or 16MHz TCXO. Like this:https://www.aliexpress.com/item/New-and-original-10PCS-FOX924B-16-000-Oscillator-TCXO-16MHz-1-5ppm-2-5ppm-15pF-HCMOS/32704990077.html?spm=2114.01010208.3.2.hoOlr1&ws_ab_test=searchweb0_0,searchweb201602_5_10065_10068_10000009_10084_10083_10080_10082_10081_10060_10062_10056_10055_10037_10054_10059_10032_10099_10078_10079_10077_426_10103_10073_10102_10096_10052_10053_10050_10107_10106_10051-10050,searchweb201603_3,afswitch_2,single_sort_0_price_asc&btsid=2eac3c09-bb30-474f-a8be-5c6244eebf89You can then use one of the timers on your stm32 to generate the 32MHz clock on one of the GPIOs. It should be a bit simpler than using a 26Mhz because it's a simple factor. As for jitter requirements, etc. that depends on your application. You'll have to check the stm32 datasheet and do some testing to see if it's acceptable