How can I enable the internal Crystal load capacitors with processor expert? Which register are to be changed to enable the internal capacitors in steps if we do not use processor expert?
Hi Tahir Mahmood
If you want to use them you have to load them by the OSC Control Register. They are distributed in 2, 4, 8 and 16 pF, in the less 4 bits of the registers (the most significant bits are to enable the external reference) and you can add them by setting the bit in 1. Hence, for example if you want to load 20 pF you can add the 16 pF and the 4 pF so you could use either:
/* OSC_CR: ERCLKEN=1,EREFSTEN=0,SC2P=0,SC4P=1,SC8P=0,SC16P=1 */ OSC0_CR = OSC_CR_ERCLKEN_MASK | OSC_CR_SC4P_MASK | OSC_CR_SC16P_MASK;
or
OSC0_CR = 0x85;
or in if you want to load the 30 pF then you have to add them all and you should do something like:
OSC0_CR = 0x8F;
Hope this information helps and please tell us if you have any question related.
Have a great day.
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Vazquez,
Thanks for your reply. Can you also tell me what is the default value of this capacitor? How can I calculate the value of capacitors? Is it correct to calculate the value of the capacitor with the following formula
Each capacitor C1 = C2 = 2 x (load capacitance – parasitic capacitance)
Mit freundlichen Grüßen / Best Regards
Tahir Mahmood
MSc.
Entwicklung Elektronik
Von: jorge_a_vazquez
Gesendet: Samstag, 25. Juni 2016 00:59
An: Mahmood, Tahir
Betreff: Re: - Internal crystal load capacitors
NXP Community <https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>
Internal crystal load capacitors
reply from Jorge Antonio Alcala Vazquez<https://community.nxp.com/people/jorge_a_vazquez?et=watches.email.thread> in Kinetis Microcontrollers - View the full discussion<https://community.nxp.com/message/805739?et=watches.email.thread#comment-805739>
You can try to calculate(!), but in reality you will be 'guessing', and the only way to really optimize is to synchronize your RTC to timeanddate.com, then check in 24hrs (ideally 25C the whole time!). If you are within 1s, you have made it to +/-11.6ppm and that's as good as you can expect! If your application expects a 'more extensive' average temperature excursion in operation, you might want to optimize 'room temp' at 10-15ppm 'fast' as at 0 and 50C your oscillation will be 22ppm 'slower' (most of these watch crystals have -.035ppm/Tsquared tempco).
I use 20pF on a 12.5pF +/-10ppm xtal ABS07AIG-32.768KHZ-1-T.