105的配置
CLK_SWCR =0x02;
CLK_SWR = 0xE1; // 选择HSI 为主时钟源
CLK_CKDIVR = 0x08; //CPU时钟 = 主时钟 = 8MHZ
PD_DDR =0Xff;//PD0口CCO输出
PD_CR1 =0XFF;
PD_CR2 =0X01;
CLK_CCOR = 0x00;
CLK_CCOR =0x08;
CLK_CCOR |=0x01;
103配置
CLK_SWCR =0x02;
CLK_SWR = 0xE1; // 选择HSI 为主时钟源
CLK_CKDIVR = 0x08; //CPU时钟 = 主时钟 = 8MHZ
PC_DDR =0Xff;//PC4口CCO输出
PC_CR1 =0XFF;
PC_CR2 =0X10;
CLK_CCOR = 0x00;
CLK_CCOR =0x08;
CLK_CCOR |=0x01;
|