当前位置:网站首页>Difference and performance comparison between HAL and LL library of STM32
Difference and performance comparison between HAL and LL library of STM32
2022-08-03 16:02:00 【passing bear~】
Introduction to LL and HAL libraries
LL: Low-Layer, low-level library
HAL: Hardware Abstraction Layer, hardware abstraction layer library
Compared with the hal library, the LL library is very streamlined, which is actually a streamlined library.
The configuration options for the LL library are as follows:
In STM32CUBEMX, click "Project Manager" -> "Advanced Settings" in the menu, select "Advanced Settings" in the following interface, and then select the library used after each module

Summary:
1. If the MCU used is of small capacity, then STM32Cube LL will be the best choice;
2. If you combine portability and optimization, use the STM32Cube HAL and replace some calls with specific optimized implementations to maintain maximum portability.In addition, HAL and LL can be used partially concurrently (HAL and LL cannot run concurrently for the same peripheral), or a mixed HAL and LL implementation can be used to obtain the same advantages mentioned above.
STM32 performance comparison using HAL library, standard library, LL library and register operations
Introduction
When developing stm32, the development difficulty and speed of choosing different libraries may vary greatly, and accordingly, the running performance of the developed code will also vary greatly.
The following figure shows several commonly used functions officially given: GPIO flip, TIM PWM output, ADC DMA data acquisition and DMA M2M. The running results developed by using different libraries can be used for reference and comparison, so as to meet the needs of your own development.The selection required by the project.
Summary
The law that code efficiency is inversely proportional to portability is obvious.But compared with Cube HAL, the efficiency advantage of Cube LL is still obvious, almost the same as the efficiency of directly writing registers.And at present, STM32cubeMX has begun to support the direct generation of projects using Cube LL. It is highly recommended for everyone who pursues efficiency in the future.
边栏推荐
- 人脸识别损失函数的汇总 | Pytorch版本实现
- How to use binary search and find whether the rotation in the array contains a (target) value?Rotate the sorted array leetcode 81. Search
- 聊聊这个SaaS领域爆火的话题
- 30W 2C(JD6606S + FP6652X2)BOM
- Daily practice------There are 10 numbers that are required to be output from large to small by selection method
- 一通骚操作,我把SQL执行效率提高了10000000倍!
- 力扣1206. 设计跳表--SkipList跳表是怎么跳的?
- 参与便有奖,《新程序员》杂志福利来袭!
- 2021年12月电子学会图形化一级编程题解析含答案:放学
- GTK实现旋转加载动画
猜你喜欢

【QT】Qt 给已经开发好的程序快速封装成动态库

Awesome!Coroutines are finally here!Thread is about to be in the past

技术干货|如何将 Pulsar 数据快速且无缝接入 Apache Doris

劲爆!协程终于来了!线程即将是过去式

一通骚操作,我把SQL执行效率提高了10000000倍!

方舟开服工具、服务器教程win

MATLAB gcf figure save image with black background/transparent background

AI也有健忘症?英国41岁教授专访:解决灾难性遗忘

nodeJs--跨域

证实了,百度没有快照了
随机推荐
下午见!2022京东云数据库新品发布会
开源一夏 | 阿里云物联网平台之极速体验
8月份加密市场的三个关键预期 价格虽向北移动?预计仍将处于动荡之中
微电网和直流电网中最优潮流(OPF)的凸优化(Matlab代码实现)
How to use binary search and find whether the rotation in the array contains a (target) value?Rotate the sorted array leetcode 81. Search
在 360 度绩效评估中应该问的 20 个问题
LyScript 验证PE程序开启的保护
[Code Hoof Set Novice Village 600 Questions] Define a function as a macro
证实了,百度没有快照了
DC-DC 2C(40W/30W) JD6606SX2退功率应用
JS handwritten call apply bind (detailed) (interview)
上亿数据怎么玩深度分页?兼容MySQL + ES + MongoDB
身为售后工程师的我还是觉得软件测试香,转行成功定薪11.5K,特来分享下经验。
简介undo log、truncate、以及undo log如何帮你回滚事物?
With a single operation, I improved the SQL execution efficiency by 10,000,000 times!
常见分布式理论(CAP、BASE)和一致性协议(Gosssip、Raft)
Ark server open tool, server tutorial win
我在滴滴做开源
js中的基础知识点 —— 事件
How Navicat connects to MySQL on a remote server