OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 4099|回复: 6

例程主程序没有SystemInit,那串口通信没有配置外部时钟的必要么?

[复制链接]

85

主题

378

帖子

0

精华

高级会员

Rank: 4

积分
902
金钱
902
注册时间
2013-4-29
在线时间
87 小时
发表于 2015-11-10 09:14:03 | 显示全部楼层 |阅读模式
5金钱
例程主程序没有SystemInit,那串口通信没有配置外部时钟的必要么?全速运行发现CFGR2为0没有调用过SystemInit,那原子哥的程序使用的是内部时钟?

最佳答案

查看完整内容[请看2#楼]

3.5的库函数,systeminit在启动代码中就调用了啊!把时钟树都按默认配置好了
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

4

主题

19

帖子

0

精华

初级会员

Rank: 2

积分
68
金钱
68
注册时间
2015-10-12
在线时间
3 小时
发表于 2015-11-10 09:14:04 | 显示全部楼层
3.5的库函数,systeminit在启动代码中就调用了啊!把时钟树都按默认配置好了
回复

使用道具 举报

85

主题

378

帖子

0

精华

高级会员

Rank: 4

积分
902
金钱
902
注册时间
2013-4-29
在线时间
87 小时
 楼主| 发表于 2015-11-10 09:34:59 | 显示全部楼层
这样子啊 我把启动文件换了 我再看看谢谢
回复

使用道具 举报

85

主题

378

帖子

0

精华

高级会员

Rank: 4

积分
902
金钱
902
注册时间
2013-4-29
在线时间
87 小时
 楼主| 发表于 2015-11-10 09:37:14 | 显示全部楼层
;* Author          : MCD Application Team
;* Version         : V3.1.0
;* Date            : 06/19/2009
;* Description     : STM32F10x Connectivity line devices vector table for RVMDK 
;*                      toolchain. 
;*                      This module performs:
;*                      - Set the initial SP
;*                      - Set the initial C == Reset_Handler
;*                      - Set the vector table entries with the exceptions ISR address
;*                      - Branches to __main in the C library (which eventually
;*                        calls main()).
;*                      After Reset the CortexM3 processor is in Thread mode,
;*                      priority is rivileged, and the Stack is set to Main.
回复

使用道具 举报

85

主题

378

帖子

0

精华

高级会员

Rank: 4

积分
902
金钱
902
注册时间
2013-4-29
在线时间
87 小时
 楼主| 发表于 2015-11-10 09:37:38 | 显示全部楼层
;* Version         : V3.5.0
;* Date            : 11-March-2011
;* Description     : STM32F10x Connectivity line devices vector table for MDK-ARM 
;*                      toolchain. 
;*                      This module performs:
;*                      - Set the initial SP
;*                      - Set the initial C == Reset_Handler
;*                      - Set the vector table entries with the exceptions ISR address
;*                      - Configure the clock system
;*                      - Branches to __main in the C library (which eventually
;*                        calls main()).
;*                      After Reset the CortexM3 processor is in Thread mode,
;*                      priority is rivileged, and the Stack is set to Main.
回复

使用道具 举报

15

主题

786

帖子

5

精华

论坛大神

Rank: 7Rank: 7Rank: 7

积分
3223
金钱
3223
注册时间
2015-7-26
在线时间
811 小时
发表于 2015-11-10 11:09:57 | 显示全部楼层
; Reset handler
Reset_Handler   ROC
                EXPORT  Reset_Handler             [WEAK]
                IMPORT  __main
                IMPORT  SystemInit
                LDR     R0, =SystemInit
                BLX     R0               
                LDR     R0, =__main
                BX      R0
                ENDP


startup_stm32f10x_hd.s在进入main前就调用了systeminit,你可以看下你启动文件有没有这一步,没有的话你自己根据寄存器或库函数写一个就好了
我的博客:http://blog.csdn.net/itdo_just
回复

使用道具 举报

85

主题

378

帖子

0

精华

高级会员

Rank: 4

积分
902
金钱
902
注册时间
2013-4-29
在线时间
87 小时
 楼主| 发表于 2015-11-10 11:16:44 | 显示全部楼层
解决了,谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-6-19 20:43

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表