之前用M0516外部晶振可以工作,目前换成M058内部晶振,但是IO不受控,代码如下,请帮忙分析
int main (void)
{
static char Rex = 0;
char i;
/* SYSCLK =>12Mhz*/
UNLOCKREG();
/* Enable high external clock and use it as system clock (HCLK) */
DrvSYS_Open(OSC22M_CLK);//(XTL_CLK);
while (DrvSYS_GetChipClockSourceStatus(OSC22M_CLK) != 1);
IO_Init();
while(1)
{
test_led();
}
}
|