如题,下载了官方的demo,进入main函数没看见有初始化配置时钟的部分,但是却能打印出系统时钟是120Mhz,有摸索过的老铁,如果有空劳您宝贵时间给解答一二
/* configure systick */
systick_config();
/* initilize the LEDs, USART and key */
/* enable the led clock */
rcu_periph_clock_enable(RCU_GPIOB);
/* configure led GPIO port */
gpio_init(GPIOB, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ,GPIO_PIN_12);
gpio_bit_write(GPIOB,GPIO_PIN_12,SET);
gd_eval_com_init(EVAL_COM0);
/* print out the clock frequency of system, AHB, APB1 and APB2 */
printf("\r\nCK_SYS is %d", rcu_clock_freq_get(CK_SYS));
printf("\r\nCK_AHB is %d", rcu_clock_freq_get(CK_AHB));
printf("\r\nCK_APB1 is %d", rcu_clock_freq_get(CK_APB1));
printf("\r\nCK_APB2 is %d", rcu_clock_freq_get(CK_APB2));
main函数在这了,这里打印的信息看到时钟是120Mhz,但是main函数没有任何配置时钟的代码,怎么就直接配置到了120M呢? |