当前位置:网站首页>Points for attention in porting gd32 F4 series programs to gd32 F3 series
Points for attention in porting gd32 F4 series programs to gd32 F3 series
2022-07-07 15:38:00 【sgmcy】
1、 About the selection of assembly startup file :
The chip we use is GD32F303RGT6 , according to 《GD32F303xx_Datasheet_Rev1.4.pdf》, You can know the of the chip FLASH Its size is 1024KB , namely 1M.
according to GD32 Chinese manual description ,
GD32F303XX FLASH Size in 256K~512K It belongs to high-density products (GD32F30X_HD)
GD32F303XX FLASH Greater than 512K It belongs to ultra-high density products (GD32F30X_XD)
and GD32F305xx and GD32F307xx It belongs to interconnected products (GD32F30X_CL)
therefore , The assembly startup file we choose should be :startup_gd32f30x_xd.s
According to different product attributes , Choose assembly boot files with different suffixes
2、 The problem of adding macros to project settings
Add the following two macros to the project settings
USE_STDPERIPH_DRIVER,GD32F30X_XD
In the actual test , It is found that these two macros have not been added , Can also be compiled through , You can also debug when debugging .
And when debugging , By default, you enter GD32F30X_XD Macro control condition
Is it keil5 Is it so advanced ? This macro can be automatically opened according to the chip ? But gd32f30x.h It is clearly required to open the corresponding macro .
No matter what , For the sake of safety , Manually open these two macros in the project configuration .
3、 The problem of adding static libraries
load .a Library files , Error will be reported in compilation :
xx.a(1): error: A1167E: Invalid line start
You need to click and select this file in the project , Then right-click , choice "options for files", Configure the... Of the static library in the configuration options "File Type"
by "Library file ", This compilation problem can be solved . By default ,.lib Suffix file , There is no such problem .
in other words ,keil5 I only know .lib Static library file with suffix , If it is a static library file of other suffix faces , It is mandatory to manually specify this file as a library file
4、GD32 SPI The problem of dominant frequency
GD32F303 SPI0 stay APB2 On , The highest dominant frequency is 120MH
SPI1 and SPI2 stay APB1 On , The highest dominant frequency is 60MHZ
Therefore, it is necessary to set an appropriate frequency division coefficient .
5、 Warning about function nonparametric
When transplanting , There are functions without parameters , You need to fill in the parameter void, avoid "Deprecated declaration" Warning of
It's also a good programming habit . Nonparametric time , The parameter is void
6、GPIO The function interface of gpio_init() And GPIO_Init()
GD32 F3 GPIO Two interfaces are provided in the interface ,gpio_deinit() as well as gpio_init()
In especial gpio_init() , This function can be directly configured GPIO A specific pin , Configure whether it is input or output or AF Pattern ,
You can also configure the pin speed . Very easy to use .
GD32F4 Only gpio_deinit() Interface , Not provided gpio_init() Interface , It provides GPIO_Init() Interface
GPIO_Init() This interface is in the process of configuration , Manual configuration required PIN Foot's AF Pattern , This is very troublesome .
It's strange F4 Why is the series not retained F3 This interface of series ?( Interface developed by two teams ??)
7、 About the interrupt clock
GD32F4 When the configuration is interrupted , In addition to the port clock of the pin to be configured , Usually, you also need to configure RCU_SYSCFG The system clock
Because interrupts usually use the system clock
GD32F3 In the series , No, RCU_SYSCFG The system clock , When the configuration is interrupted , Need extra configuration RCU_AF The clock
边栏推荐
- HW初级流量监控,到底该怎么做
- Zhongang Mining: Fluorite continues to lead the growth of new energy market
- Ctfshow, information collection: Web3
- 【深度学习】图像超分实验:SRCNN/FSRCNN
- Integer learning
- MongoD管理数据库的方法介绍
- 15. Using the text editing tool VIM
- Configure mongodb database in window environment
- 摘抄的只言片语
- Niuke real problem programming - day16
猜你喜欢

CTFshow,信息搜集:web6

【数字IC验证快速入门】29、SystemVerilog项目实践之AHB-SRAMC(9)(AHB-SRAMC SVTB Overview)

2022 all open source enterprise card issuing network repair short website and other bugs_ 2022 enterprise level multi merchant card issuing platform source code

Ctfshow, information collection: web6

什麼是數據泄露

#HPDC智能基座人才发展峰会随笔

TypeScript 发布 4.8 beta 版本

Ctfshow, information collection: Web3

Super simple and fully automated generation super signature system (cloud Xiaoduo minclouds.com cloud service instance), free application in-house test app distribution and hosting platform, maintenan

“百度杯”CTF比赛 2017 二月场,Web:include
随机推荐
[target detection] yolov5 Runtong voc2007 data set
Whether runnable can be interrupted
[understanding of opportunity -40]: direction, rules, choice, effort, fairness, cognition, ability, action, read the five layers of perception of 3GPP 6G white paper
Starting from 1.5, build a microservice framework link tracking traceid
[quick start of Digital IC Verification] 25. AHB sramc of SystemVerilog project practice (5) (AHB key review, key points refining)
Comparable and comparator of sorting
Stream learning notes
The bank needs to build the middle office capability of the intelligent customer service module to drive the upgrade of the whole scene intelligent customer service
2. 堆排序『较难理解的排序』
使用cpolar建立一个商业网站(2)
从 1.5 开始搭建一个微服务框架链路追踪 traceId
2022年5月互联网医疗领域月度观察
【目标检测】YOLOv5跑通VOC2007数据集
HW primary flow monitoring, what should we do
【跟着江科大学Stm32】STM32F103C8T6_PWM控制直流电机_代码
Qu'est - ce qu'une violation de données
[quick start of Digital IC Verification] 20. Basic grammar of SystemVerilog learning 7 (coverage driven... Including practical exercises)
What are the safest securities trading apps
【兰州大学】考研初试复试资料分享
Win10 or win11 taskbar, automatically hidden and transparent