EasyManuals Logo

ST STM32F2 User Manual

ST STM32F2
1371 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #30 background imageLoading...
Page #30 background image
Overview of HAL drivers
UM1940
30/1371
DocID028236 Rev 2
2.1.2 User-application files
The minimum files required to build an application using the HAL are listed in the table
below:
Table 3: User-application files
File
Description
system_stm32f2xx.c
This file contains SystemInit() which is called at startup just after reset and
before branching to the main program. It does not configure the system
clock at startup (contrary to the standard library). This is to be done using
the HAL APIs in the user files.
It allows:
relocating the vector table in internal SRAM.
configuring FSMC peripheral to use as data memory the external
SRAM mounted on the evaluation board.
startup_stm32f2xx.s
Toolchain specific file that contains reset handler and exception vectors.
For some toolchains, it allows adapting the stack/heap size to fit the
application requirements.
stm32f2xx_flash.icf
(optional)
Linker file for EWARM toolchain allowing mainly to adapt the stack/heap
size to fit the application requirements.
stm32f2xx_hal_msp.c
This file contains the MSP initialization and de-initialization (main routine
and callbacks) of the peripheral used in the user application.
stm32f2xx_hal_conf.h
This file allows the user to customize the HAL drivers for a specific
application.
It is not mandatory to modify this configuration. The application can use the
default configuration without any modification.
stm32f2xx_it.c/.h
This file contains the exceptions handler and peripherals interrupt service
routine, and calls HAL_IncTick() at regular time intervals to increment a
local variable (declared in stm32f2xx_hal.c) used as HAL timebase. By
default, this function is called each 1ms in Systick ISR. .
The PPP_IRQHandler() routine must call HAL_PPP_IRQHandler() if an
interrupt based process is used within the application.
main.c/.h
This file contains the main program routine, mainly:
the call to HAL_Init()
assert_failed() implementation
system clock configuration
peripheral HAL initialization and user application code.
The STM32Cube package comes with ready-to-use project templates, one for each
supported board. Each project contains the files listed above and a preconfigured project
for the supported toolchains.
Each project template provides empty main loop function and can be used as a starting
point to get familiar with project settings for STM32Cube. Their characteristics are the
following:
It contains the sources of HAL, CMSIS and BSP drivers which are the minimal
components to develop a code on a given board.
It contains the include paths for all the firmware components.
It defines the STM32 device supported, and allows configuring the CMSIS and HAL
drivers accordingly.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

ST STM32F2 Specifications

General IconGeneral
BrandST
ModelSTM32F2
CategoryMicrocontrollers
LanguageEnglish

Related product manuals