当前位置:网站首页>About the difference between ch32 library function and STM32 library function
About the difference between ch32 library function and STM32 library function
2022-07-07 23:44:00 【Guard_ Byte】
I want to use MPU6050 Six axis sensor to control the car 90° Turn accurately and keep straight , But there is nothing left STM32F1 The board of , There are exactly two CH32F103 Minimum system board for , So I think it's OK to simply transplant the program , I didn't expect to encounter difficulties in this process .
Because I use CH32 Official library functions , The most commonly used driver code is almost based on STM32 Development , So be careful in the process of transplantation .
1、 The following is a CH32F10X_ Library functions about GPIO The relevant registers of are related to STM32 Different places :
On the left CH32 Official library functions , On the right is ST32 Official library functions , File "ch/stm32f10x_gpio.c "
In use IIC perhaps DHT11 Wait for one IO When considering both input and output capabilities , Pay special attention to I/O Direction configuration , The names of the configuration registers in the figure are different , Pay attention to modification when using .
2、 besides , I also found in USART When the configuration , Individual register names are also different , If used printf Function printout redirection function :
thus it can be seen , In order to make a distinction , In the details, I moved my little mind . however Don't forget that they use the same ARM framework Cortex - M3 kernel , alike 32 position MCU, So I checked their firmware library functions , Find out Except for different names, the address and length of common registers are exactly the same , Everyone understands it here , Pay a little attention to some places , Then use it directly STM32 The firmware library function is over .
3、 We may talk about it later domestic ARM framework 32 position MCU And STM32 Use difference of , If you have time ha-ha ~
边栏推荐
- Pigsty:开箱即用的数据库发行版
- 【路径规划】使用垂距限值法与贝塞尔优化A星路径
- JNI uses asan to check memory leaks
- HB 5469 combustion test method for non-metallic materials in civil aircraft cabin
- C语言学习
- Boost regex library source code compilation
- 0-1 knapsack problem
- Benchmarking Detection Transfer Learning with Vision Transformers(2021-11)
- postgis学习
- 神奇快速幂
猜你喜欢
MySQL Architecture
Progress broadcast | all 29 shield machines of Guangzhou Metro Line 7 have been launched
C cat and dog
Flash download setup
Aitm3.0005 smoke toxicity test
Understand TCP's three handshakes and four waves with love
一键免费翻译300多页的pdf文档
ASP. Net core middleware request processing pipeline
archery安装测试
SAP HR social work experience 0023
随机推荐
SAP HR reward and punishment information export
Wechat applet development beginner 1
May day d-light
Summary of SQL single table query 2020.7.27
P1308 [noip2011 popularity group] count the number of words
Dependency injection
通达信买基金安全吗?
激光slam学习(2D/3D、偏实践)
P1067 [noip2009 popularity group] polynomial output (difficult, pit)
Resolve the URL of token
Anti climbing means cracking the second
Chisel tutorial - 05 Sequential logic in chisel (including explicit multi clock, explicit synchronous reset and explicit asynchronous reset)
0-1背包问题
Anxinco EC series modules are connected to the multi protocol access products of onenet Internet of things open platform
FFA与ICGA造影
C language greedy snake
Ora-01741 and ora-01704
C inheritance and interface design polymorphism
Oracle string sorting
AITM3.0005 烟雾毒性测试