当前位置:网站首页>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.
边栏推荐
- 5v充8.4v1A电流充电管理ic
- The general trend, another key industry related to Sino-US competition, has reached a critical moment
- 开源一夏 | 打工人的第25天-曾经的考研人
- Research on power flow in DC microgrid based on Newton's method (Matlab code implementation)
- 不可忽略!户外LED显示屏的特点及优势
- Basic knowledge points in js - events
- spark入门学习-2
- How to get the 2 d space prior to ViT?UMA & Hong Kong institute of technology & ali SP - ViT, study for visual Transformer 2 d space prior knowledge!.
- 8月份加密市场的三个关键预期 价格虽向北移动?预计仍将处于动荡之中
- 如何启动 NFT 集合
猜你喜欢
How to prevent hacking Windows server security Settings
How to play deep paging with hundreds of millions of data?Compatible with MySQL + ES + MongoDB
【QT】Qt 给已经开发好的程序快速封装成动态库
2021年数据泄露成本报告解读
上亿数据怎么玩深度分页?兼容MySQL + ES + MongoDB
扫雷?拿来吧你(递归展开+坐标标记)
一通骚操作,我把SQL执行效率提高了10000000倍!
语音识别新一轮竞争打响,自然对话会是下一个制高点吗?
Deep Learning - Install CUDA and CUDNN to implement GPU operation of tensorflow
[微信小程序开发者工具] × #initialize
随机推荐
5 v 8.4 v1A charging current charging management IC
spark入门学习-1
A new round of competition for speech recognition has started. Will natural dialogue be the next commanding height?
2021年12月电子学会图形化二级编程题解析含答案:绘制多边形
高可用版 主数据库数据结构改变 备数据库会自动改变吗
window.open不显示favicon.icon
泰山OFFICE技术讲座:段落边框的绘制难点在哪里?
JD6606SP5_JD6606SSP_JD6606SASP_JD6621W7百盛新纪元授权代理商
【QT】Qt项目demo:数据在ui界面上显示,鼠标双击可弹窗显示具体信息
cnpm 安装成功后提示不是内部和外部命令,也不是可运行的命令解决方案
2021年12月电子学会图形化一级编程题解析含答案:下雨
您的移动端app安全吗
使用Make/CMake编译ARM裸机程序(基于HT32F52352 Cortex-M0+)
下午见!2022京东云数据库新品发布会
How to get the 2 d space prior to ViT?UMA & Hong Kong institute of technology & ali SP - ViT, study for visual Transformer 2 d space prior knowledge!.
深入浅出Flask PIN
ECCV 2022 | 基于关系查询的时序动作检测方法
CopyOnWriteArrayList详解
Yii2安装遇到Loading composer repositories with package information
How to play deep paging with hundreds of millions of data?Compatible with MySQL + ES + MongoDB