Tool/software:
Hi all,
currently I am about to enable FCL to achieve a higher accuracy of the clock. According to the datasheet I understand that either the internal or the external reference resistor could be used for this.
In the newest TI driverlib 2.04.00.06 I can see two functions for internal and external resistor in the "dl_sysctl_mspm0gx51x.h" header file for this:
/**
* @brief Enable Frequency Correction Loop (FCL) in Internal Resistor Mode
*
* Once FCL is enable, it cannot be disabled by software. A BOOTRST is required.
*/
__STATIC_INLINE void DL_SYSCTL_enableSYSOSCFCL(void)
{
SYSCTL->SOCLOCK.SYSOSCFCLCTL =
(SYSCTL_SYSOSCFCLCTL_KEY_VALUE | SYSCTL_SYSOSCFCLCTL_SETUSEFCL_TRUE);
}
/**
* @brief Enable Frequency Correction Loop (FCL) in External Resistor Mode
*
* Used to increase SYSOSC accuracy. An ROSC reference resistor which is suitable
* to meet application accuracy reqiurements must be placed between ROSC pin and
* device ground (VSS).
*
* Once FCL is enable, it cannot be disabled by software. A BOOTRST is required.
*
* Power consumption of SYSOSC will be marginally higher with FCL enabled due to
* reference current which flows through ROSC.
* Settling time from startup to specified accuracy may also be longer.
* See device-specific datasheet for startup times.
*/
__STATIC_INLINE void DL_SYSCTL_enableSYSOSCFCLExternalResistor(void)
{
SYSCTL->SOCLOCK.SYSOSCFCLCTL =
(SYSCTL_SYSOSCFCLCTL_KEY_VALUE | SYSCTL_SYSOSCFCLCTL_SETUSEFCL_TRUE);
}
However, these two functions do exactly the same. According to the reference manual if the external reference resistor shall be used, the bit SETUSEEXRES must be set.
Our preferred solution is to use FCL with the internal reference resistor. Therefore I have two questions:
1. Why the functions in the TI driverlib are identical?
2. Isn´t it necessary to set bit SETUSEEXRES when the external reference resistor shall be used? If not, how to choose between internal and external?
Thank you in advance!
Best regards,
Holger