Macros | Functions
cs.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <ti/devices/msp432p4xx/inc/msp.h>

Go to the source code of this file.

Macros

#define CS_CLOCK_DIVIDER_1   CS_CTL1_DIVS_0
 
#define CS_CLOCK_DIVIDER_2   CS_CTL1_DIVS_1
 
#define CS_CLOCK_DIVIDER_4   CS_CTL1_DIVS_2
 
#define CS_CLOCK_DIVIDER_8   CS_CTL1_DIVS_3
 
#define CS_CLOCK_DIVIDER_16   CS_CTL1_DIVS_4
 
#define CS_CLOCK_DIVIDER_32   CS_CTL1_DIVS_5
 
#define CS_CLOCK_DIVIDER_64   CS_CTL1_DIVS_6
 
#define CS_CLOCK_DIVIDER_128   CS_CTL1_DIVS_7
 
#define CS_LFXTCLK_SELECT   CS_CTL1_SELM_0
 
#define CS_HFXTCLK_SELECT   CS_CTL1_SELM_5
 
#define CS_VLOCLK_SELECT   CS_CTL1_SELM_1
 
#define CS_REFOCLK_SELECT   CS_CTL1_SELM_2
 
#define CS_DCOCLK_SELECT   CS_CTL1_SELM_3
 
#define CS_MODOSC_SELECT   CS_CTL1_SELM_4
 
#define CS_KEY   0x695A
 
#define CS_ACLK_DIV_BITPOS   0x04
 
#define CS_MCLK_DIV_BITPOS   0x0C
 
#define CS_SMCLK_DIV_BITPOS   0x00
 
#define CS_HSMCLK_DIV_BITPOS   0x08
 
#define CS_ACLK_SRC_BITPOS   0x08
 
#define CS_MCLK_SRC_BITPOS   0x00
 
#define CS_SMCLK_SRC_BITPOS   0x04
 
#define CS_HSMCLK_SRC_BITPOS   0x04
 
#define CS_REFO_32KHZ   0x00
 
#define CS_REFO_128KHZ   0x01
 
#define CS_VLOCLK_FREQUENCY   10000
 
#define CS_MODCLK_FREQUENCY   24000000
 
#define CS_LFXT_FAULT   CS_IE_LFXTIE
 
#define CS_HFXT_FAULT   CS_IE_HFXTIE
 
#define CS_DCO_OPEN_FAULT   CS_IE_DCOR_OPNIE
 
#define CS_STARTCOUNT_LFXT_FAULT   CS_IE_FCNTLFIE
 
#define CS_STARTCOUNT_HFXT_FAULT   CS_IE_FCNTHFIE
 
#define CS_DCO_SHORT_FAULT   CS_IFG_DCOR_SHTIFG
 
#define CS_HFXT_DRIVE   CS_CTL2_HFXTDRIVE
 
#define CS_HFXT_BYPASS   CS_CTL2_HFXTBYPASS
 
#define CS_LFXT_DRIVE0   CS_CTL2_LFXTDRIVE_0
 
#define CS_LFXT_DRIVE1   CS_CTL2_LFXTDRIVE_1
 
#define CS_LFXT_DRIVE2   CS_CTL2_LFXTDRIVE_2
 
#define CS_LFXT_DRIVE3   CS_CTL2_LFXTDRIVE_3
 
#define CS_LFXT_BYPASS   CS_CTL2_LFXTBYPASS
 
#define CS_ACLK   CS_CLKEN_ACLK_EN
 
#define CS_MCLK   CS_CLKEN_MCLK_EN
 
#define CS_SMCLK   CS_CLKEN_SMCLK_EN
 
#define CS_HSMCLK   CS_CLKEN_HSMCLK_EN
 
#define CS_BCLK   CS_STAT_BCLK_READY
 
#define CS_LFXTCLK   0x01
 
#define CS_1MHZ   1000000
 
#define CS_15MHZ   1500000
 
#define CS_3MHZ   3000000
 
#define CS_4MHZ   4000000
 
