Overview of Low Layer drivers
3 Overview of Low Layer drivers
The Low Layer (LL) drivers are designed to offer a fast light-weight expert-oriented layer
which is closer to the hardware than the HAL. Contrary to the HAL, LL APIs are not
provided for peripherals where optimized access is not a key feature, or those requiring
heavy software configuration and/or complex upper-level stack (such as FSMC, USB or
SDMMC).
The LL drivers feature:
A set of functions to initialize peripheral main features according to the parameters
specified in data structures
A set of functions used to fill initialization data structures with the reset values of each
field
Functions to perform peripheral de-initialization (peripheral registers restored to their
default values)
A set of inline functions for direct and atomic register access
Full independence from HAL since LL drivers can be used either in standalone mode
(without HAL drivers) or in mixed mode (with HAL drivers)
Full coverage of the supported peripheral features.
The Low Layer drivers provide hardware services based on the available features of the
STM32 peripherals. These services reflect exactly the hardware capabilities and provide
one-shot operations that must be called following the programming model described in the
microcontroller line reference manual. As a result, the LL services do not implement any
processing and do not require any additional memory resources to save their states,
counter or data pointers: all the operations are performed by changing the associated
peripheral registers content.
3.1 Low Layer files
The Low Layer drivers are built around header/C files (one per each supported peripheral)
plus five header files for some System and Cortex related features.
Table 16: LL driver files
This is the h-source file for core bus control and peripheral clock
activation and deactivation
Example: LL_AHB2_GRP1_EnableClock
stm32f2xx_ll_ppp.c provides peripheral initialization functions such as
LL_PPP_Init(), LL_PPP_StructInit(), LL_PPP_DeInit(). All the other APIs
are definined within stm32f2xx_ll_ppp.h file.
The Low Layer PPP driver is a standalone module. To use it, the
application must include it in the stm32f2xx_ll_ppp.h file.
Cortex-M related register operation APIs including the Systick, Low
power (LL_SYSTICK_xxxxx, LL_LPM_xxxxx "Low Power Mode" ...)
This file covers the generic APIs:
Read of device unique ID and electronic signature
Timebase and delay management
System clock configuration.
System related operations (LL_SYSCFG_xxx, LL_DBGMCU_xxx,
LL_FLASH_xxx and LL_VREFBUF_xxx)