你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。
chrome
firefox
safari
ie8及以上
ST
意法半导体官网
STM32
中文官网
ST
全球论坛
登录/注册
首页
技术问答
话题
资源
创客秀
视频
标签
积分商城
每日签到
请问 stm32f103 外部晶体 何时工作?
[复制链接]
不思
提问时间:2016-5-14 17:41 /
没有下载程序的stm32f103最小系统上电,晶体上没测到波形,二脚都是低电平,是否正常?
谢谢!
赞
0
收藏
0
评论
5
分享
发布时间:2016-5-14 17:41
举报
请先
登录
后回复
5个回答
不思
回答时间:2016-5-14 17:43:53
a0a.1 32b0c
中文手册第57页:
HSE晶体可以通过设置时钟控制寄存器里RCC_CR中的HSEON位被启动和关闭。
赞
0
评论
回复
支持
反对
五哥1
回答时间:2018-5-27 23:54:57
a0a.1 32b0c
你要 在主程序里设置呀,不然程序不知道你要用外置还是内置的
评分
参与人数
1
蝴蝶豆
+2
收起
理由
zero99
+ 2
查看全部评分
赞
0
评论
回复
支持
反对
andey
回答时间:2018-5-28 15:59:37
a0a.1 32b0c
提示:
作者被禁止或删除 内容自动屏蔽
赞
0
评论
回复
支持
反对
STM1024
回答时间:2018-5-28 17:24:00
a0a.1 32b0c
本帖最后由 stm1024 于 2018-5-28 17:25 编辑
首先,你要选择HSE……
建议你先看看版本为3.5的标准库,system_stm32f10x.c这个文件,最开始的描述是这样的:
/*
* 1. This file provides two functions and one global variable to be called from
* user application:
* - SystemInit(): Setups the system clock (System clock source, PLL Multiplier
* factors, AHB/APBx prescalers and Flash settings).
* This function is called at startup just after reset and
* before branch to main program. This call is made inside
* the "startup_stm32f10x_xx.s" file.
*
* - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
* by the user application to setup the SysTick
* timer or configure other parameters.
*
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
* be called whenever the core clock is changed
* during program execution.
*
* 2. After each device reset the HSI (8 MHz) is used as system clock source.
* Then SystemInit() function is called, in "startup_stm32f10x_xx.s" file, to
* configure the system clock before to branch to main program.
*
* 3. If the system clock source selected by user fails to startup, the SystemInit()
* function will do nothing and HSI still used as system clock source. User can
* add some code to deal with this issue inside the SetSysClock() function.
*
* 4. The default value of HSE crystal is set to 8 MHz (or 25 MHz, depedning on
* the product used), refer to "HSE_VALUE" define in "stm32f10x.h" file.
* When HSE is used as system clock source, directly or through PLL, and you
* are using different crystal you have to adapt the HSE value to your own
* configuration.
*/
复制代码
以前我们在3.5之前的标准库里面,总要在main中调用一下SystemInit(),但是在3.5中,此项工作在启动代码中执行。
文件“startup_stm32f10x_xx.s“中的SystemInit()函数在所有设备会在进入main之前配置系统时钟,如果配置失败,HSI还是作为系统时钟源。
检查一下你的代码,是否有这个过程,如果有的话,最好调试一下看看代码挂在哪里了。
评分
参与人数
1
蝴蝶豆
+4
收起
理由
zero99
+ 4
查看全部评分
赞
0
评论
回复
支持
反对
电子星辰
回答时间:2018-5-29 09:53:12
a0a.1 32b0c
不管寄存器,标准库还是HAL库,我们要使用外部高速时钟都是需要在程序里设置代码的。没有程序的stm32f103应该是默认就没有使用外部晶振的,所以晶体本来就没工作。
评分
参与人数
1
蝴蝶豆
+2
收起
理由
zero99
+ 2
查看全部评分
赞
0
评论
回复
支持
反对
所属标签
相似问题
关于
意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
微信公众号
手机版
快速回复
返回顶部
返回列表
HSE晶体可以通过设置时钟控制寄存器里RCC_CR中的HSEON位被启动和关闭。
评分
查看全部评分
首先,你要选择HSE……
建议你先看看版本为3.5的标准库,system_stm32f10x.c这个文件,最开始的描述是这样的:
文件“startup_stm32f10x_xx.s“中的SystemInit()函数在所有设备会在进入main之前配置系统时钟,如果配置失败,HSI还是作为系统时钟源。
检查一下你的代码,是否有这个过程,如果有的话,最好调试一下看看代码挂在哪里了。
评分
查看全部评分
评分
查看全部评分