MSP430 DriverLib for MSP430FR2xx_4xx Devices  2.91.13.01
cs

Macros

#define CS_VLOCLK_FREQUENCY   10000
 
#define CS_REFOCLK_FREQUENCY   32768
 
#define CS_DCO_RANGE_1MHZ   1000000
 
#define CS_DCO_RANGE_2MHZ   2000000
 
#define CS_DCO_RANGE_4MHZ   4000000
 
#define CS_DCO_RANGE_8MHZ   8000000
 
#define CS_DCO_RANGE_12MHZ   12000000
 
#define CS_DCO_RANGE_16MHZ   16000000
 
#define CS_DCO_RANGE_20MHZ   20000000
 
#define CS_DCO_RANGE_24MHZ   24000000
 

Functions

void CS_setExternalClockSource (uint32_t XT1CLK_frequency)
 Sets the external clock source. More...
 
void CS_initClockSignal (uint8_t selectedClockSignal, uint16_t clockSource, uint16_t clockSourceDivider)
 Initializes a clock signal. More...
 
void CS_turnOnXT1LF (uint16_t xt1Drive)
 Intializes the XT1 crystal oscillator in low frequency mode. More...
 
void CS_bypassXT1 (void)
 Bypass the XT1 crystal oscillator. More...
 
bool CS_turnOnXT1LFWithTimeout (uint16_t xt1Drive, uint16_t timeout)
 Initializes the XT1 crystal oscillator in low frequency mode with timeout. More...
 
bool CS_bypassXT1WithTimeout (uint16_t timeout)
 Bypasses the XT1 crystal oscillator with time out. More...
 
void CS_turnOffXT1 (void)
 Stops the XT1 oscillator using the XT1AUTOOFF bit. More...
 
void CS_turnOnXT1HF (uint16_t xt1Drive, uint16_t xt1HFFreq)
 Intializes the XT1 crystal oscillator in high frequency mode. More...
 
bool CS_turnOnXT1HFWithTimeout (uint16_t xt1Drive, uint16_t xt1HFFreq, uint16_t timeout)
 Initializes the XT1 crystal oscillator in high frequency mode with timeout. More...
 
void CS_turnOnSMCLK (void)
 Turn On SMCLK. More...
 
void CS_turnOffSMCLK (void)
 Turn Off SMCLK. More...
 
void CS_enableVLOAutoOff (void)
 VLO is turned off when not used. More...
 
void CS_disableVLOAutoOff (void)
 VLO is always on. More...
 
bool CS_initFLLSettle (uint16_t fsystem, uint16_t ratio)
 Initializes the DCO to operate a frequency that is a multiple of the reference frequency into the FLL. More...
 
bool CS_initFLL (uint16_t fsystem, uint16_t ratio)
 Initializes the DCO to operate a frequency that is a multiple of the reference frequency into the FLL. This function performs DCO Factory Trim. More...
 
bool CS_initFLLCalculateTrim (uint16_t fsystem, uint16_t ratio, CS_initFLLParam *param)
 Performs same function as initFLLSettle in addition to setting the proper DCOFTRIM according to clock frequency. This function performs DCO Software Trim and saves the trim value into initFLLParam. More...
 
bool CS_initFLLLoadTrim (uint16_t fsystem, uint16_t ratio, CS_initFLLParam *param)
 Performs same function as initFLLCalculateTrim without the overhead of calculating the trim, but rather using the one specified in param. This function corresponds with the DCO Software Trim. More...
 
void CS_enableClockRequest (uint8_t selectClock)
 Enables conditional module requests. More...
 
void CS_disableClockRequest (uint8_t selectClock)
 Disables conditional module requests. More...
 
uint8_t CS_getFaultFlagStatus (uint8_t mask)
 Gets the current CS fault flag status. More...
 
void CS_clearFaultFlag (uint8_t mask)
 Clears the current CS fault flag status for the masked bit. More...
 
uint32_t CS_getACLK (void)
 Get the current ACLK frequency. More...
 
uint32_t CS_getSMCLK (void)
 Get the current SMCLK frequency. More...
 
uint32_t CS_getMCLK (void)
 Get the current MCLK frequency. More...
 
uint16_t CS_clearAllOscFlagsWithTimeout (uint16_t timeout)
 Clears all the Oscillator Flags. More...
 
void CS_enableXT1AutomaticGainControl (void)
 Enables XT1 automatic gain control. More...
 
