新手请教STM32f030的PF0的问题

2019-07-14 13:17发布

STM32f030F4  20脚的MCU,GPIO不够,因此想把当晶振用的PF0 和PF1 也用了
看文档写的:
Using 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 OSC_IN or OSC32_IN pin is reserved for clock input and the OSC_OUT or OSC32_OUT pin can still be used as normal GPIO.

已经:
#define PLL_SOURCE_HSI        // HSI (~8MHz) used to clock the PLL, and the PLL is used as system clock source
//#define PLL_SOURCE_HSE        // HSE (8MHz) used to clock the PLL, and the PLL is used as system clock source
//#define PLL_SOURCE_HSE_BYPASS // HSE bypassed with an external clock (8MHz, coming from ST-Link) used to clock

选择为内部RC振荡器,但是PF0 还是不能用,有哪位大虾知道否?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
18条回答
送终鸡酒
1楼-- · 2019-07-15 11:34
 精彩回答 2  元偷偷看……
Sabrina_cc
2楼-- · 2019-07-15 12:11
RCC_CSR 中的HSEON 和LSEON 直接清零呢
lan23
3楼-- · 2019-07-15 18:06
回复第 10 楼 于2014-04-01 20:32:16发表:
RCC_CSR 中的HSEON 和LSEON 直接清零呢 

抱歉,回复晚了,找自己的帖子找不到了
HSEON LSEON 都清零了,也不好使,有没有人用成过?
现在都没信心弄这个了
freesea123
4楼-- · 2019-07-15 18:07
你翻一下固件库,有参考的代码么
哈哈哈哈嘻嘻
5楼-- · 2019-07-15 18:55
准备用F051的PF脚,但还没有用.
你可以:
查一个GPIO的配置函数.
里面应该有描述:
if (GPIOx == GPIOF)
或相关的,
其实只要有:库基本可以找到用法,及配置方法
只是建议
东少2016
6楼-- · 2019-07-15 23:44
 精彩回答 2  元偷偷看……

一周热门 更多>