打印
[STM32F1]

AFIO时钟何时开启

[复制链接]
199|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
beacherblack|  楼主 | 2024-2-29 08:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
答:因为要对寄存器进行读写!而在STM32中对寄存器的读写都是要打开寄存器对应的时钟才可以的【就像人一样,有了跳动的脉搏手臂才能有能量才能进行各种动作】。
接下来:跟AFIO相关的寄存器有哪些呢?
应用:在usart1串口通信没有端口重映射时为什么不打开AFIO时钟?PA9、PA10作为通用I/O口也复用了,为什么不打开为什么不打开复用时钟?
To optimize the number of peripherals available for the 64-pin or the 100-pin or the 144-pin package, it is possible to remap some alternate functions to some other pins. This is achieved by software, by programming the AF remap and debug I/O configuration register(AFIO_MAPR) on page 159. In this case, the alternate functions are no longer mapped to their original assignations.

可见AFIO就设计用来remap some alternate functions to some other pins的,所以根本就没有什么“复用”之说,看来都是翻译惹的祸!另外看一下I/O复用时的情况就更清楚了

使用特权

评论回复
沙发
zwsam| | 2024-2-29 08:56 | 只看该作者

使用特权

评论回复
板凳
caoenq| | 2024-2-29 13:31 | 只看该作者
各个系列不一样,F4和F1就不一样

使用特权

评论回复
地板
Henryko| | 2024-2-29 22:50 | 只看该作者
那这个复用应该改成什么啊

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

12

主题

1111

帖子

1

粉丝