Ll Application - ST STM32CubeF2 Getting Started

Hide thumbs Also See for STM32CubeF2:
Table of Contents

Advertisement

UM1739
4.2.2

LL application

This section describes the steps needed to create an LL application using STM32CubeF2.
1.
Create a project
To create a new project, start either from the Templates_LL project provided for each
board under \Projects\<STM32xxx_yyy>\Templates_LL or from any available project
under \Projects\<STM32xxy_yyy>\Examples_LL (<STM32xxx_yyy> which refers to the
board name, such as STM32F207ZG-Nucleo).
The Template project provides an empty main loop function, however it is a good
starting point to get familiar with project settings for STM32CubeF2.
The template main characteristics are listed below:
a)
b)
c)
d)
2.
Port an existing project to another board
To port an existing project to another target board, start from the Templates_LL project
provided for each board and available under
\Projects\<STM32xxx_yyy>\Templates_LL:
a)
b)
the caller ISR process is blocked. Functions affecting timebase configurations are
declared as __Weak to make override possible in case of other implementations
in user file (using a general purpose timer for example or other time source). For
more details, refer to HAL_TimeBase example.
It contains the source code of LL and CMSIS drivers, that are the minimal
components to develop a code on a given board.
It contains the include paths for all the required firmware components.
It selects the supported STM32F2 device and allows configuring the CMSIS and
LL drivers accordingly.
It provides ready-to-use user files, that are pre-configured as follows:
- main.h: LED & USER_BUTTON definition abstraction layer
- main.c: System clock configured with the maximum frequency.
Select an LL example
To find the board on which LL examples are deployed, refer to the list of LL
examples in STM32CubeProjectsList.html, to
available on the
boards.
Port the LL example
Copy/paste the Templates_LL folder to keep the initial source or directly update
the existing Templates_LL project.
Then LL example porting consists mainly in replacing the Templates_LL files by
the Examples_LL targeted.
Keep all board specific parts. For reasons of clarity, the board specific parts have
been flagged with specific tags:
/* ====== BOARD SPECIFIC CONFIGURATION CODE BEGIN =========== */
/* ======BOARD SPECIFIC CONFIGURATION CODE END ============= */
Thus the main porting steps are the following:
Replace stm32f2xx_it.h file
Replace stm32f2xx_it.c file
Replace main.h file and update it: keep the LED and user button definition of the
LL template under "BOARD SPECIFIC CONFIGURATION" tags.
DocID026120 Rev 4
Getting started with STM32CubeF2
Table 3: Number of examples
17/22
21

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

Subscribe to Our Youtube Channel

Table of Contents