Page 1
UM1739 User manual Getting started with STM32CubeF2 firmware package for STM32F2 Series Introduction ™ The STMCube initiative was originated by STMicroelectronics to ease developers' life by reducing development efforts, time and cost. STM32Cube covers the STM32 portfolio. STM32CubeVersion 1.x includes: •...
STM32CubeF2 main features STM32CubeF2 main features STM32CubeF2 gathers in a single package all the generic embedded software components required to develop an application on STM32F2 microcontrollers. In line with the STM32Cube initiative, this set of components is highly portable, not only within the STM32F2 Series but also to other STM32 series.
Page 6
STM32CubeF2 main features UM1739 A demonstration implementing all these middleware components is also provided in the STM32CubeF2 package. Figure 1. STM32CubeF2 firmware components 6/22 DocID026120 Rev 4...
The STM32Cube firmware solution is built around three independent levels that can easily interact with each other as described in Figure Figure 2. STM32CubeF2 firmware architecture Level 0: this level is divided into three sub-layers: • Board Support Package (BSP): this layer offers a set of APIs related to the hardware...
Page 8
In the current version of the STM32CubeF2 firmware package, no Level 2 projects are provided. The user can rely on the Level 2 projects provided with the STM32CubeF4 firmware package as example.
The STM32CubeF2 offers a full support for all the STM32F2 Series devices. The user only needs to define the right macro in stm32f2xx.h. Table 1 lists which macro to define depending on the used STM32F2 device.
STM32CubeF2 firmware package overview UM1739 Firmware package overview The STM32CubeF2 firmware solution is provided in one single zip package with the structure shown in Figure Figure 3. STM32CubeF2 firmware package overview 1. The library files cannot be modified by the user while the set of examples are modifiable files.
Page 12
STM32CubeF2 firmware package overview UM1739 The examples are classified depending on the STM32Cube level they apply to, and are named as follows: • Examples in level 0 are called Examples, Examples_LL, and Examples_MIX. They use respectively HAL drivers, LL drivers and a mix of HAL and LL drivers without any middleware component.
Getting started with STM32CubeF2 Getting started with STM32CubeF2 How to run a first example This section explains how to run a first example within STM32CubeF2, using as illustration the generation of a simple led toggle on STM322xG_EVAL board: Download the STM32CubeF2 FW package Unzip the package into a selected directory.
Page 14
Getting started with STM32CubeF2 UM1739 Below is a quick overview on how to open, build and run an example with the supported toolchains: • EWARM – Under the example folder, open \EWARM subfolder – Launch the Project.eww workspace – Rebuild all files: Project > Rebuild all –...
Note: <STM32xx_xxx> refers to the board name, for example STM322xG_EVAL. The Template project provides an empty main loop function. It is a good starting point to get familiar with the project settings for STM32CubeF2. It has the following characteristics: It contains the sources of HAL, CMSIS and BSP drivers which are the minimum required components to develop a code for a given board.
Page 16
If the application has some real-time constraints, the user can find a set of examples showing how to use the FreeRTOS and integrate it with all middleware stacks provided within STM32CubeF2. It can be a good starting point for a first development.
HAL_TimeBase example. 4.2.2 LL application This section describes the steps needed to create an LL application using STM32CubeF2. 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>...
(UM1718). Getting STM32CubeF2 release updates The STM32CubeF2 firmware package comes with an updater utility: the STM32CubeUpdater, also available as a menu within STM32CubeMX code generation tool. The updater solution detects new firmware releases and patches available on www.st.com...
The middleware stacks made by ST (USB Host and Device Libraries, STemWin) come with a licensing model allowing easy reuse, provided it runs on an ST device. The Middleware based on well-known open-source solutions (FreeRTOS, FatFs, LwIP and PolarSSL) have user-friendly license terms.
Page 20
Frequently asked questions (FAQs) UM1739 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.
Section 4.2: How to develop an applicationchanging the important note. – Section 5: Frequently asked questions (FAQs) 2nd question about the boards supported by STM32CubeF2 firmware package, adding STM32F207ZG-Nucleo board. Added low layer API (LL) feature: – Updated cover – Updated Section 1: STM32CubeF2 main features.
Page 22
ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Need help?
Do you have a question about the STM32CubeF2 and is the answer not in the manual?
Questions and answers