void CS_disableXT1AutomaticGainControl (void)
 Disables XT1 automatic gain control. More...
 
void CS_enableFLLUnlock (void)
 Enables FLL unlock interrupt. More...
 
void CS_disableFLLUnlock (void)
 Disables FLL unlock interrupt. More...
 
void CS_enableREFOLP (void)
 Enable low-power REFO. More...
 
void CS_disableREFOLP (void)
 Disable low-power REFO. More...
 
bool CS_getREFOLP (void)
 Get status of low-power REFO. More...
 
void CS_enableXT1FaultOff (void)
 Turns off switching from XT1 to REFO when XT1 fails. More...
 
void CS_disableXT1FaultOff (void)
 Turns on switching from XT1 to REFO when XT1 fails. More...
 
bool CS_getXT1FaultOff (void)
 Get status of XT1 fault switching. More...
 
bool CS_getREFOReady (void)
 Get status indication of low-power REFO switching. More...
 

Detailed Description

Function Documentation

§ CS_bypassXT1()

void CS_bypassXT1 ( void  )

Bypass the XT1 crystal oscillator.

Bypasses the XT1 crystal oscillator. Loops until all oscillator fault flags are cleared, with no timeout.

Modified bits of SFRIFG1 register, bits of CSCTL7 register and bits of CSCTL6 register.

Returns
None

§ CS_bypassXT1WithTimeout()

bool CS_bypassXT1WithTimeout ( uint16_t  timeout)

Bypasses the XT1 crystal oscillator with time out.

Bypasses the XT1 crystal oscillator with time out. Loops until all oscillator fault flags are cleared or until a timeout counter is decremented and equals to zero.

Parameters
timeoutis the count value that gets decremented every time the loop that clears oscillator fault flags gets executed.

Modified bits of SFRIFG1 register, bits of CSCTL7 register and bits of CSCTL6 register.

Returns
STATUS_SUCCESS or STATUS_FAIL

§ CS_clearAllOscFlagsWithTimeout()

uint16_t CS_clearAllOscFlagsWithTimeout ( uint16_t  timeout)

Clears all the Oscillator Flags.

Parameters
timeoutis the count value that gets decremented every time the loop that clears oscillator fault flags gets executed.
Returns
The mask of the oscillator flag status Return Logical OR of any of the following:
  • CS_XT1OFFG XT1 oscillator fault flag
  • CS_DCOFFG DCO fault flag
  • CS_FLLULIFG FLL unlock interrupt flag
    indicating the status of the osciallator fault flags

§ CS_clearFaultFlag()

void CS_clearFaultFlag ( uint8_t  mask)

Clears the current CS fault flag status for the masked bit.

Parameters
maskis the masked interrupt flag status to be returned. mask parameter can be any one of the following Valid values are:
  • CS_XT1OFFG - XT1 oscillator fault flag
  • CS_DCOFFG - DCO fault flag
  • CS_FLLULIFG - FLL unlock interrupt flag

Modified bits of CSCTL7 register.

Returns
None

§ CS_disableClockRequest()

void CS_disableClockRequest ( uint8_t  selectClock)

Disables conditional module requests.

Parameters
selectClockselects specific request disable Valid values are:
  • CS_ACLK
  • CS_MCLK
  • CS_SMCLK
  • CS_MODOSC

Modified bits of CSCTL8 register.

Returns
None

§ CS_disableFLLUnlock()

void CS_disableFLLUnlock ( void  )

Disables FLL unlock interrupt.

Modified bits are FLLULIE of CSCTL7 register.

Returns
None

§ CS_disableREFOLP()

void CS_disableREFOLP ( void  )

Disable low-power REFO.

Modified bits are REFOLP of CSCTL3 register.

Returns
None

§ CS_disableVLOAutoOff()

void CS_disableVLOAutoOff ( void  )

VLO is always on.

Returns
None

§ CS_disableXT1AutomaticGainControl()

void CS_disableXT1AutomaticGainControl ( void  )

Disables XT1 automatic gain control.

Modified bits of CSCTL6 register.

Returns
None

§ CS_disableXT1FaultOff()

void CS_disableXT1FaultOff ( void  )

Turns on switching from XT1 to REFO when XT1 fails.

Modified bits are XT1FAULTOFF of CSCTL6 register.

Returns
None

§ CS_enableClockRequest()

