At first, we should answer to this question, what is the LL library in STM32? ST company provides users with a lot of tools to drive and develop software for their projects. LL library is one of these tools and the main feature of this library is proximity to the hardware layer and direct access to the microcontroller register so to use this library we need the knowledge about the hardware.
LL library have these features:
- A set of functions to drive main peripherals of the device based of data structure
- A set of functions that value boot data structures with reset values
- Functions to de-initialize the peripherals to default values
- A set of functions to direct access as well as atomic registers
- completely independent from HAL library; to elaborate we can use LL library alone or combine them to HAL library
- Full coverage of supported peripherals features
Note: LL functions provide a lot of services and perform the actions which is the reflection of the hardware capabilities that are performed as a one-shot operation when called. In addition, since these services do not execute any processes, the do not require memory allocation to store mode, counter, or pointer. In low layer libraries, in addition to 5 headers, which are related to system and cortex features , there is one header file and .c file for each peripheral. Also, it could be mentioned that there is no configuration file for LL and the files for LL drivers are in the HAL drivers folder. In all low-layer drivers, the only file that included is just CMSIS files. In each program, just the used LL header file will be included.
Tools used in STM32 training via LL functions
In this tutorial series, in addition to small of special hardware of software, which is used for a project, A training board for the STM32F103C8T microcontroller called Blue Pill is used. In some training the STM32FRET board is used. The required software tools are STM32 Cube MX and Keil uVersion5.