当前位置:网站首页>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
边栏推荐
- Why do we use UTF-8 encoding?
- 【数字IC验证快速入门】24、SystemVerilog项目实践之AHB-SRAMC(4)(AHB继续深入)
- 居然从408改考自命题!211华北电力大学(北京)
- Ctfshow, information collection: web10
- 摘抄的只言片语
- 【数字IC验证快速入门】18、SystemVerilog学习之基本语法5(并发线程...内含实践练习)
- 【Markdown语法高级】让你的博客更精彩(四:设置字体样式以及颜色对照表)
- 2. Heap sort "hard to understand sort"
- Win10 or win11 taskbar, automatically hidden and transparent
- Oracle控制文件丢失恢复归档模式方法
猜你喜欢
【数字IC验证快速入门】26、SystemVerilog项目实践之AHB-SRAMC(6)(APB协议基本要点)
写一篇万字长文《CAS自旋锁》送杰伦的新专辑登顶热榜
HW初级流量监控,到底该怎么做
CTFshow,信息搜集:web8
【数字IC验证快速入门】23、SystemVerilog项目实践之AHB-SRAMC(3)(AHB协议基本要点)
[understanding of opportunity -40]: direction, rules, choice, effort, fairness, cognition, ability, action, read the five layers of perception of 3GPP 6G white paper
【目标检测】YOLOv5跑通VOC2007数据集
Bye, Dachang! I'm going to the factory today
Guangzhou Development Zone enables geographical indication products to help rural revitalization
Ctfshow, information collection: Web3
随机推荐
Comparable and comparator of sorting
[Data Mining] Visual Pattern Mining: Hog Feature + cosinus Similarity / K - means Clustering
PAT 甲级 1103 Integer Factorizatio
Mathematical modeling -- what is mathematical modeling
有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛?
Runnable是否可以中断
How to release NFT in batches in opensea (rinkeby test network)
[quick start of Digital IC Verification] 23. AHB sramc of SystemVerilog project practice (3) (basic points of AHB protocol)
【跟着江科大学Stm32】STM32F103C8T6_PWM控制直流电机_代码
Configure mongodb database in window environment
Niuke real problem programming - day16
HPDC smart base Talent Development Summit essay
Niuke real problem programming - day20
【服务器数据恢复】戴尔某型号服务器raid故障的数据恢复案例
【深度学习】图像超分实验:SRCNN/FSRCNN
[机缘参悟-40]:方向、规则、选择、努力、公平、认知、能力、行动,读3GPP 6G白皮书的五层感悟
Do you know the relationship between the most important indicators of two strong wind control and the quality of the customer base
从 1.5 开始搭建一个微服务框架链路追踪 traceId
TypeScript 发布 4.8 beta 版本
【數據挖掘】視覺模式挖掘:Hog特征+餘弦相似度/k-means聚類