[STM32F1] AFIO时钟何时开启

[复制链接]
762|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 | 显示全部楼层
那这个复用应该改成什么啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

16

主题

1540

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部