[mw_shl_code=c,true]void RCC_Init_t(void)
{
RCC->CFGR &= ~0x0003;
delay(10);
RCC->CR &= ~(1<<24);
RCC->

LLCFGR &= ~0x7fff;
RCC->

LLCFGR |= 0x8;
RCC->

LLCFGR |= (168<<6);
RCC->CR |= (1<<24);
delay(10);
RCC->CFGR |= 0x0002;
}[/mw_shl_code]
这是我的时钟初始化程序
[mw_shl_code=c,true]int main(void)
{
RCC_Init_t();
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE);
GPIOI_Init();
while(1)
{
i++;
GPIOE->ODR = ((i%2)<<2);
}
}[/mw_shl_code]
while循环里面只是将引脚高低点低平翻转,结果输出的只有3MHz。这是怎么回事。难道系统时钟不指while里面程序运行吗?
---------------------------------
主频不是指指令的执行速度吗?IO翻转不会50个时钟周期吧
一周热门 更多>