当前位置:网站首页>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
边栏推荐
- CTFshow,信息搜集:web14
- 【数字IC验证快速入门】18、SystemVerilog学习之基本语法5(并发线程...内含实践练习)
- Ctfshow, information collection: Web3
- Jacobo code coverage
- 众昂矿业:萤石继续引领新能源市场增长
- Integer learning
- [quick start of Digital IC Verification] 26. Ahb-sramc of SystemVerilog project practice (6) (basic points of APB protocol)
- Stm32f103c8t6 PWM drive steering gear (sg90)
- CTFshow,信息搜集:web5
- 【数字IC验证快速入门】19、SystemVerilog学习之基本语法6(线程内部通信...内含实践练习)
猜你喜欢
如何在opensea批量发布NFT(Rinkeby测试网)
从 1.5 开始搭建一个微服务框架链路追踪 traceId
"Baidu Cup" CTF competition 2017 February, web:include
简述keepalived工作原理
Ctfshow, information collection: web10
“百度杯”CTF比赛 2017 二月场,Web:include
Guangzhou Development Zone enables geographical indication products to help rural revitalization
【数字IC验证快速入门】25、SystemVerilog项目实践之AHB-SRAMC(5)(AHB 重点回顾,要点提炼)
【数字IC验证快速入门】22、SystemVerilog项目实践之AHB-SRAMC(2)(AMBA总线介绍)
众昂矿业:萤石继续引领新能源市场增长
随机推荐
@Introduction and three usages of controlleradvice
摘抄的只言片语
Ctfshow, information collection: web1
Pit avoidance: description of null values in in and not in SQL
jacoco代码覆盖率
[server data recovery] a case of RAID data recovery of a brand StorageWorks server
Niuke real problem programming - day16
写一篇万字长文《CAS自旋锁》送杰伦的新专辑登顶热榜
【搞船日记】【Shapr3D的STL格式转Gcode】
HPDC smart base Talent Development Summit essay
【数字IC验证快速入门】20、SystemVerilog学习之基本语法7(覆盖率驱动...内含实践练习)
[Data Mining] Visual Pattern Mining: Hog Feature + cosinus Similarity / K - means Clustering
一个需求温习到的所有知识,h5的表单被键盘遮挡,事件代理,事件委托
Introduction of mongod management database method
Bits and Information & integer notes
CTFshow,信息搜集:web8
Oracle control file loss recovery archive mode method
Unity's ASE realizes cartoon flame
[server data recovery] data recovery case of raid failure of a Dell server
[quickstart to Digital IC Validation] 20. Basic syntax for system verilog Learning 7 (Coverage Driven... Including practical exercises)