21ic问答首页 - NUC972配置管脚输出高频时钟CLK_OUT异常
NUC972配置管脚输出高频时钟CLK_OUT异常
QZXHT19882021-12-10
最近学着使用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输出
}
{
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输出
}
赞0
评论
2022-01-27
赞0
评论
2022-01-07
赞0
评论
2022-01-05
赞0
评论
2022-01-04
赞0
评论
2022-01-04
赞0
评论
2022-01-04
赞0
评论
2022-01-04
赞0
评论
2022-01-04
赞0
评论
2022-01-04
您需要登录后才可以回复 登录 | 注册