void CS_enableClockRequest ( uint8_t  selectClock)

Enables conditional module requests.

Parameters
selectClockselects specific request enables Valid values are:
  • CS_ACLK
  • CS_MCLK
  • CS_SMCLK
  • CS_MODOSC

Modified bits of CSCTL8 register.

Returns
None

§ CS_enableFLLUnlock()

void CS_enableFLLUnlock ( void  )

Enables FLL unlock interrupt.

Modified bits are FLLULIE of CSCTL7 register.

Returns
None

§ CS_enableREFOLP()

void CS_enableREFOLP ( void  )

Enable low-power REFO.

Modified bits are REFOLP of CSCTL3 register.

Returns
None

§ CS_enableVLOAutoOff()

void CS_enableVLOAutoOff ( void  )

VLO is turned off when not used.

Returns
None

§ CS_enableXT1AutomaticGainControl()

void CS_enableXT1AutomaticGainControl ( void  )

Enables XT1 automatic gain control.

Modified bits of CSCTL6 register.

Returns
None

§ CS_enableXT1FaultOff()

void CS_enableXT1FaultOff ( void  )

Turns off switching from XT1 to REFO when XT1 fails.

Modified bits are XT1FAULTOFF of CSCTL6 register.

Returns
None

§ CS_getACLK()

uint32_t CS_getACLK ( void  )

Get the current ACLK frequency.

Get the current ACLK frequency. The user of this API must ensure that CS_setExternalClockSource API was invoked before in case XT1 is being used.

Returns
Current ACLK frequency in Hz

§ CS_getFaultFlagStatus()

uint8_t CS_getFaultFlagStatus ( uint8_t  mask)

Gets the current CS fault flag status.

Parameters
maskis the masked interrupt flag status to be returned. Mask parameter can be either any of the following selection. Valid values are:
  • CS_XT1OFFG - XT1 oscillator fault flag
  • CS_DCOFFG - DCO fault flag
  • CS_FLLULIFG - FLL unlock interrupt flag

Modified bits of CSCTL7 register.

Returns
The current flag status for the corresponding masked bit

§ CS_getMCLK()

uint32_t CS_getMCLK ( void  )

Get the current MCLK frequency.

Get the current MCLK frequency. The user of this API must ensure that CS_setExternalClockSource API was invoked before in case XT1 is being used.

Returns
Current MCLK frequency in Hz

§ CS_getREFOLP()

bool CS_getREFOLP ( void  )

Get status of low-power REFO.

Returns
Get status of low-power REFO.

§ CS_getREFOReady()

bool CS_getREFOReady ( void  )

Get status indication of low-power REFO switching.

Returns
Get status indication of low-power REFO switching.

§ CS_getSMCLK()

uint32_t CS_getSMCLK ( void  )

Get the current SMCLK frequency.

Get the current SMCLK frequency. The user of this API must ensure that CS_setExternalClockSource API was invoked before in case XT1 is being used.

Returns
Current SMCLK frequency in Hz

§ CS_getXT1FaultOff()

bool CS_getXT1FaultOff ( void  )

Get status of XT1 fault switching.

Returns
Get status of XT1 fault switching.

§ CS_initClockSignal()

void CS_initClockSignal ( uint8_t  selectedClockSignal,
uint16_t  clockSource,
uint16_t  clockSourceDivider 
)

Initializes a clock signal.

This function initializes each of the clock signals. The user must ensure that this function is called for each clock signal. If not, the default state is assumed for the particular clock signal. Please check the device specific data sheet for details on the following: Some devices do not support divider settings for CS_FLLREF. VLO is only a valid clock source for ACLK on some devices.

Parameters
selectedClockSignalselected clock signal Valid values are:
  • CS_ACLK
  • CS_MCLK
  • CS_SMCLK
  • CS_FLLREF
clockSourceis clock source for the selectedClockSignal Valid values are:
  • CS_XT1CLK_SELECT
  • CS_VLOCLK_SELECT
  • CS_REFOCLK_SELECT
  • CS_DCOCLKDIV_SELECT
