Introduction
STM32Cube is an STMicroelectronics original initiative to significantly improve developer productivity by reducing development
effort, time, and cost. STM32Cube covers the STM32 portfolio.
STM32Cube includes:
• STM32CubeMX, a graphical software configuration tool that allows the generation of C initialization code using graphical
wizards.
• A comprehensive embedded software platform, delivered per series (such as STM32CubeN6 for STM32N6 devices)
– The STM32Cube HAL, STM32 abstraction layer embedded software ensuring maximized portability across the
STM32 portfolio. HAL APIs are available for all peripherals.
– Low-layer APIs (LL) offering a fast light-weight expert-oriented layer which is closer to the hardware than the HAL.
LL APIs are available only for a set of peripherals.
– A consistent set of middleware components such as USB, H.264 video encoder, image signal processing library,
Azure
®
RTOS, OpenBootloader, external memory manager and loader.
– All embedded software utilities, delivered with a full set of examples.
The HAL driver layer provides a simple, generic multi-instance set of APIs (application programming interfaces) to interact with
the upper layer (application, libraries, and stacks). The HAL driver APIs are split into two categories: generic APIs, which
provide common and generic functions for all the STM32 series and extension APIs, which include specific and customized
functions for a given line or part number. The HAL drivers include a complete set of ready-to-use APIs that simplify the user
application implementation. For example, the communication peripherals contain APIs to initialize and configure the peripheral,
manage data transfers in polling mode, handle interrupts or DMA, and manage communication errors. The HAL drivers are
feature-oriented instead of peripheral-oriented. For example, the timer APIs are split into several categories following the
peripheral functions, such as basic timer, capture, and pulse width modulation (PWM). The HAL driver layer implements runtime
failure detection by checking the input values of all functions. Such dynamic checking enhances the firmware robustness.
Runtime detection is also suitable for user application development and debugging.
The LL drivers offer hardware services based on the available features of the STM32 peripherals. These services reflect exactly
the hardware capabilities, and provide atomic operations that must be called by following the programming model described in
the product line reference manual. As a result, the LL services are not based on standalone processes and do not require any
additional memory resources to save their states, counter, or data pointers. All operations are performed by changing the
content of the associated peripheral registers. Unlike the HAL, LL APIs are not provided for peripherals for which optimized
access is not a key feature, or for those requiring heavy software configuration and/or a complex upper-level stack.
The HAL and LL are complementary and cover a wide range of application requirements:
• The HAL offers high-level and feature-oriented APIs with a high-portability level. These hide the MCU and peripheral
complexity from the end user.
• The LL offers low-level APIs at register level, with better optimization but less portability. These require deep knowledge
of the MCU and peripheral specifications.
The HAL- and LL-driver source code is developed in Strict ANSI-C, which makes it independent of the development tools. It is
checked with the Coverity static analysis tool. It is fully documented.
It is compliant with MISRA C
®
:2012 standard.
Description of STM32N6 HAL and low-layer drivers
UM3425
User manual
UM3425 - Rev 1 - November 2024
For further information contact your local STMicroelectronics sales office.
www.st.com