Is It Possible To Use The Apis Available In Xx_Ll_Ppp.c?; How Do I Configure The System Clock? - ST STM32F2 User Manual

Description of stm32f2 hal and low layer drivers
Hide thumbs Also See for STM32F2:
Table of Contents

Advertisement

UM1940
A template is provided in the HAL driver folders (stm32f2xx_hal_conf_template.c).
Which header files should I include in my application to use the HAL drivers?
Only stm32f2xx_hal.h file has to be included.
What is the difference between stm32f2xx_hal_ppp.c/.h and
stm32f2xx_hal_ppp_ex.c/.h?
The HAL driver architecture supports common features across STM32 series/lines. To
support specific features, the drivers are split into two groups.
The generic APIs (xx_hal_ppp.c): It includes the common set of APIs across all the
STM32 product lines
The extension APIs (xx_hal_ppp_ex.c): It includes the specific APIs for specific device
part number or family.

Is it possible to use the APIs available in xx_ll_ppp.c?

These APIs cannot be used directly because they are internal and offer services to upper
layer drivers. As an example xx_ll_fsmc.c/h driver is used by xx_hal_sram.c, xx_hal_nor.c,
xx_hal_nand.c drivers.
Initialization and I/O operation functions

How do I configure the system clock?

Unlike the standard library, the system clock configuration is not performed in CMSIS
drivers file (system_xx.c) but in the main user application by calling the two main functions,
HAL_RCC_OscConfig() and HAL_RCC_ClockConfig(). It can be modified in any user
application section.
What is the purpose of the PPP_HandleTypeDef *pHandle structure located
in each driver in addition to the Initialization structure
PPP_HandleTypeDef *pHandle is the main structure implemented in the HAL drivers. It
handles the peripheral configuration and registers, and embeds all the structures and
variables required to follow the peripheral device flow (pointer to buffer, Error code,
State,...)
However, this structure is not required to service peripherals such as GPIO, SYSTICK,
PWR, and RCC.
What is the purpose of HAL_PPP_MspInit() and HAL_PPP_MspDeInit()
functions?
These function are called within HAL_PPP_Init() and HAL_PPP_DeInit(), respectively.
They are used to perform the low level Initialization/de-initialization related to the additional
hardware resources (RCC, GPIO, NVIC and DMA).
These functions are declared in xx_hal_msp.c. A template is provided in the HAL driver
folders (xx_hal_msp_template.c).
When and how should I use callbacks functions (functions declared with the
attribute __weak)?
Use callback functions for the I/O operations used in DMA or interrupt mode. The PPP
process complete callbacks are called to inform the user about process completion in real-
time event mode (interrupts).
DocID028236 Rev 2
FAQs
1367/1371

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents

Save PDF