//*****************************************************************************
#include "driverlib.h"
//*****************************************************************************
//
//Target frequency for MCLK in kHz
//
//*****************************************************************************
#define UCS_MCLK_DESIRED_FREQUENCY_IN_KHZ 24000
//*****************************************************************************
//
//MCLK/FLLRef Ratio
//
//*****************************************************************************
#define UCS_MCLK_FLLREF_RATIO 6
//*****************************************************************************
//
//Variable to store current Clock values
//
//*****************************************************************************
uint32_t clockValue = 0;
//*****************************************************************************
//
//Variable to store status of Oscillator fault flags
//
//*****************************************************************************
//*****************************************************************************
//
//XT1 Crystal Frequency being used
//
//*****************************************************************************
#define UCS_XT1_CRYSTAL_FREQUENCY 32768
//*****************************************************************************
//
//XT2 Crystal Frequency being used
//
//*****************************************************************************
#define UCS_XT2_CRYSTAL_FREQUENCY 4000000
//*****************************************************************************
//
//Desired Timeout for XT1 initialization
//
//*****************************************************************************
#define UCS_XT1_TIMEOUT 50000
#define TIMER_PERIOD 399
#define DUTY_CYCLE 100
#define UCS_XT2_TIMEOUT 50000
uint16_t status;
uint8_t returnValue = 0;
void main (void)
{
//Stop WDT
WDT_A_hold(WDT_A_BASE);
//Set VCore = 1 for 12MHz clock
PMM_setVCore(PMM_CORE_LEVEL_1);//主频提高后,VCore电压也需要随之配置
//Initializes the XT1 and XT2 crystal frequencies being used
UCS_setExternalClockSource(UCS_XT1_CRYSTAL_FREQUENCY,UCS_XT2_CRYSTAL_FREQUENCY);//设置外部时钟源的频率,没什么实际设定