最近学着使用NUC972,使用GPIO可以点亮LED,但是无法输出CLK_OUT,这个是怎么回事?求助void clk_out_config(clk_freq FREQ)
{
setReg32(REG_CLK_PCLKEN0,getReg32(REG_CLK_PCLKEN0) | (1<<3)); //Enable GPIO engin clock.
setReg32(REG_CLK_HCLKEN,getReg32(REG_CLK_HCLKEN) | (1<<5)); //使能PCLK AHB时钟,默认PCLK为75Mhz
setReg32(REG_SYS_GPG_MFPH,getReg32(REG_SYS_GPG_MFPH) | (15<<24));//配置为CLK_OUT
setReg32(REG_CLK_DIVCTL7,getReg32(REG_CLK_DIVCTL7) | (1<<4));//配置分频因子
GPIO_OpenBit(GPIOG,BIT14, DIR_OUTPUT, NO_PULL_UP);//配置PG4输出
} |