clockSourceDividerselected the clock divider to calculate clocksignal from clock source. Valid values are:
  • CS_CLOCK_DIVIDER_1 [Default] - [Valid for CS_FLLREF, CS_MCLK, CS_ACLK, CS_SMCLK]
  • CS_CLOCK_DIVIDER_2 - [Valid for CS_MCLK, CS_SMCLK]
  • CS_CLOCK_DIVIDER_4 - [Valid for CS_MCLK, CS_SMCLK]
  • CS_CLOCK_DIVIDER_8 - [Valid for CS_MCLK, CS_SMCLK]
  • CS_CLOCK_DIVIDER_16 - [Valid for CS_MCLK, CS_ACLK]
  • CS_CLOCK_DIVIDER_32 - [Valid for CS_FLLREF, CS_MCLK, CS_ACLK]
  • CS_CLOCK_DIVIDER_64 - [Valid for CS_FLLREF, CS_MCLK, CS_ACLK]
  • CS_CLOCK_DIVIDER_128 - [Valid for CS_FLLREF, CS_MCLK, CS_ACLK]
  • CS_CLOCK_DIVIDER_256 - [Valid for CS_FLLREF, CS_ACLK]
  • CS_CLOCK_DIVIDER_384 - [Valid for CS_FLLREF, CS_ACLK]
  • CS_CLOCK_DIVIDER_512 - [Valid for CS_FLLREF, CS_ACLK]
  • CS_CLOCK_DIVIDER_768 - [Valid for CS_FLLREF, CS_ACLK] [Only available in 24MHz clock system] [If CS_ACLK, 24 MHz preference]
  • CS_CLOCK_DIVIDER_1024 - [Valid for CS_FLLREF, CS_ACLK] [Only available in 24MHz clock system] [If CS_ACLK, 32 MHz preference]
  • CS_CLOCK_DIVIDER_108 - [Valid for CS_ACLK] [Only available in 24MHz clock system] [If CS_ACLK, 3.5712 MHz preference]
  • CS_CLOCK_DIVIDER_338 - [Valid for CS_ACLK] [Only available in 24MHz clock system] [If CS_ACLK, 11.0592 MHz preference]
  • CS_CLOCK_DIVIDER_414 - [Valid for CS_ACLK] [Only available in 24MHz clock system] [If CS_ACLK, 13.56 MHz preference]
  • CS_CLOCK_DIVIDER_640 - [Valid for CS_FLLREF, CS_ACLK] [Only available in 24MHz clock system] [If CS_ACLK, 20.00 MHz preference]

Modified bits of CSCTL3 register, bits of CSCTL5 register and bits of CSCTL4 register.

Returns
None

§ CS_initFLL()

bool CS_initFLL ( uint16_t  fsystem,
uint16_t  ratio 
)

Initializes the DCO to operate a frequency that is a multiple of the reference frequency into the FLL. This function performs DCO Factory Trim.

Initializes the DCO to operate a frequency that is a multiple of the reference frequency into the FLL. Loops until all oscillator fault flags are cleared, with a timeout. If the frequency is greater than clock system allows, the function sets the MCLK and SMCLK source to the undivided DCO frequency and returns false. Otherwise, the function sets the MCLK and SMCLK source to the DCOCLKDIV frequency.

Parameters
fsystemis the target frequency for MCLK in kHz
ratiois the ratio x/y, where x = fsystem and y = FLL reference frequency.

Modified bits of CSCTL1 register, bits of CSCTL0 register, bits of CSCTL2 register, bits of CSCTL4 register, bits of CSCTL7 register and bits of SFRIFG1 register.

Returns
True if successful, false if unsuccessful and resorted to undivided DCO frequency for MCLK and SMCLK source

Referenced by CS_initFLLSettle().

§ CS_initFLLCalculateTrim()

bool CS_initFLLCalculateTrim ( uint16_t  fsystem,
uint16_t  ratio,
CS_initFLLParam param 
)

Performs same function as initFLLSettle in addition to setting the proper DCOFTRIM according to clock frequency. This function performs DCO Software Trim and saves the trim value into initFLLParam.

Initializes the DCO to operate a frequency that is a multiple of the reference frequency into the FLL. Loops until all oscillator fault flags are cleared, with a timeout. If the frequency is greater than clock system allows, the function sets the MCLK and SMCLK source to the undivided DCO frequency and returns false. Otherwise, the function sets the MCLK and SMCLK source to the DCOCLKDIV frequency. This function executes a software delay that is proportional in length to the ratio of the target FLL frequency and the FLL reference. It also calibrates the DCOFTRIM value according to clock frequency. Lastly, it saves the DCOTAP and DCOFTRIM values for future use.

