在线时间4 小时
UID3108909
ST金币0
蝴蝶豆0
注册时间2015-3-20
初级会员
- 最后登录
- 2018-6-1
|
发表于 2018-6-1 14:51:42
|
显示全部楼层
回帖奖励 +1 ST金币
a0a.1 288b0c
用这些的好处是省事,坏处但是不清楚原理。手册有详细描述的,把RCC_CR寄存器HSEON关了就可以。
sing the HSE or LSE oscillator pins as GPIOs
When the HSE or LSE oscillator is switched OFF (default state after reset), the related
oscillator pins can be used as normal GPIOs.
When the HSE or LSE oscillator is switched ON (by setting the HSEON or LSEON bit in the
RCC_CSR register) the oscillator takes control of its associated pins and the GPIO
configuration of these pins has no effect.
When the oscillator is configured in a user external clock mode, only the pin is reserved for
clock input and the OSC_OUT or OSC32_OUT pin can still be used as normal GPIO. |
|