当前位置:网站首页>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
边栏推荐
- [deep learning] semantic segmentation experiment: UNET network /msrc2 dataset
- leetcode 241. Different ways to add parentheses design priority for operational expressions (medium)
- [markdown grammar advanced] make your blog more exciting (IV: set font style and color comparison table)
- Mathematical modeling -- what is mathematical modeling
- How to deploy the super signature distribution platform system?
- There is a cow, which gives birth to a heifer at the beginning of each year. Each heifer has a heifer at the beginning of each year since the fourth year. Please program how many cows are there in the
- MongoD管理数据库的方法介绍
- CTFshow,信息搜集:web2
- [机缘参悟-40]:方向、规则、选择、努力、公平、认知、能力、行动,读3GPP 6G白皮书的五层感悟
- Runnable是否可以中断
猜你喜欢
What is data leakage
【数字IC验证快速入门】24、SystemVerilog项目实践之AHB-SRAMC(4)(AHB继续深入)
[quick start for Digital IC Validation] 26. Ahb - sramc (6) for system verilog project practice (Basic Points of APB Protocol)
Niuke real problem programming - day16
【兰州大学】考研初试复试资料分享
什麼是數據泄露
[server data recovery] a case of RAID data recovery of a brand StorageWorks server
使用Scrapy框架爬取网页并保存到Mysql的实现
Stream learning notes
【搞船日记】【Shapr3D的STL格式转Gcode】
随机推荐
连接ftp服务器教程
[follow Jiangke University STM32] stm32f103c8t6_ PWM controlled DC motor_ code
CTFshow,信息搜集:web8
Ctfshow, information collection: web2
Win10 or win11 taskbar, automatically hidden and transparent
Ctfshow, information collection: web10
【数字IC验证快速入门】24、SystemVerilog项目实践之AHB-SRAMC(4)(AHB继续深入)
[quick start of Digital IC Verification] 24. AHB sramc of SystemVerilog project practice (4) (AHB continues to deepen)
【OBS】RTMPSockBuf_ Fill, remote host closed connection.
Niuke real problem programming - day18
Super signature principle (fully automated super signature) [Yun Xiaoduo]
2.Golang基础知识
MySQL bit type resolution
HPDC smart base Talent Development Summit essay
Ctfshow, information collection: web6
最安全的证券交易app都有哪些
Ctfshow, information collection: Web3
15. Using the text editing tool VIM
[机缘参悟-40]:方向、规则、选择、努力、公平、认知、能力、行动,读3GPP 6G白皮书的五层感悟
[quick start of Digital IC Verification] 19. Basic grammar of SystemVerilog learning 6 (thread internal communication... Including practical exercises)