[AT32F407] 这是配置时钟,还是GPIO

[复制链接]
 楼主| kiwis66 发表于 2021-10-8 09:33 | 显示全部楼层 |阅读模式




  1. /**
  2.   * [url=home.php?mod=space&uid=247401]@brief[/url]  Config Clock Out Function.
  3.   * @param  None
  4.   * @retval None
  5.   */
  6. void MCO_Config(void)
  7. {
  8.   GPIO_InitType GPIO_InitStructure;
  9.   RCC_APB2PeriphClockCmd(RCC_APB2PERIPH_GPIOA, ENABLE);

  10.   GPIO_InitStructure.GPIO_Pins = GPIO_Pins_8;
  11.   GPIO_InitStructure.GPIO_MaxSpeed = GPIO_MaxSpeed_50MHz;
  12.   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  13.   GPIO_Init(GPIOA, &GPIO_InitStructure);

  14.   /*PA8输出PLL/4*/
  15.   RCC_CLKOUTConfig(RCC_CLKOUT_PLL_Div4, RCC_MCOPRE_1);
  16. }
这个函数,
MCO是什么意思?
感觉是在配置GPIO,怎么函数功能是Config Clock Out Function.

评论

MCO的意思是main clock out,即PA8脚输出相关时钟用于调试。  发表于 2021-10-8 15:57
6552918 发表于 2021-10-8 10:33 | 显示全部楼层
GPIO_Mode_AF_PP  IO复用,用于输出内部时钟
foxsbig 发表于 2021-10-8 10:51 | 显示全部楼层
一般应该不会用吧,只是为了让你测试了解,有这个功能
weifeng90 发表于 2021-10-9 08:15 来自手机 | 显示全部楼层
这是配置IO输出时钟功能
 楼主| kiwis66 发表于 2021-10-14 13:30 | 显示全部楼层
就是传说中的,把系统时钟输出来呗
huquanz711 发表于 2021-10-15 08:19 来自手机 | 显示全部楼层
这配置时钟输出
您需要登录后才可以回帖 登录 | 注册

本版积分规则

189

主题

1183

帖子

2

粉丝
快速回复 返回顶部 返回列表