April 2019 UM2303 Rev 4 1/26
1
UM2303
User manual
Getting started with STM32CubeG0 for STM32G0 Series
Introduction
STM32Cube is an STMicroelectronics original initiative to significantly improve designer's
productivity by reducing development effort, time and cost. STM32Cube covers the whole
STM32 portfolio.
STM32Cube includes:
A
set of user-friendly software development tools to cover project development from
the conception to the realization, among which:
STM32CubeMX, a graphical software configuration tool that allows the automatic
generation of C initialization code using graphical wizards.
STM32CubeProgrammer (STM32CubeProg), a programming tool available in
graphical and command-line versions.
STM32CubeMonitor-Power (STM32CubeMonPwr), a monitoring tool to measure
and help in the optimization of the power consumption of the MCU.
STM32Cube MCU Packages, comprehensive embedded-software platforms specific to
each microcontroller series (such as STM32CubeG0 for STM32G0 Series), which
include:
STM32Cube hardware abstraction layer (HAL), ensuring maximized portability
across the STM32 portfolio.
STM32Cube low-layer APIs, ensuring the best performance and footprints with a
high degree of user control over the HW.
A consistent set of middleware components such as RTOS, USB PD, and FatFS.
All embedded software utilities with full sets of peripherals and applicative
examples.
This user manual describes how to get started with the STM32CubeG0 MCU Package.
Section 1 describes the main features of the STM32CubeG0 MCU Package.
Section 2 and Section 3 provide an overview of the STM32CubeG0 architecture and MCU
Package structure.
www.st.com
Contents UM2303
2/26 UM2303 Rev 4
Contents
1 STM32CubeG0 main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 STM32CubeG0 architecture overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1 Level 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.1 Board support package (BSP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.2 Hardware abstraction layer (HAL) and low-layer (LL) . . . . . . . . . . . . . . . 8
2.1.3 Basic peripheral usage examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Level 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 Middleware components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.2 Examples based on the middleware components . . . . . . . . . . . . . . . . . 10
2.3 Level 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 STM32CubeG0 MCU Package overview . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1 Supported STM32G0 devices and hardware . . . . . . . . . . . . . . . . . . . . . . .11
3.2 MCU Package overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4 Getting started with STM32CubeG0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1 Running your first example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2 Developing your own application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.1 Using STM32CubeMX to develop or update your application . . . . . . . . 17
4.2.2 HAL application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2.3 LL application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.3 Getting STM32CubeG0 release updates . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3.1 Installing and running the STM32CubeUpdater program . . . . . . . . . . . 21
5 FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.1 What is the license scheme for the STM32CubeG0 MCU Package? . . . 22
5.2 What boards are supported by the STM32CubeG0 MCU Package? . . . . 22
5.3 Are any examples provided with the ready-to-use toolset projects? . . . . 22
5.4 Is there any link with Standard Peripheral Libraries? . . . . . . . . . . . . . . . . 22
5.5 Does the HAL layer take benefit from interrupts or DMA?
How can this be controlled? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.6 How are the product/peripheral specific features managed? . . . . . . . . . . 23