Parameters
fsystemis the target frequency for MCLK in kHz
ratiois the ratio x/y, where x = fsystem and y = FLL reference frequency.

Modified bits of CSCTL1 register, bits of CSCTL0 register, bits of CSCTL2 register, bits of CSCTL4 register, bits of CSCTL7 register and bits of SFRIFG1 register.

Returns
True if successful, false if unsuccessful and resorted to undivided DCO frequency for MCLK and SMCLK source

References CS_initFLLParam::fsystem.

§ CS_initFLLLoadTrim()

bool CS_initFLLLoadTrim ( uint16_t  fsystem,
uint16_t  ratio,
CS_initFLLParam param 
)

Performs same function as initFLLCalculateTrim without the overhead of calculating the trim, but rather using the one specified in param. This function corresponds with the DCO Software Trim.

Initializes the DCO to operate a frequency that is a multiple of the reference frequency into the FLL. Loops until all oscillator fault flags are cleared, with a timeout. If the frequency is greater than clock system allows, the function sets the MCLK and SMCLK source to the undivided DCO frequency and returns false. Otherwise, the function sets the MCLK and SMCLK source to the DCOCLKDIV frequency. This function executes a software delay that is proportional in length to the ratio of the target FLL frequency and the FLL reference. Lastly, it uses the saved DCOTAP and DCOFTRIM values from the param to avoid overhead in recalculation.

Parameters
fsystemis the target frequency for MCLK in kHz
ratiois the ratio x/y, where x = fsystem and y = FLL reference frequency.

Modified bits of CSCTL1 register, bits of CSCTL0 register, bits of CSCTL2 register, bits of CSCTL4 register, bits of CSCTL7 register and bits of SFRIFG1 register.

Returns
True if initialization successful, false if saved DCOFTRIM value is not for the correct clock frequency combination or resorted to undivided DCO frequency for MCLK and SMCLK source

References CS_initFLLParam::csCtl0, CS_initFLLParam::csCtl1, and CS_initFLLParam::fsystem.

§ CS_initFLLSettle()

bool CS_initFLLSettle ( uint16_t  fsystem,
uint16_t  ratio 
)

Initializes the DCO to operate a frequency that is a multiple of the reference frequency into the FLL.

Initializes the DCO to operate a frequency that is a multiple of the reference frequency into the FLL. Loops until all oscillator fault flags are cleared, with a timeout. If the frequency is greater than clock system allows, the function sets the MCLK and SMCLK source to the undivided DCO frequency and returns false. Otherwise, the function sets the MCLK and SMCLK source to the DCOCLKDIV frequency. This function executes a software delay that is proportional in length to the ratio of the target FLL frequency and the FLL reference.

Parameters
fsystemis the target frequency for MCLK in kHz
ratiois the ratio x/y, where x = fsystem and y = FLL reference frequency.

Modified bits of CSCTL1 register, bits of CSCTL0 register, bits of CSCTL2 register, bits of CSCTL4 register, bits of CSCTL7 register and bits of SFRIFG1 register.

Returns
True if successful, false if unsuccessful and resorted to undivided DCO frequency for MCLK and SMCLK source

References CS_initFLL().

§ CS_setExternalClockSource()

void CS_setExternalClockSource ( uint32_t  XT1CLK_frequency)

Sets the external clock source.

This function sets the external clock sources XT1 crystal oscillator frequency values. This function must be called if an external crystal XT1 is used and the user intends to call CS_getMCLK, CS_getSMCLK or CS_getACLK APIs. If not, it is not necessary to invoke this API.

Parameters
XT1CLK_frequencyis the XT1 crystal frequencies in Hz
Returns
None

§ CS_turnOffSMCLK()

void CS_turnOffSMCLK ( void  )

Turn Off SMCLK.

Returns
None

§ CS_turnOffXT1()

void CS_turnOffXT1 ( void  )

Stops the XT1 oscillator using the XT1AUTOOFF bit.

Modified bits are XT1AUTOOFF of CSCTL6 register.

Returns
None

§ CS_turnOnSMCLK()

void CS_turnOnSMCLK ( void  )

Turn On SMCLK.

Returns
None

§ CS_turnOnXT1HF()

void CS_turnOnXT1HF ( uint16_t  xt1Drive,
uint16_t  xt1HFFreq 
)

Intializes the XT1 crystal oscillator in high frequency mode.

