ST STM32CubeF2 Getting Started page 20

Hide thumbs Also See for STM32CubeF2:
Table of Contents

Advertisement

Frequently asked questions (FAQs)
Is there any link with standard peripheral libraries?
The STM32Cube HAL and LL drivers are the replacement of the standard peripheral library:
The HAL drivers offer a higher abstraction level compared to the standard peripheral
APIs. They focus on peripheral common features rather than hardware. Their higher
abstraction level allows defining a set of user-friendly APIs that can be easily ported
from one product to another.
The LL drivers offer low-level APIs at register level. They are organized in a simpler
and clearer way than direct register accesses. The LL drivers also include peripheral
initialization APIs, which are more optimized compared to what is offered by the SPL,
while being functionally similar. Compared to the HAL drivers, these LL initialization
APIs allows an easier migration from the SPL to the STM32Cube LL drivers, since
each SPL API has its equivalent LL API(s).
When should I use HAL versus LL drivers?
The HAL drivers offer high-level and function-oriented APIs, with a high level of portability.
the product/IPs complexity is hidden for end users.
The LL drivers offer low-level APIs at registers level, with a better optimization but less
portability. They require a deep knowledge of the product/IPs specifications.
Can I use HAL and LL drivers together? If yes, what are the constraints?
It is possible to use both HAL and LL drivers. One can handle the IP initialization phase with
the HAL and then manage the I/O operations with the LL drivers.
The major difference between HAL and LL is that the HAL drivers require to create and use
handles for operation management while the LL drivers operates directly on peripheral
registers. Mixing HAL and LL is illustrated in the Examples_MIX example.
How can I include LL drivers in my environment? Is there any LL
configuration file as for HAL?
There is no configuration file. The source code shall directly include the necessary
stm32f2xx_ll_ppp.h file(s).
Is there any LL APIs which are not available with HAL?
Yes, there are.
A few Cortex
or the SysTick registers.
Why are SysTick interrupts not enabled on LL drivers?
When using the LL drivers in standalone mode, the user does not need to enable SysTick
interrupts because they are not used in the LL APIs, while the HAL functions requires
SysTick interrupts to manage timeouts.
How are LL initialization APIs enabled?
The definition of LL initialization APIs and associated resources (structure, literals and
prototypes) is conditioned by the USE_FULL_LL_DRIVER compilation switch.
To be able to use the LL APIs, add this switch in the toolchain compiler preprocessor.
20/22
®
APIs have been added in stm32f2xx_ll_cortex.h e.g. for accessing the SCB
DocID026120 Rev 4
UM1739

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32CubeF2 and is the answer not in the manual?

Questions and answers

Table of Contents