#define CS_6MHZ   6000000
 
#define CS_8MHZ   8000000
 
#define CS_12MHZ   12000000
 
#define CS_16MHZ   16000000
 
#define CS_24MHZ   24000000
 
#define CS_32MHZ   32000000
 
#define CS_40MHZ   40000000
 
#define CS_48MHZ   48000000
 
#define CS_DCO_FREQUENCY_1_5   CS_CTL0_DCORSEL_0
 
#define CS_DCO_FREQUENCY_3   CS_CTL0_DCORSEL_1
 
#define CS_DCO_FREQUENCY_6   CS_CTL0_DCORSEL_2
 
#define CS_DCO_FREQUENCY_12   CS_CTL0_DCORSEL_3
 
#define CS_DCO_FREQUENCY_24   CS_CTL0_DCORSEL_4
 
#define CS_DCO_FREQUENCY_48   CS_CTL0_DCORSEL_5
 
#define CS_HFXT_FAULT_COUNTER   0x01
 
#define CS_LFXT_FAULT_COUNTER   0x02
 
#define CS_FAULT_COUNTER_4096_CYCLES   CS_CTL3_FCNTLF_0
 
#define CS_FAULT_COUNTER_8192_CYCLES   CS_CTL3_FCNTLF_1
 
#define CS_FAULT_COUNTER_16384_CYCLES   CS_CTL3_FCNTLF_2
 
#define CS_FAULT_COUNTER_32768_CYCLES   CS_CTL3_FCNTLF_3
 
#define CS_OVER32MHZ   0x01
 
#define CS_UNDER32MHZ   0x02
 

Functions

void CS_setExternalClockSourceFrequency (uint32_t lfxt_XT_CLK_frequency, uint32_t hfxt_XT_CLK_frequency)
 
void CS_initClockSignal (uint32_t selectedClockSignal, uint32_t clockSource, uint32_t clockSourceDivider)
 
bool CS_startHFXT (bool bypassMode)
 
bool CS_startHFXTWithTimeout (bool bypassMode, uint32_t timeout)
 
bool CS_startLFXT (uint32_t xtDrive)
 
bool CS_startLFXTWithTimeout (uint32_t xtDrive, uint32_t timeout)
 
void CS_setReferenceOscillatorFrequency (uint8_t referenceFrequency)
 
void CS_enableClockRequest (uint32_t selectClock)
 
void CS_disableClockRequest (uint32_t selectClock)
 
uint32_t CS_getACLK (void)
 
uint32_t CS_getSMCLK (void)
 
uint32_t CS_getMCLK (void)
 
uint32_t CS_getBCLK (void)
 
uint32_t CS_getHSMCLK (void)
 
void CS_setDCOCenteredFrequency (uint32_t dcoFreq)
 
void CS_setDCOFrequency (uint32_t dcoFrequency)
 
void CS_tuneDCOFrequency (int16_t tuneParameter)
 
void CS_enableDCOExternalResistor (void)
 
void CS_disableDCOExternalResistor (void)
 
void CS_setDCOExternalResistorCalibration (uint_fast8_t uiCalData, uint_fast8_t freqRange)
 
uint32_t CS_getDCOFrequency (void)
 
void CS_enableFaultCounter (uint_fast8_t counterSelect)
 
void CS_disableFaultCounter (uint_fast8_t counterSelect)
 
void CS_resetFaultCounter (uint_fast8_t counterSelect)
 
void CS_startFaultCounter (uint_fast8_t counterSelect, uint_fast8_t countValue)
 
void CS_enableInterrupt (uint32_t flags)
 
void CS_disableInterrupt (uint32_t flags)
 
uint32_t CS_getEnabledInterruptStatus (void)
 
uint32_t CS_getInterruptStatus (void)
 
void CS_clearInterruptFlag (uint32_t flags)
 
void CS_registerInterrupt (void(*intHandler)(void))
 
void CS_unregisterInterrupt (void)
 

Copyright 2018, Texas Instruments Incorporated