Macros | Functions
cs.h File Reference
#include "inc/hw_memmap.h"

Go to the source code of this file.

Macros

#define CS_CLOCK_DIVIDER_1   DIVM__1
 
#define CS_CLOCK_DIVIDER_2   DIVM__2
 
#define CS_CLOCK_DIVIDER_4   DIVM__4
 
#define CS_CLOCK_DIVIDER_8   DIVM__8
 
#define CS_CLOCK_DIVIDER_16   DIVM__16
 
#define CS_CLOCK_DIVIDER_32   DIVM__32
 
#define CS_ACLK   0x01
 
#define CS_MCLK   0x02
 
#define CS_SMCLK   0x04
 
#define CS_MODOSC   MODCLKREQEN
 
#define CS_XT1CLK_SELECT   SELM__XT1CLK
 
#define CS_VLOCLK_SELECT   SELM__VLOCLK
 
#define CS_DCOCLK_SELECT   SELM__DCOCLK
 
#define CS_XT2CLK_SELECT   SELM__XT2CLK
 
#define CS_XT1DRIVE_0   XT1DRIVE_0
 
#define CS_XT1DRIVE_1   XT1DRIVE_1
 
#define CS_XT1DRIVE_2   XT1DRIVE_2
 
#define CS_XT1DRIVE_3   XT1DRIVE_3
 
#define CS_XT2DRIVE_4MHZ_8MHZ   XT2DRIVE_0
 
#define CS_XT2DRIVE_8MHZ_16MHZ   XT2DRIVE_1
 
#define CS_XT2DRIVE_16MHZ_24MHZ   XT2DRIVE_2
 
#define CS_XT2DRIVE_24MHZ_32MHZ   XT2DRIVE_3
 
#define CS_XT2OFFG   XT2OFFG
 
#define CS_XT1OFFG   XT1OFFG
 
#define CS_DCORSEL_0   DCOFSEL_0
 
#define CS_DCORSEL_1   DCORSEL
 
#define CS_DCOFSEL_0   DCOFSEL_0
 
#define CS_DCOFSEL_1   DCOFSEL_1
 
#define CS_DCOFSEL_2   DCOFSEL_2
 
#define CS_DCOFSEL_3   DCOFSEL_3
 

Functions

void CS_setExternalClockSource (uint32_t baseAddress, uint32_t XT1CLK_frequency, uint32_t XT2CLK_frequency)
 Sets the external clock source. More...
 
void CS_clockSignalInit (uint32_t baseAddress, uint8_t selectedClockSignal, uint16_t clockSource, uint16_t clockSourceDivider)
 Initializes clock signal. More...
 
void CS_XT1Start (uint32_t baseAddress, uint16_t xt1drive)
 Initializes the XT1 crystal oscillator in low frequency mode. More...
 
void CS_bypassXT1 (uint32_t baseAddress)
 Bypasses the XT1 crystal oscillator. More...
 
bool CS_XT1StartWithTimeout (uint32_t baseAddress, uint16_t xt1drive, uint32_t timeout)
 Initializes the XT1 crystal oscillator in low frequency mode with timeout. More...
 
bool CS_bypassXT1WithTimeout (uint32_t baseAddress, uint32_t timeout)
 Bypasses the XT1 crystal oscillator with timeout. More...
 
void CS_XT1Off (uint32_t baseAddress)
 Stops the XT1 oscillator using the XT1OFF bit. More...
 
void CS_XT2Start (uint32_t baseAddress, uint16_t xt2drive)
 Starts the XT2 crystal. More...
 
void CS_bypassXT2 (uint32_t baseAddress)
 Bypasses the XT2 crystal oscillator. More...
 
bool CS_XT2StartWithTimeout (uint32_t baseAddress, uint16_t xt2drive, uint32_t timeout)
 Initializes the XT2 crystal oscillator with timeout. More...
 
bool CS_bypassXT2WithTimeout (uint32_t baseAddress, uint32_t timeout)
 Bypasses the XT2 crystal oscillator with timeout. More...
 
void CS_XT2Off (uint32_t baseAddress)
 Stops the XT2 oscillator using the XT2OFF bit. More...
 
