当前位置:网站首页>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.
边栏推荐
- How to play deep paging with hundreds of millions of data?Compatible with MySQL + ES + MongoDB
- 5v充8.4v1A电流充电管理ic
- 瞌睡检测系统介绍
- 请问大家,MySQL全量怎么样可以提高性能呢?我这里瓶颈是在Source上,在不增加并行度的情况下,
- JS handwritten call apply bind (detailed) (interview)
- How much does Ark Survival Evolved cost?
- 泰山OFFICE技术讲座:段落边框的绘制难点在哪里?
- 不安装运行时运行.NET程序
- 在 360 度绩效评估中应该问的 20 个问题
- 2021年数据泄露成本报告解读
猜你喜欢
Neural networks, cool?
聊聊这个SaaS领域爆火的话题
使用Make/CMake编译ARM裸机程序(基于HT32F52352 Cortex-M0+)
力扣1206. 设计跳表--SkipList跳表是怎么跳的?
The general trend, another key industry related to Sino-US competition, has reached a critical moment
Small Tools(4) 整合Seata1.5.2分布式事务
ECCV 2022 | 基于关系查询的时序动作检测方法
[Code Hoof Set Novice Village 600 Questions] Define a function as a macro
Essentially a database data recovery 】 【 database cannot read data recovery case
一通骚操作,我把SQL执行效率提高了10000000倍!
随机推荐
实习路途:记录给我的第一个实习项目中的困惑
How to play deep paging with hundreds of millions of data?Compatible with MySQL + ES + MongoDB
【码蹄集新手村600题】将一个函数定义宏
简介undo log、truncate、以及undo log如何帮你回滚事物?
基于牛顿方法在直流微电网潮流研究(Matlab代码实现)
MATLAB gcf图窗保存图像,黑色背景/透明背景
Js array method is summarized
方舟开服教程win
泰山OFFICE技术讲座:文字边框高度研究
【Unity入门计划】基本概念(8)-瓦片地图 TileMap 01
【QT】Qt项目demo:数据在ui界面上显示,鼠标双击可弹窗显示具体信息
1、实例开启无锁表结构变更以后,在任务编排中通过“单实例SQL”节点进行的结构变更,是优先采用无锁表
ReentrantReadWriteLock详解
如何用二分法搜索、查找旋转数组中是否含有某个(目标)值? leetcode 81.搜索旋转排序数组
Awesome!Coroutines are finally here!Thread is about to be in the past
扩展欧几里得求逆元实例
Small Tools(4) 整合Seata1.5.2分布式事务
Fortinet产品导入AWS AMI操作文档
MATLAB gcf figure save image with black background/transparent background
微电网和直流电网中最优潮流(OPF)的凸优化(Matlab代码实现)