Initializes the XT1 crystal oscillator in high frequency mode. Loops until all oscillator fault flags are cleared, with no timeout. See the device- specific data sheet for appropriate drive settings.

Parameters
xt1Driveis the target drive strength for the XT1 crystal oscillator. Valid values are:
  • CS_XT1_DRIVE_0
  • CS_XT1_DRIVE_1
  • CS_XT1_DRIVE_2
  • CS_XT1_DRIVE_3 [Default]
    Modified bits are XT1DRIVE of UCSCTL6 register.
xt1HFFreqis the high frequency range selection. Valid values are:
  • CS_XT1_HFFREQ_1MHZ_4MHZ [Default] - 1 MHz to 4 MHz
  • CS_XT1_HFFREQ_4MHZ_6MHZ - Above 4 MHz to 6 MHz
  • CS_XT1_HFFREQ_6MHZ_16MHZ - Above 6 MHz to 16 MHz
  • CS_XT1_HFFREQ_16MHZ_24MHZ - Above 16 MHz to 24 MHz (Only available in 24MHz clock system)
Returns
None

§ CS_turnOnXT1HFWithTimeout()

bool CS_turnOnXT1HFWithTimeout ( uint16_t  xt1Drive,
uint16_t  xt1HFFreq,
uint16_t  timeout 
)

Initializes the XT1 crystal oscillator in high frequency mode with timeout.

Initializes the XT1 crystal oscillator in high frequency mode with timeout. Loops until all oscillator fault flags are cleared or until a timeout counter is decremented and equals to zero. See the device-specific datasheet for appropriate drive settings.

Parameters
xt1Driveis the target drive strength for the XT1 crystal oscillator. Valid values are:
  • CS_XT1_DRIVE_0
  • CS_XT1_DRIVE_1
  • CS_XT1_DRIVE_2
  • CS_XT1_DRIVE_3 [Default]
xt1HFFreqis the high frequency range selection. Valid values are:
  • CS_XT1_HFFREQ_1MHZ_4MHZ [Default] - 1 MHz to 4 MHz
  • CS_XT1_HFFREQ_4MHZ_6MHZ - Above 4 MHz to 6 MHz
  • CS_XT1_HFFREQ_6MHZ_16MHZ - Above 6 MHz to 16 MHz
  • CS_XT1_HFFREQ_16MHZ_24MHZ - Above 16 MHz to 24 MHz (Only available in 24MHz clock system)
timeoutis the count value that gets decremented every time the loop that clears oscillator fault flags gets executed.

Modified bits of SFRIFG1 register, bits of CSCTL7 register and bits of CSCTL6 register.

Returns
STATUS_SUCCESS or STATUS_FAIL

§ CS_turnOnXT1LF()

void CS_turnOnXT1LF ( uint16_t  xt1Drive)

Intializes the XT1 crystal oscillator in low frequency mode.

Initializes the XT1 crystal oscillator in low frequency mode. Loops until all oscillator fault flags are cleared, with no timeout. See the device- specific data sheet for appropriate drive settings.

Parameters
xt1Driveis the target drive strength for the XT1 crystal oscillator. Valid values are:
  • CS_XT1_DRIVE_0
  • CS_XT1_DRIVE_1
  • CS_XT1_DRIVE_2
  • CS_XT1_DRIVE_3 [Default]
    Modified bits are XT1DRIVE of UCSCTL6 register.
Returns
None

§ CS_turnOnXT1LFWithTimeout()

bool CS_turnOnXT1LFWithTimeout ( uint16_t  xt1Drive,
uint16_t  timeout 
)

Initializes the XT1 crystal oscillator in low frequency mode with timeout.

Initializes the XT1 crystal oscillator in low frequency mode with timeout. Loops until all oscillator fault flags are cleared or until a timeout counter is decremented and equals to zero. See the device-specific datasheet for appropriate drive settings.

Parameters
xt1Driveis the target drive strength for the XT1 crystal oscillator. Valid values are:
  • CS_XT1_DRIVE_0
  • CS_XT1_DRIVE_1
  • CS_XT1_DRIVE_2
  • CS_XT1_DRIVE_3 [Default]
timeoutis the count value that gets decremented every time the loop that clears oscillator fault flags gets executed.

Modified bits of SFRIFG1 register, bits of CSCTL7 register and bits of CSCTL6 register.

Returns
STATUS_SUCCESS or STATUS_FAIL

Copyright 2020, Texas Instruments Incorporated