当前位置:网站首页>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 ~
边栏推荐
- C - linear table
- codeforces每日5题(均1500)-第八天
- Anxinco EC series modules are connected to the multi protocol access products of onenet Internet of things open platform
- ping报错:未知的名称或服务
- 【实验分享】通过Console口登录到Cisco设备
- SAP HR奖罚信息导出
- MySQL架构
- Fibonacci number of dynamic programming
- 【7.5】15. Sum of three numbers
- One of the anti climbing methods
猜你喜欢
Benchmarking Detection Transfer Learning with Vision Transformers(2021-11)
How did a fake offer steal $540million from "axie infinity"?
激光slam学习(2D/3D、偏实践)
0-1背包问题
How to change the formula picture in the paper directly into the formula in word
SAP HR 劳动合同信息 0016
Anxinco esp32-a1s development board is adapted to Baidu dueros routine to realize online voice function
二叉排序树【BST】——创建、查找、删除、输出
Arbre binaire équilibré [Arbre AVL] - Insérer et supprimer
Take you hand in hand to build feign with idea
随机推荐
MySQL架构
archery安装测试
Anxin vb01 offline voice module access intelligent curtain guidance
Anxinco EC series modules are connected to the multi protocol access products of onenet Internet of things open platform
平衡二叉树【AVL树】——插入、删除
数据分析系列 之3σ规则/依据拉依达准则来剔除异常值
激光slam学习(2D/3D、偏实践)
一份假Offer如何盗走了「Axie infinity」5.4亿美元?
C simple question one
SLAM面试总结
Understand TCP's three handshakes and four waves with love
Summary of SQL single table query 2020.7.27
企业应用需求导向开发之人力部门,员工考勤记录和实发工资业务程序案例
Interface
Wechat applet development beginner 1
8.31 Tencent interview
【leetcode】day1
Markdown
Learn about scratch
Anxin can internally test offline voice module vb-01 to communicate with esp-c3-12f