当前位置:网站首页>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 ~
边栏推荐
猜你喜欢

ASP. Net core middleware request processing pipeline

MongoDB快速入门

Ora-02437 failed to verify the primary key violation

Design and implementation of spark offline development framework

Pycharm basic settings latest version 2022

Take you hand in hand to build Eureka server with idea

SAP HR 劳动合同信息 0016

AITM3.0005 烟雾毒性测试

SAP HR 社会工作经历 0023

Navicat connects Oracle
随机推荐
Flash download setup
BSS 7230 航空内饰材料阻燃性能测试
网上买基金安全么?
2022.7.7-----leetcode.648
C method question 1
C - minute number V3
Extended tree (I) - graphic analysis and C language implementation
codeforces每日5题(均1500)-第八天
[STM32 + esp-12s connect Tencent cloud IOT development platform 1] creation of cloud platform and burning of at firmware
Anti climbing means cracking the second
SAP HR奖罚信息导出
【实验分享】通过Console口登录到Cisco设备
二叉排序树【BST】——创建、查找、删除、输出
Anxinco EC series modules are connected to the multi protocol access products of onenet Internet of things open platform
Arbre binaire équilibré [Arbre AVL] - Insérer et supprimer
postgres timestamp转人眼时间字符串或者毫秒值
KeePass realizes automatic input of web pages
Svn relocation
P1067 [noip2009 popularity group] polynomial output (difficult, pit)
C - Fibonacci sequence again