# STM32CubeF0 Firmware Examples for STM32F0xx Series

Copyright 2019 STMicroelectronics

The STM32CubeF0 Firmware package comes with a rich set of examples running on STMicroelectronics boards, organized by board and provided with preconfigured projects for the main supported toolchains.

The examples are classified depending on the STM32Cube level they apply to, and are named as follows:

- Examples uses only the HAL and BSP drivers (Middleware not used), having as objective to demonstrate the product/peripherals features and usage. The examples are organized per peripheral (a folder for each peripheral, ex. TIM) and offers different complexity level from basic usage of a given peripheral (ex. PWM generation using timer) till integration of several peripherals(use DAC for signals generation with synchronization from TIM6 and DMA). Board resources usage is reduced to the strict minimum.
- Examples_LL uses only the LL drivers (HAL and Middleware not used), offering optimum implementation of typical use cases of the peripheral features and configuration procedures. The examples are organized per peripheral (a folder for each peripheral, ex. TIM) and runs exclusively on Nucleo board.
- Examples_MIX uses only HAL, BSP and LL drivers (Middleware are not used), having as objective to demonstrate how to use both HAL and LL APIs in the same application, to combine the advantages of both APIs (HAL offers high level and functionalities oriented APIs, with high portability level and hide product or IPs complexity to end user. While LL offers low level APIs at registers level with better optimization). The examples are organized per peripheral (a folder for each peripheral, ex. TIM) and runs exclusively on Nucleo board.
- Applications intends to demonstrate the product performance and how to use the different Middleware stacks available. The Applications are organized per Middleware (a folder for each Middleware, ex. USB Host) or product feature that need high level firmware bricks (ex. Audio). Integration Applications that use several Middleware stacks are provided as well.
- Demonstrations aims to integrate and run the maximum of peripherals and Middleware stacks to showcase the product features and performance.
- A Template project is provided to allow user to quickly build any firmware application on a given board.

The examples are located under STM32Cube_FW_STM32CubeF0_VX.Y.Z\Projects\, and all of them have the same structure:

- \Inc folder that contains all header files.
- \Src folder for the sources code.
- \EWARM, \MDK-ARM and \SW4STM32 folders contain the preconfigured project for each toolchain.
- readme.txt describing the example behavior and the environment required to run the example.

To run the example, you have to do the following:

- Open the example using your preferred toolchain.
- Rebuild all files and load the image into target memory.
- Run the example by following the readme.txt instructions.
- Note: refer to section "Development Toolchains and Compilers" and "Supported Devices and EVAL boards" of the Firmware package release notes to know about the SW/HW environment used for the Firmware development and validation. The correct operation of the provided examples is not guaranteed on some environments, for example when using different compiler or board versions.

The provided examples can be tailored to run on any compatible hardware; user simply need to update the BSP drivers for his board, if it has the same hardware functions (LED, LCD display, pushbuttons...etc.). The BSP is based on a modular architecture that allows it to be ported easily to any hardware by just implementing the low level routines.

The table below contains the list of examples provided within STM32CubeF0 Firmware package.

Reference materials available on www.st.com/stm32cubefw

- Latest release of STM32CubeF0 Firmware package.
- UM1779: Getting started with the STM32CubeF0 firmware package for the STM32F0 series.
- UM1785: Description of STM32F0xx HAL drivers.
- UM1787: STM32CubeF0 Nucleo demonstration firmware.
- UM1819: Demonstration firmware for STM32091C-EVAL board .
- UM1734: STM32Cube USB Device library.
- UM1721: Developing Applications on STM32Cube with FatFs.
- UM1722: Developing Applications on STM32Cube with RTOS.

