Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 8 months ago.
KL05 crystal selection and setup
I am designing a circuit using the KL05 and want to make sure I use the correct 32.768kHz crystal and loading. The FRDM-KL05Z schematic does not have any crystal load capacitors and this makes sense as the KL05 has settable internal capacitors which are set using the OSC0_CR register. When I look at mbed-src however, it appears the internal load capacitors are not enabled. I do not know which 32.768kHz crystal Freescale has used so don't know which bits to set.
Is mbed-src correct for the crystal used by Freescale? If so, which crystal is it (or at least what are its loading specs)?
Thanks, Tom
1 Answer
9 years, 8 months ago.
The crystal and capacitors are fitted to the board and are the default set up, check the platform page and schematic diagram. The capacitors are 12pF, you can set the registers (see page 376 of the manual) to use these instead of external capacitors on your circuit. Almost any 32.768 crystal will do, loading specs are normally given by the manufacture. Better quality crystals are more accurate if you want to use the RTC to keep time.
The FRDM-KL05Z schematic has the capacitors marked as "DNP" which means do not populate and I checked the board and as expected there are no capacitors. I checked the Freescale site (I guess I should have done this before posting) and found the BOM. The crystal is ABS25-32.768KHZ-T which has a loading capacitance of 12.5pF. So it seems mbed-sirc should have the load capacitor enabled. In some cases if the load is wrong, the crystal will not start, but this clearly is not a problem here. Also, the timekeeping accuracy can also be affected. I found this article by Texas Instruments about RTC accuracy: www.ti.com/lit/an/slaa225/slaa225.pdf
Tom
posted by 02 Mar 2015Checked my two KL05 boards and they do not have the loading capacitors either. Although they work okay as you say but it may be an idea to set the oscillator registers to give it some loading. I have made a couple of prototype PCB's and did add the 12pf capacitors. I will get the Mbed library updated to add the MCU loading capacitors as this is the board default.
posted by 02 Mar 2015
Paul
Do you know if the mbed library was updated to handle no capacitors on the crystal?
Thanks, Tom
posted by Tom Russell 30 May 2015