void CS_enableClockRequest (uint32_t baseAddress, uint8_t selectClock)
 Enables conditional module requests. More...
 
void CS_disableClockRequest (uint32_t baseAddress, uint8_t selectClock)
 Disables conditional module requests. More...
 
uint8_t CS_faultFlagStatus (uint32_t baseAddress, uint8_t mask)
 Gets the current CS fault flag status. More...
 
void CS_clearFaultFlag (uint32_t baseAddress, uint8_t mask)
 Clears the current CS fault flag status for the masked bit. More...
 
uint32_t CS_getACLK (uint32_t baseAddress)
 Get the current ACLK frequency. More...
 
uint32_t CS_getSMCLK (uint32_t baseAddress)
 Get the current SMCLK frequency. More...
 
uint32_t CS_getMCLK (uint32_t baseAddress)
 Get the current MCLK frequency. More...
 
uint16_t CS_clearAllOscFlagsWithTimeout (uint32_t baseAddress, uint32_t timeout)
 Clears all the Oscillator Flags. More...
 
void CS_setDCOFreq (uint32_t baseAddress, uint16_t dcorsel, uint16_t dcofsel)
 Set DCO frequency. More...
 

Macro Definition Documentation

#define CS_CLOCK_DIVIDER_1   DIVM__1

Referenced by CS_clockSignalInit().

#define CS_CLOCK_DIVIDER_2   DIVM__2

Referenced by CS_clockSignalInit().

#define CS_CLOCK_DIVIDER_4   DIVM__4

Referenced by CS_clockSignalInit().

#define CS_CLOCK_DIVIDER_8   DIVM__8

Referenced by CS_clockSignalInit().

#define CS_CLOCK_DIVIDER_16   DIVM__16

Referenced by CS_clockSignalInit().

#define CS_CLOCK_DIVIDER_32   DIVM__32

Referenced by CS_clockSignalInit().

#define CS_ACLK   0x01
#define CS_MCLK   0x02
#define CS_SMCLK   0x04
#define CS_MODOSC   MODCLKREQEN
#define CS_XT1CLK_SELECT   SELM__XT1CLK

Referenced by CS_clockSignalInit().

#define CS_VLOCLK_SELECT   SELM__VLOCLK

Referenced by CS_clockSignalInit().

#define CS_DCOCLK_SELECT   SELM__DCOCLK

Referenced by CS_clockSignalInit().

#define CS_XT2CLK_SELECT   SELM__XT2CLK

Referenced by CS_clockSignalInit().

#define CS_XT1DRIVE_0   XT1DRIVE_0
#define CS_XT1DRIVE_1   XT1DRIVE_1
#define CS_XT1DRIVE_2   XT1DRIVE_2
#define CS_XT1DRIVE_3   XT1DRIVE_3
#define CS_XT2DRIVE_4MHZ_8MHZ   XT2DRIVE_0

Referenced by CS_XT2Start().

#define CS_XT2DRIVE_8MHZ_16MHZ   XT2DRIVE_1

Referenced by CS_XT2Start().

#define CS_XT2DRIVE_16MHZ_24MHZ   XT2DRIVE_2

Referenced by CS_XT2Start().

#define CS_XT2DRIVE_24MHZ_32MHZ   XT2DRIVE_3
#define CS_XT2OFFG   XT2OFFG
#define CS_XT1OFFG   XT1OFFG
#define CS_DCORSEL_0   DCOFSEL_0

Referenced by CS_setDCOFreq().

#define CS_DCORSEL_1   DCORSEL

Referenced by CS_setDCOFreq().

#define CS_DCOFSEL_0   DCOFSEL_0

Referenced by CS_setDCOFreq().

#define CS_DCOFSEL_1   DCOFSEL_1

Referenced by CS_setDCOFreq().

#define CS_DCOFSEL_2   DCOFSEL_2

Referenced by CS_setDCOFreq().

#define CS_DCOFSEL_3   DCOFSEL_3

Referenced by CS_setDCOFreq().


Copyright 2013, Texas Instruments Incorporated