Level | Module Name | Project Name | Description | STM32072B_EVAL | STM32F072B-Discovery | STM32F031K6-Nucleo | STM32F030R8-Nucleo | STM32F070RB-Nucleo | STM32F072RB-Nucleo | STM32F0308-Discovery | STM32F042K6-Nucleo | STM32F091RC-Nucleo | STM32091C_EVAL
Templates | - | Starter project | This projects provides a reference template that can be used to build any firmware application. | X | X | X | X | X | X | X | X | X | X
Total number of templates: 10 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
Templates_LL | - | Starter project | This projects provides a reference template through the LL API that can be used to build any firmware application. | X | X | X | X | X | X | X | X | X | X
Total number of templates_ll: 10 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
Examples | - | BSP | This example provides a description of how to use the different BSP drivers. | X | - | - | - | - | - | - | - | - | X
ADC | ADC_AnalogWatchdog | How to use the ADC peripheral to perform conversions with an analog watchdog and out-of-window interrupts enabled. | - | - | - | - | - | X | - | - | X | -
ADC_DMA_Transfer | How to configure and use the ADC to convert an external analog input and get the result using a DMA transfer through the HAL API. | X | X | X | X | X | - | X | X | - | X
ADC_LowPower | How to use the ADC peripheral to perform conversions with ADC low-power modes: auto-wait and auto-power off. | X | - | - | - | - | - | - | - | - | X
ADC_RegularConversion_Polling | How to use the ADC in Polling mode to convert data through the HAL API. | X | X | - | - | - | - | - | - | - | X
ADC_Sequencer | How to use the ADC peripheral with a sequencer to convert several channels. | - | - | - | - | - | X | - | - | X | -
ADC_TriggerMode | How to use ADC1 and TIM2 to continuously convert data from an ADC channel. | X | X | - | - | - | - | - | - | - | X
CAN | CAN_Networking | How to configure the CAN peripheral to send and receive CAN frames in normal mode. | X | - | - | - | - | - | - | - | - | X
CEC | CEC_DataExchange | How to configure and use the CEC peripheral to receive and transmit messages. | X | - | - | - | - | - | - | - | - | X
CEC_ListenMode | How to configure and use the CEC peripheral to receive and transmit messages between two boards, while a third board (the spy device) listens but doesn't acknowledge the received messages. | X | - | - | - | - | - | - | - | - | X
CEC_MultiAddress | How to configure and use the CEC peripheral to receive and transmit messages in the case where one device supports two distinct logical addresses at the same time. | X | - | - | - | - | - | - | - | - | X
COMP | COMP_AnalogWatchdog | How to use a pair of comparator peripherals to compare a voltage level applied on a GPIO pin to two thresholds: the internal voltage reference (VREFINT) and a fraction of the internal voltage reference (VREFINT/4), in interrupt mode. | X | - | - | - | - | X | - | - | X | X
COMP_Interrupt | How to use a comparator peripheral to compare a voltage level applied on a GPIO pin to the the internal voltage reference (VREFINT), in interrupt mode. | X | X | - | - | - | X | - | - | X | X
CRC | CRC_Bytes_Stream_7bit_CRC | How to configure the CRC using the HAL API. The CRC (cyclic redundancy check) calculation unit computes 7-bit CRC codes derived from buffers of 8-bit data (bytes). The user-defined generating polynomial is manually set to 0x65, that is, X^7 + X^6 + X^5 + X^2 + 1, as used in the Train Communication Network, IEC 60870-5[17]. | - | X | - | - | - | X | - | - | X | -
CRC_Data_Reversing_16bit_CRC | How to configure the CRC using the HAL API. The CRC (cyclic redundancy check) calculation unit computes a 16-bit CRC code derived from a buffer of 8-bit data (bytes). Input and output data reversal features are enabled. The user-defined generating polynomial is manually set to 0x1021, that is, X^16 + X^12 + X^5 + 1 which is the CRC-CCITT generating polynomial. | - | X | - | - | - | X | - | - | X | -
CRC_Example | How to configure the CRC using the HAL API. The CRC (cyclic redundancy check) calculation unit computes the CRC code of a given buffer of 32-bit data words, using a fixed generator polynomial (0x4C11DB7). | X | X | X | X | X | X | X | X | X | X
CRC_UserDefinedPolynomial | How to configure the CRC using the HAL API. The CRC (cyclic redundancy check) calculation unit computes the 8-bit CRC code for a given buffer of 32-bit data words, based on a user-defined generating polynomial. | X | X | - | - | - | X | - | - | X | X
Cortex | CORTEXM_ProcessStack | How to modify the Thread mode stack. Thread mode is entered on reset, and can be entered as a result of an exception return. | - | X | - | X | X | X | X | - | X | -
CORTEXM_SysTick | How to use the default SysTick configuration with a 1 ms timebase to toggle LEDs. | X | X | - | X | X | X | X | - | X | X
DAC | DAC_SignalsGeneration | How to use the DAC peripheral to generate several signals using the DMA controller. | X | X | - | - | - | X | - | - | X | X
DAC_SimpleConversion | How to use the DAC peripheral to do a simple conversion. | X | X | - | - | - | X | - | - | X | X
DMA | DMA_FLASHToRAM | How to use a DMA to transfer a word data buffer from Flash memory to embedded SRAM through the HAL API At the beginning of the main program the HAL_Init() function is called to reset all the peripherals, initialize the Flash interface and the systick. | X | X | - | X | X | X | X | - | X | X
FLASH | FLASH_EraseProgram | How to configure and use the FLASH HAL API to erase and program the internal Flash memory. | X | X | X | X | X | X | - | X | X | X
FLASH_WriteProtection | How to configure and use the FLASH HAL API to enable and disable the write protection of the internal Flash memory. | X | X | - | X | X | X | - | - | X | X
GPIO | GPIO_EXTI | How to configure external interrupt lines. | X | X | - | X | X | X | X | - | X | X
GPIO_IOToggle | How to configure and use GPIOs through the HAL API PA.05 IO (configured in output pushpull mode) toggles in a forever loop. | X | X | X | X | X | X | X | X | X | X
HAL | HAL_TimeBase_RTC_ALARM | How to customize HAL using RTC alarm as main source of time base, instead of Systick. | - | - | - | - | X | - | - | - | X | X
HAL_TimeBase_RTC_WKUP | How to customize HAL using RTC wakeup as main source of time base, instead of Systick. | - | - | - | - | X | - | - | - | X | X
HAL_TimeBase_TIM | How to customize HAL using a general-purpose timer as main source of time base instead of Systick. | - | - | - | - | X | - | - | - | X | X
I2C | I2C_EEPROM | How to handle I2C data buffer transmission/reception with DMA. In the example, the device communicates with an I2C EEPROM memory. | X | X | - | - | - | - | - | - | - | X
I2C_TwoBoards_AdvComIT | How to handle I2C data buffer transmission/reception between two boards, using an interrupt. | - | X | - | X | X | X | X | - | X | X
I2C_TwoBoards_ComDMA | How to handle I2C data buffer transmission/reception between two boards, via DMA. | X | X | - | X | X | X | X | - | X | -
I2C_TwoBoards_ComIT | How to handle I2C data buffer transmission/reception between two boards, using an interrupt. | - | X | - | X | X | X | X | - | X | -
I2C_TwoBoards_ComPolling | How to handle I2C data buffer transmission/reception between two boards, in polling mode. | - | X | - | X | X | X | X | - | X | -
I2C_TwoBoards_RestartAdvComIT | How to perform multiple I2C data buffer transmission/reception between two boards, in interrupt mode and with restart condition. | - | - | - | - | - | X | - | - | - | -
I2C_TwoBoards_RestartComIT | How to handle single I2C data buffer transmission/reception between two boards, in interrupt mode and with restart condition. | - | - | - | - | - | X | - | - | - | -
I2C_WakeUpFromStop | How to handle I2C data buffer transmission/reception between two boards, using an interrupt when the device is in Stop mode. | - | X | - | - | - | X | - | - | X | X
IWDG | IWDG_Reset | How to handle the IWDG reload counter and simulate a software fault that generates an MCU IWDG reset after a preset laps of time. | X | X | X | X | X | X | X | X | X | X
IWDG_WindowMode | How to periodically update the IWDG reload counter and simulate a software fault that generates an MCU IWDG reset after a preset laps of time. | X | X | X | X | X | X | X | X | X | X
PWR | PWR_CurrentConsumption | How to configure the system to measure the current consumption in different low-power modes. | - | X | - | X | X | X | X | - | X | -
PWR_PVD | How to configure the programmable voltage detector by using an external interrupt line. External DC supply must be used to supply Vdd. | - | X | - | - | - | X | - | - | X | -
PWR_STANDBY | How to enter the Standby mode and wake up from this mode by using an external reset or the WKUP pin. | X | - | - | - | - | - | - | - | - | X
PWR_STOP | How to enter the Stop mode and wake up from this mode by using the RTC wakeup timer event or an interrupt. | X | - | - | - | - | - | - | - | - | X
RCC | RCC_CRS_Synchronization_IT | Configuration of the clock recovery service (CRS) in Interrupt mode, using the RCC HAL API. | X | - | - | - | - | - | - | - | - | X
RCC_CRS_Synchronization_Polling | Configuration of the clock recovery service (CRS) in Polling mode, using the RCC HAL API. | X | - | - | - | - | - | - | - | - | X
RCC_ClockConfig | Configuration of the system clock (SYSCLK) and modification of the clock settings in Run mode, using the RCC HAL API. | X | X | - | - | X | X | X | - | X | X
RTC | RTC_Alarm | Configuration and generation of an RTC alarm using the RTC HAL API. | - | X | X | X | X | X | X | X | X | -
RTC_Calendar | Configuration of the calendar using the RTC HAL API. | X | - | - | - | - | - | - | - | - | X
RTC_Tamper | Configuration of the RTC HAL API to write/read data to/from RTC Backup registers. | X | X | X | - | - | X | - | X | X | X
SMBUS | SMBUS_TSENSOR | MBUS data buffer transmission/reception using an interrupt. The STM32 microcontroller communicates with an SMBUS temperature sensor. | X | - | - | - | - | - | - | - | - | X
SPI | SPI_FullDuplex_ComDMA | Data buffer transmission/reception between two boards via SPI using DMA. | - | X | X | X | X | X | X | X | X | -
SPI_FullDuplex_ComIT | Data buffer transmission/reception between two boards via SPI using Interrupt mode. | - | X | X | X | X | X | X | X | X | -
SPI_FullDuplex_ComPolling | Data buffer transmission/reception between two boards via SPI using Polling mode. | - | X | X | X | X | X | X | X | X | -
TIM | TIM_ComplementarySignals | Configuration of the TIM1 peripheral to generate three complementary signals, insert a predefined deadtime value, use the break feature, and lock the break and dead-time configuration. | - | X | - | X | X | X | X | - | X | -
TIM_DMA | Use of the DMA with TIMER Update request to transfer data from memory to TIMER Capture Compare Register 3 (TIMx_CCR3). | - | X | - | X | X | X | X | - | X | -
TIM_InputCapture | Use of the TIM peripheral to measure an external signal frequency. | X | X | - | X | X | X | X | - | X | X
TIM_PWMInput | Use of the TIM peripheral to measure the frequency and duty cycle of an external signal. | - | X | - | X | X | X | X | - | X | -
TIM_PWMOutput | Configuration of the TIM peripheral in PWM (pulse width modulation) mode. | X | X | - | X | - | X | X | - | X | X
TIM_TimeBase | Configuration of the TIM peripheral to generate a timebase of one second with the corresponding interrupt request. | X | X | - | X | X | X | X | - | X | -
TSC | TSC_BasicAcquisition_Interrupt | Use of he TSC to perform continuous acquisitions of two channels in Interrupt mode. | X | X | - | - | - | - | - | - | - | X
TSC_BasicAcquisition_Polling | Use of the TSC to perform continuous acquisitions of one channel in Polling mode. | X | X | - | - | - | - | - | - | - | X
UART | UART_HyperTerminal_DMA | UART transmission (transmit/receive) in DMA mode between a board and an HyperTerminal PC application. | X | - | X | - | - | - | - | X | - | X
UART_OneBoards_8UART | This example guides you through the different configuration steps by mean of HAL API to ensure Data buffer transmission and reception At the beginning of the main program the HAL_Init() function is called to reset all the peripherals, initialize the Flash interface and the systick. | - | - | - | - | - | - | - | - | - | X
UART_TwoBoards_ComDMA | UART transmission (transmit/receive) in DMA mode between two boards. | - | X | X | X | X | X | X | X | X | -
UART_TwoBoards_ComIT | UART transmission (transmit/receive) in Interrupt mode between two boards. | - | X | X | X | X | X | X | X | X | -
UART_TwoBoards_ComPolling | UART transmission (transmit/receive) in Polling mode between two boards. | - | X | X | X | X | X | X | X | X | -
UART_WakeUpFromStop | Configuration of an UART to wake up the MCU from STOP mode when a given stimulus is received. | X | X | X | - | - | X | - | X | X | X
WWDG | WWDG_Example | Configuration of the HAL API to periodically update the WWDG counter and simulate a software fault that generates an MCU WWDG reset when a predefined time period has elapsed. | X | X | X | X | X | X | X | X | X | X
Total number of examples: 349 | 41 | 46 | 17 | 30 | 33 | 45 | 29 | 17 | 46 | 45
Examples_LL | ADC | ADC_AnalogWatchdog | How to use an ADC peripheral with an ADC analog watchdog to monitor a channel and detect when the corresponding conversion data is outside the window thresholds. | - | - | - | - | - | X | - | - | - | -
ADC_ContinuousConversion_TriggerSW | How to use an ADC peripheral to perform continuous ADC conversions on a channel, from a software start. | - | - | - | - | - | X | - | - | - | -
ADC_ContinuousConversion_TriggerSW_Init | How to use an ADC peripheral to perform continuous ADC conversions on a channel, from a software start. | - | - | - | - | - | X | - | - | - | -
ADC_ContinuousConversion_TriggerSW_LowPower | How to use an ADC peripheral with ADC low-power features. | - | - | - | - | - | X | - | - | - | -
ADC_MultiChannelSingleConversion | How to use an ADC peripheral to convert several channels. ADC conversions are performed successively in a scan sequence. | - | - | - | - | - | X | - | - | - | -
ADC_SingleConversion_TriggerSW | How to use an ADC peripheral to perform a single ADC conversion on a channel at each software start. This example uses the polling programming model (for interrupt or DMA programming models, please refer to other examples). | - | - | - | - | - | X | - | - | - | -
ADC_SingleConversion_TriggerSW_DMA | How to use an ADC peripheral to perform a single ADC conversion on a channel, at each software start. This example uses the DMA programming model (for polling or interrupt programming models, refer to other examples). | - | - | - | - | - | X | - | - | - | -
ADC_SingleConversion_TriggerSW_IT | How to use an ADC peripheral to perform a single ADC conversion on a channel, at each software start. This example uses the interrupt programming model (for polling or DMA programming models, please refer to other examples). | - | - | - | - | - | X | - | - | - | -
ADC_SingleConversion_TriggerTimer_DMA | How to use an ADC peripheral to perform a single ADC conversion on a channel at each trigger event from a timer. Converted data is indefinitely transferred by DMA into a table (circular mode). | - | - | - | - | - | X | - | - | - | -
ADC_TemperatureSensor | How to use an ADC peripheral to perform a single ADC conversion on the internal temperature sensor and calculate the temperature in degrees Celsius. | - | - | - | - | - | X | - | - | - | -
COMP | COMP_CompareGpioVsVrefInt_IT | How to use a comparator peripheral to compare a voltage level applied on a GPIO pin to the internal voltage reference (VREFINT), in interrupt mode. This example is based on the STM32F0xx COMP LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
COMP_CompareGpioVsVrefInt_IT_Init | How to use a comparator peripheral to compare a voltage level applied on a GPIO pin to the the internal voltage reference (VREFINT), in interrupt mode. This example is based on the STM32F0xx COMP LL API. The peripheral initialization uses the LL initialization function to demonstrate LL init usage. | - | - | - | - | - | X | - | - | - | -
COMP_CompareGpioVsVrefInt_OutputGpio | How to use a comparator peripheral to compare a voltage level applied on a GPIO pin to the internal voltage reference (VREFINT). The comparator output is connected to a GPIO. This example is based on the STM32F0xx COMP LL API. | - | - | - | - | - | X | - | - | - | -
COMP_CompareGpioVsVrefInt_Window_IT | How to use a pair of comparator peripherals to compare a voltage level applied on a GPIO pin to two thresholds: the internal voltage reference (VREFINT) and a fraction of the internal voltage reference (VREFINT/2), in interrupt mode. This example is based on the STM32F0xx COMP LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
CRC | CRC_CalculateAndCheck | How to configure the CRC calculation unit to compute a CRC code for a given data buffer, based on a fixed generator polynomial (default value 0x4C11DB7). The peripheral initialization is done using LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
CRC_UserDefinedPolynomial | How to configure and use the CRC calculation unit to compute an 8-bit CRC code for a given data buffer, based on a user-defined generating polynomial. The peripheral initialization is done using LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
CRS | CRS_Synchronization_IT | How to configure the clock recovery service in IT mode through the STM32F0xx CRS LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
CRS_Synchronization_Polling | How to configure the clock recovery service in polling mode through the STM32F0xx CRS LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
DAC | DAC_GenerateConstantSignal_TriggerSW | How to use the DAC peripheral to generate a constant voltage signal. This example is based on the STM32F0xx DAC LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
DAC_GenerateWaveform_TriggerHW | How to use the DAC peripheral to generate a voltage waveform from a digital data stream transferred by DMA. This example is based on the STM32F0xx DAC LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
DAC_GenerateWaveform_TriggerHW_Init | How to use the DAC peripheral to generate a voltage waveform from a digital data stream transferred by DMA. This example is based on the STM32F0xx DAC LL API. The peripheral initialization uses LL initialization functions to demonstrate LL init usage. | - | - | - | - | - | X | - | - | - | -
DMA | DMA_CopyFromFlashToMemory | How to use a DMA channel to transfer a word data buffer from Flash memory to embedded SRAM. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
DMA_CopyFromFlashToMemory_Init | How to use a DMA channel to transfer a word data buffer from Flash memory to embedded SRAM. The peripheral initialization uses LL initialization functions to demonstrate LL init usage. | - | - | - | - | - | X | - | - | - | -
EXTI | EXTI_ToggleLedOnIT | How to configure the EXTI and use GPIOs to toggle the user LEDs available on the board when a user button is pressed. It is based on the STM32F0xx LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
EXTI_ToggleLedOnIT_Init | How to configure the EXTI and use GPIOs to toggle the user LEDs available on the board when a user button is pressed. This example is based on the STM32F0xx LL API. The peripheral initialization uses LL initialization functions to demonstrate LL init usage. | - | - | - | - | - | X | - | - | - | -
GPIO | GPIO_InfiniteLedToggling | How to configure and use GPIOs to toggle the on-board user LEDs every 250 ms. This example is based on the STM32F0xx LL API. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
GPIO_InfiniteLedToggling_Init | How to configure and use GPIOs to toggle the on-board user LEDs every 250 ms. This example is based on the STM32F0xx LL API. The peripheral is initialized with LL initialization function to demonstrate LL init usage PA.05 IO (configured in output pushpull mode) toggles in a forever loop. | - | - | - | - | - | X | - | - | - | -
I2C | I2C_OneBoard_AdvCommunication_DMAAndIT | How to exchange data between an I2C master device in DMA mode and an I2C slave device in interrupt mode. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
I2C_OneBoard_Communication_DMAAndIT | How to transmit data bytes from an I2C master device using DMA mode to an I2C slave device using interrupt mode. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
I2C_OneBoard_Communication_IT | How to handle the reception of one data byte from an I2C slave device by an I2C master device. Both devices operate in interrupt mode. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
I2C_OneBoard_Communication_IT_Init | How to handle the reception of one data byte from an I2C slave device by an I2C master device. Both devices operate in interrupt mode. The peripheral is initialized with LL initialization function to demonstrate LL init usage. | - | - | - | - | - | X | - | - | - | -
I2C_OneBoard_Communication_PollingAndIT | How to transmit data bytes from an I2C master device using polling mode to an I2C slave device using interrupt mode. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
I2C_TwoBoards_MasterRx_SlaveTx_IT | How to handle the reception of one data byte from an I2C slave device by an I2C master device. Both devices operate in interrupt mode. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
I2C_TwoBoards_MasterTx_SlaveRx | How to transmit data bytes from an I2C master device using polling mode to an I2C slave device using interrupt mode. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
I2C_TwoBoards_MasterTx_SlaveRx_DMA | How to transmit data bytes from an I2C master device using DMA mode to an I2C slave device using DMA mode. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
I2C_TwoBoards_WakeUpFromStop_IT | How to handle the reception of a data byte from an I2C slave device in Stop mode using IT mode by an I2C master device, both using interrupt mode. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
IWDG | IWDG_RefreshUntilUserEvent | How to configure the IWDG peripheral to ensure periodical counter update and generate an MCU IWDG reset when a user button is pressed. The peripheral is initialized with LL unitary service functions to optimize for performance and size. | - | - | - | - | - | X | - | - | - | -
PWR | PWR_EnterStandbyMode | How to enter the Standby mode and wake up from this mode by using an external reset or a wakeup interrupt. | - | - | - | - | - | X | - | - | - | -
PWR_EnterStopMode | How to enter the system in STOP_LPREGU mode. | - | - | - | - | - | X | - | - | - | -
RCC | RCC_OutputSystemClockOnMCO | Configuration of MCO pin (PA8) to output the system clock. | - | - | - | - | - | X | - | - | - | -
RCC_UseHSEasSystemClock | Use of the RCC LL API to start the HSE and use it as system clock. | - | - | - | - | - | X | - | - | - | -
RCC_UseHSI_PLLasSystemClock | Modification of the PLL parameters in run time. | - | - | - | - | - | X | - | - | - | -
RTC | RTC_Alarm | Configuration of the RTC LL API to configure and generate an alarm using the RTC peripheral. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
RTC_Alarm_Init | Configuration of the RTC LL API to configure and generate an alarm using the RTC peripheral. The peripheral initialization uses the LL initialization function. | - | - | - | - | - | X | - | - | - | -
RTC_Calendar | Configuration of the LL API to set the RTC calendar. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
RTC_ExitStandbyWithWakeUpTimer | Configuration of the RTC to wake up from Standby mode using the RTC Wakeup timer. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
RTC_Tamper | Configuration of the Tamper using the RTC LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
RTC_TimeStamp | Configuration of the Timestamp using the RTC LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
SPI | SPI_OneBoard_HalfDuplex_DMA | Configuration of GPIO and SPI peripherals to transmit bytes from an SPI Master device to an SPI Slave device in DMA mode. This example is based on the STM32F0xx SPI LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
SPI_OneBoard_HalfDuplex_DMA_Init | Configuration of GPIO and SPI peripherals to transmit bytes from an SPI Master device to an SPI Slave device in DMA mode. This example is based on the STM32F0xx SPI LL API. The peripheral initialization uses the LL initialization function to demonstrate LL init usage. | - | - | - | - | - | X | - | - | - | -
SPI_OneBoard_HalfDuplex_IT | Configuration of GPIO and SPI peripherals to transmit bytes from an SPI Master device to an SPI Slave device in Interrupt mode. This example is based on the STM32F0xx SPI LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
SPI_TwoBoards_FullDuplex_DMA | Data buffer transmission and reception via SPI using DMA mode. This example is based on the STM32F0xx SPI LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
SPI_TwoBoards_FullDuplex_IT | Data buffer transmission and reception via SPI using Interrupt mode. This example is based on the STM32F0xx SPI LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
TIM | TIM_BreakAndDeadtime | Configuration of the TIM peripheral to three center-aligned PWM and complementary PWM signals, insert a defined deadtime value, use the break feature, and lock the break and dead-time configuration. | - | - | - | - | - | X | - | - | - | -
TIM_DMA | Use of the DMA with a timer update request to transfer data from memory to Timer Capture Compare Register 3 (TIMx_CCR3). This example is based on the STM32F0xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
TIM_InputCapture | Use of the TIM peripheral to measure a periodic signal frequency provided either by an external signal generator or by another timer instance. This example is based on the STM32F0xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
TIM_OnePulse | Configuration of a timer to generate a positive pulse in Output Compare mode with a length of tPULSE and after a delay of tDELAY. This example is based on the STM32F0xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
TIM_OutputCompare | Configuration of the TIM peripheral to generate an output waveform in different output compare modes. This example is based on the STM32F0xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
TIM_PWMOutput | Use of a timer peripheral to generate a PWM output signal and update the PWM duty cycle. This example is based on the STM32F0xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
TIM_PWMOutput_Init | Use of a timer peripheral to generate a PWM output signal and update the PWM duty cycle. This example is based on the STM32F0xx TIM LL API. The peripheral initialization uses LL initialization function to demonstrate LL init. | - | - | - | - | - | X | - | - | - | -
TIM_TimeBase | Configuration of the TIM peripheral to generate a timebase. This example using the STM32F0xx TIM LL API.The peripheral initialization uses LL unitary services functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
USART | USART_Communication_Rx_IT | Configuration of GPIO and USART peripherals to receive characters from an HyperTerminal (PC) in Asynchronous mode using an interrupt. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
USART_Communication_Rx_IT_Continuous | Configuration of GPIO and USART peripherals to continuously receive characters from an HyperTerminal (PC) in Asynchronous mode using an interrupt. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
USART_Communication_Rx_IT_Init | Configuration of GPIO and USART peripherals to receive characters from an HyperTerminal (PC) in Asynchronous mode using an interrupt. The peripheral initialization uses the LL initialization function to demonstrate LL init. | - | - | - | - | - | X | - | - | - | -
USART_Communication_Tx | Configuration of GPIO and USART peripherals to send characters asynchronously to an HyperTerminal (PC) in Polling mode. If the transfer could not be complete within the allocated time, a timeout allows to exit from the sequence with timeout error. This example is based on STM32F0xx USART LL API. | - | - | - | - | - | X | - | - | - | -
USART_Communication_TxRx_DMA | Configuration of GPIO and USART peripherals to send characters asynchronously to/from an HyperTerminal (PC) in DMA mode. | - | - | - | - | - | X | - | - | - | -
USART_Communication_Tx_IT | Configuration of GPIO and USART peripheral to send characters asynchronously to HyperTerminal (PC) in Interrupt mode. This example is based on the STM32F0xx USART LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
USART_HardwareFlowControl | Configuration of GPIO and USART peripheral to receive characters asynchronously from an HyperTerminal (PC) in Interrupt mode with the Hardware Flow Control feature enabled. This example is based on STM32F0xx USART LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
USART_SyncCommunication_FullDuplex_DMA | Configuration of GPIO, USART, DMA and SPI peripherals to transmit bytes between a USART and an SPI (in slave mode) in DMA mode. This example is based on the STM32F0xx USART LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
USART_SyncCommunication_FullDuplex_IT | Configuration of GPIO, USART, DMA and SPI peripherals to transmit bytes between a USART and an SPI (in slave mode) in Interrupt mode. This example is based on the STM32F0xx USART LL API (the SPI uses the DMA to receive/transmit characters sent from/received by the USART). The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
USART_WakeUpFromStop | Configuration of GPIO and USART peripherals to allow the characters received on USART RX pin to wake up the MCU from low-power mode. | - | - | - | - | - | X | - | - | - | -
UTILS | UTILS_ConfigureSystemClock | This example describes how to use UTILS LL API to configure the system clock using PLL with HSI as source clock. The user application just needs to calculate PLL parameters using STM32CubeMX and call the UTILS LL API. | - | - | - | - | - | X | - | - | - | -
UTILS_ReadDeviceInfo | This example describes how to Read UID, Device ID and Revision ID and save them into a global information buffer. | - | - | - | - | - | X | - | - | - | -
WWDG | WWDG_RefreshUntilUserEvent | Configuration of the WWDG to periodically update the counter and generate an MCU WWDG reset when a user button is pressed. The peripheral initialization uses the LL unitary service functions for optimization purposes (performance and size). | - | - | - | - | - | X | - | - | - | -
Total number of examples_ll: 74 | 0 | 0 | 0 | 0 | 0 | 74 | 0 | 0 | 0 | 0
Examples_MIX | ADC | ADC_SingleConversion_TriggerSW_IT | How to use the ADC to perform a single ADC channel conversion at each software start. This example uses the interrupt programming model (for polling and DMA programming models, please refer to other examples). It is based on the STM32F0xx ADC HAL and LL API. The LL API is used for performance improvement. | - | - | - | - | - | X | - | - | - | -
CRC | CRC_PolynomialUpdate | How to use the CRC peripheral through the STM32F0xx CRC HAL and LL API. | - | - | - | - | - | X | - | - | - | -
DMA | DMA_FLASHToRAM | How to use a DMA to transfer a word data buffer from Flash memory to embedded SRAM through the STM32F0xx DMA HAL and LL API. The LL API is used for performance improvement. | - | - | - | - | - | X | - | - | - | -
I2C | I2C_OneBoard_ComSlave7_10bits_IT | How to perform I2C data buffer transmission/reception between one master and two slaves with different Address size (7-bit or 10-bit). This example uses the STM32F0xx HAL & LL API (LL API used for performance improvement) and an interrupt. | - | - | - | - | - | X | - | - | - | -
PWR | PWR_STANDBY_RTC | How to enter the Standby mode and wake up from this mode by using an external reset or the RTC wakeup timer through the STM32F0xx RTC and RCC HAL, and LL API (LL API use for maximizing performance). | - | - | - | - | - | X | - | - | - | -
PWR_STOP | How to enter the system in STOP with Low power regulator mode and wake up from this mode by using external reset or wakeup interrupt (all the RCC function calls use RCC LL API for minimizing footprint and maximizing performance). | - | - | - | - | - | X | - | - | - | -
SPI | SPI_FullDuplex_ComPolling | Data buffer transmission/reception between two boards via SPI using Polling mode. | - | - | - | - | - | X | - | - | - | -
SPI_HalfDuplex_ComPollingIT | Data buffer transmission/reception between two boards via SPI using Polling (LL driver) and Interrupt modes (HAL driver). | - | - | - | - | - | X | - | - | - | -
TIM | TIM_6Steps | Configuration of the TIM1 peripheral to generate six-step PWM signals. | - | - | - | - | - | X | - | - | - | -
UART | UART_HyperTerminal_IT | Use of a UART to transmit data (transmit/receive) between a board and an HyperTerminal PC application in Interrupt mode. This example describes how to use the USART peripheral through the STM32F0xx UART HAL and LL API, the LL API used for performance improvement. | - | - | - | - | - | X | - | - | - | -
UART_HyperTerminal_TxPolling_RxIT | Use of a UART to transmit data (transmit/receive) between a board and an HyperTerminal PC application both in Polling and Interrupt modes. This example describes how to use the USART peripheral through the STM32F0xx UART HAL and LL API, the LL API being used for performance improvement. | - | - | - | - | - | X | - | - | - | -
Total number of examples_mix: 11 | 0 | 0 | 0 | 0 | 0 | 11 | 0 | 0 | 0 | 0
Applications | EEPROM | EEPROM_Emulation | This application shows how to emulate EEPROM on internal flash. | - | - | - | - | - | - | - | - | X | -
FatFs | FatFs_uSD | How to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module. This application uses Fatfs features to configure a microSD drive. | X | - | - | - | - | - | - | - | X | X
FreeRTOS | FreeRTOS_LowPower | How to enter and exit low-power mode with CMSIS RTOS API. | X | - | - | - | - | - | - | - | - | X
FreeRTOS_Mail | How to use mail queues with CMSIS RTOS API. | - | - | - | - | - | - | - | - | - | X
FreeRTOS_Mutexes | This application shows How to use mutexes with CMSIS RTOS API. | X | - | - | - | - | - | - | - | - | X
FreeRTOS_Queues | How to use message queues with CMSIS RTOS API. | X | - | - | - | - | - | - | - | - | X
FreeRTOS_Semaphore | How to use semaphores with CMSIS RTOS API. | X | - | - | - | - | - | - | - | - | X
FreeRTOS_SemaphoreFromISR | How to use semaphore from ISR with CMSIS RTOS API. | X | - | - | - | - | - | - | - | - | X
FreeRTOS_Signal | How to perform thread signaling using CMSIS RTOS API. | - | - | - | - | - | - | - | - | - | X
FreeRTOS_SignalFromISR | How to perform thread signaling from an interrupt using CMSIS RTOS API. | - | - | - | - | - | - | - | - | - | X
FreeRTOS_ThreadCreation | How to implement thread creation using CMSIS RTOS API. | X | X | - | X | X | X | X | - | X | X
FreeRTOS_Timers | How to use timers of CMSIS RTOS API. | X | - | - | - | - | - | - | - | - | X
IAP | IAP_Binary_Template | This directory contains a set of sources files that build the application to be loaded into Flash memory using In-Application Programming (IAP) through USART. | - | - | - | - | - | - | - | - | - | X
IAP_Main | This directory contains a set of sources files and pre-configured projects that describes how to build an application to be loaded into Flash memory using In-Application Programming (IAP) through USART. | - | - | - | - | - | - | - | - | - | X
STemWin | STemWin_HelloWorld | Simple "Hello World" example based on STemWin. | - | - | - | - | - | - | - | - | - | X
TouchSensing | TouchSensing_2touchkeys | This firmware is a basic example on how to use the STMTouch driver with 2 touchkey sensors. The ECS and DTO are also used. | X | - | - | - | - | - | - | - | - | X
TouchSensing_Linear | This firmware is a basic example on how to use the STMTouch driver with 1 linear sensor. The ECS and DTO are also used. | - | X | - | - | - | - | - | - | - | -
TouchSensing_Linear_IT | This firmware is a basic example on how to use the STMTouch driver with 1 linear sensor. The ECS and DTO are also used. | - | X | - | - | - | - | - | - | - | -
USB_Device | CDC_Standalone | Use of the USB device application based on the Device Communication Class (CDC) and following the PSTN subprotocol. This application uses the USB Device and UART peripherals. | X | - | - | - | - | - | - | - | - | -
CustomHID_Standalone | Use of the USB device application based on the Custom HID Class. | X | - | - | - | - | - | - | - | - | -
DFU_Standalone | Compliant implementation of the Device Firmware Upgrade (DFU) capability to program the embedded Flash memory through the USB peripheral. | X | X | - | - | - | - | - | - | - | -
HID_BCD_Standalone | Use the BCD feature based on the USB HID device application on the STM32F0xx devices. | - | X | - | - | - | - | - | - | - | -
HID_Standalone | Use of the USB device application based on the Human Interface (HID). | X | X | - | - | - | - | - | - | - | -
MSC_Standalone | Use of the USB device application based on the Mass Storage Class (MSC). | X | - | - | - | - | - | - | - | - | -
Total number of applications: 42 | 14 | 6 | 0 | 1 | 1 | 1 | 1 | 0 | 3 | 15
Demonstrations | - | Demo | Demonstration firmware based on STM32Cube. This example helps you to discover STM32 Cortex-M devices that are plugged onto your STM32 Nucleo board. | - | X | - | X | X | X | X | - | X | X
Gravitech_4Digits_Counter | How to use the Gravitech 7 segment 4 digits shield with a Nucleo 32 Board. | - | - | X | - | - | - | - | X | - | -
Total number of demonstrations: 9 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
Total number of projects: 505 | 57 | 55 | 20 | 34 | 37 | 134 | 33 | 20 | 52 | 63