本来今天打算学习GPIO的,但看了相关的文档和案例后,发现跟系统的时钟有关联,所以今天先学习时钟这章节
我是一个比较浮躁的人,需要什么看什么,所以直接翻开案例文档,主函数第一个条语句就是InitSysCtrl(),所以今晚先分析F2802x_SysCtrl.c这个文件
首先看下系统时钟初始化函数InitSysCtrl()这个函数包含哪些内容:
void InitSysCtrl(void)
{
// Disable the watchdog
DisableDog();
// *IMPORTANT*
// The Device_cal function, which copies the ADC & oscillator calibration values
// from TI reserved OTP into the appropriate trim registers, occurs automatically
// in the Boot ROM. If the boot ROM code is bypassed during the debug process, the
// following function MUST be called for the ADC and oscillators to function according
// to specification. The clocks to the ADC MUST be enabled before calling this
// function.
// See the device data manual and/or the ADC Reference
// Manual for more information.