当前位置:网站首页>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 ~
边栏推荐
- 激光slam学习(2D/3D、偏实践)
- B_ QuRT_ User_ Guide(39)
- 0-1 knapsack problem
- Chisel tutorial - 02 Chisel environment configuration and implementation and testing of the first chisel module
- 【实验分享】通过Console口登录到Cisco设备
- Oracle string sorting
- postgis学习
- 一份假Offer如何盗走了「Axie infinity」5.4亿美元?
- Anxinco esp32-a1s development board is adapted to Baidu dueros routine to realize online voice function
- Benchmarking Detection Transfer Learning with Vision Transformers(2021-11)
猜你喜欢
一份假Offer如何盗走了「Axie infinity」5.4亿美元?
Wechat applet development beginner 1
[stm32+esp8266 connects to Tencent cloud IOT development platform 3] stm32+esp8266-01s dynamically registers devices on Tencent cloud (at instruction mode) -- with source code
archery安装测试
Anxin vb01 offline voice module access intelligent curtain guidance
Anxinco esp32-a1s development board is adapted to Baidu dueros routine to realize online voice function
Apng2gif solutions to various problems
What if once again forgets the login password of raspberry pie? And you don't have a monitor yet! Today, I would like to introduce a method
Right click the idea file to create new. There is no solution to create new servlet
Flash encryption process and implementation of esp32
随机推荐
redis缓存工具类,值得拥有~
2022 certified surveyors are still at a loss when preparing for the exam? Teach you how to take the exam hand in hand?
Anxin vb01 offline voice module access intelligent curtain guidance
【7.4】25. K 个一组翻转链表
数据分析系列 之3σ规则/依据拉依达准则来剔除异常值
[STM32 + esp-12s connect Tencent cloud IOT development platform 1] creation of cloud platform and burning of at firmware
Slam interview summary
ASP. Net core middleware request processing pipeline
Installing gradle
0-1背包问题
SAP memory parameter tuning process
C simple question one
P5594 [xr-4] simulation match
SAP HR reward and punishment information export
go time包常用函数
Interface
P2141 [noip2014 popularization group] abacus mental arithmetic test
Wechat applet development beginner 1
[untitled]
JNI uses asan to check memory leaks