当前位置:网站首页>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.
边栏推荐
- MATLAB gcf图窗保存图像,黑色背景/透明背景
- nodeJs--跨域
- 1、实例开启无锁表结构变更以后,在任务编排中通过“单实例SQL”节点进行的结构变更,是优先采用无锁表
- ReentrantLock详解
- 高可用版 主数据库数据结构改变 备数据库会自动改变吗
- [微信小程序开发者工具] × #initialize
- ModelWhale 云端运行 WRF 中尺度数值气象模式,随时随地即开即用的一体化工作流
- cnpm 安装成功后提示不是内部和外部命令,也不是可运行的命令解决方案
- 0 code 4 steps to experience IoT devices on the cloud
- 请问大家,MySQL全量怎么样可以提高性能呢?我这里瓶颈是在Source上,在不增加并行度的情况下,
猜你喜欢

How to play deep paging with hundreds of millions of data?Compatible with MySQL + ES + MongoDB

Three key expectations for the crypto market in August Price moves north?Still expected to be in turmoil

Optimal Power Flow (OPF) for High Voltage Direct Current (HVDC) (Matlab code implementation)

聊聊这个SaaS领域爆火的话题

ModelWhale 云端运行 WRF 中尺度数值气象模式,随时随地即开即用的一体化工作流

深入浅出Flask PIN

【899. Ordered Queue】

【Unity入门计划】基本概念(7)-Input Manager&Input类

AWS China SDN Connector

LyScript 验证PE程序开启的保护
随机推荐
How to play deep paging with hundreds of millions of data?Compatible with MySQL + ES + MongoDB
一个文件管理系统的软硬件配置清单
基于DMS的数仓智能运维服务,知多少?
神经网络,凉了?
ModelWhale 云端运行 WRF 中尺度数值气象模式,随时随地即开即用的一体化工作流
【Unity入门计划】基本概念(8)-瓦片地图 TileMap 02
并发编程的核心问题
[Code Hoof Set Novice Village 600 Questions] Define a function as a macro
2021年12月电子学会图形化一级编程题解析含答案:放学
红蓝对抗经验分享:CS免杀姿势
DC-DC 2C (40W/30W) JD6606SX2 power back application
【QT】Qt 给已经开发好的程序快速封装成动态库
【Unity入门计划】制作RubyAdventure01-玩家的创建&移动
方舟生存进化开服需要多少钱
一通骚操作,我把SQL执行效率提高了10000000倍!
新版本的 MaxCompute 中,SQL支持的 LIMIT OFFSET 的语法是什么功能?
人脸识别损失函数的汇总 | 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
49 万奖金等你来拿!第四届实时计算 Flink 挑战赛启动,Beyond Stream Processing!
【数据库数据恢复】SqlServer数据库无法读取的数据恢复案例