当前位置:网站首页>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.
边栏推荐
- 兔起鹘落全端涵盖,Go lang1.18入门精炼教程,由白丁入鸿儒,全平台(Sublime 4)Go lang开发环境搭建EP00
- 简介undo log、truncate、以及undo log如何帮你回滚事物?
- Yii2安装遇到Loading composer repositories with package information
- CS免杀姿势
- Neural networks, cool?
- 5v充8.4v1A电流充电管理ic
- 基于DMS的数仓智能运维服务,知多少?
- js数组方法总结
- 如何启动 NFT 集合
- Internship Road: Documenting Confusion in My First Internship Project
猜你喜欢
随机推荐
Deep Learning - Install CUDA and CUDNN to implement GPU operation of tensorflow
Awesome!Coroutines are finally here!Thread is about to be in the past
语音识别新一轮竞争打响,自然对话会是下一个制高点吗?
新版本MaxCompute 的SQL支持 UDF 分区裁剪的逻辑是怎样的?
为教育插上数字化的翅膀,网易云信发布「互联网+教育」整体解决方案
扫雷?拿来吧你(递归展开+坐标标记)
LyScript 验证PE程序开启的保护
8月份加密市场的三个关键预期 价格虽向北移动?预计仍将处于动荡之中
红蓝对抗经验分享:CS免杀姿势
请问下阿里云全托管flink能执行两条flink sql命令么?
Go Go 简单的很,标准库之 fmt 包的一键入门
js数组方法总结
2021年12月电子学会图形化一级编程题解析含答案:放学
JS basics--judgment
MySQL中的基数是啥?
不安装运行时运行.NET程序
指令重排以及案例
在 360 度绩效评估中应该问的 20 个问题
Js array method is summarized
leetcode: 899. Ordered Queue [Thinking Question]