STM32CubeF2 Firmware Examples for STM32F2xx Series

The STM32CubeF2 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:

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

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

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 STM32Cube_FW_F2 Firmware package.
In this table, the label CubeMX means the projects have been created using STM32CubeMX, the STM32Cube initialization code generator. Those projects can be opened with this tools to modify the projects itself. The others projects are manually created to demonstrate the product features.

Reference materials available on www.st.com/stm32cubefw

Level Module Name Project Name Description Overall Unique STM322xG_EVAL NUCLEO-F207ZG

Templates

-

Starter project

This directory provides a reference template project that can be used to build any firmware application. 2 X X
Total number of templates2 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. 2 X X
Total number of templates_ll2 1 1 1

Examples

-

BSP

This example provides a description of how to use the different BSP drivers. 2 X X

SDIO

1 X -

ADC

ADC_DualModeInterleaved

How to use two ADC peripherals to perform conversions in dual interleaved mode. 1 X -

ADC_InjectedConversion_Interrupt

How to interrupt continuous ADC regular channel conversion using ADC injected channels, and how to get the result of this conversion. 1 X -

ADC_RegularConversion_DMA

How to use the ADC3 and DMA to transfer continuously converted data from ADC3 to memory. 2 X X

ADC_RegularConversion_Interrupt

How to use the ADC in interrupt mode to convert data through the HAL API. 2 X X

ADC_RegularConversion_Polling

How to use the ADC in Polling mode to convert data through the HAL API. 1 X -

ADC_TriggerMode

How to use ADC3 and TIM8 to continuously convert data from an ADC channel. 1 X -

ADC_TripleModeInterleaved

How to use the ADC peripheral to convert a regular channel in Triple interleaved mode. 1 X -

CAN

CAN_LoopBack

How to set up a communication with the CAN in loopback mode. 1 X -

CAN_Networking

How to configure the CAN peripheral to send and receive CAN frames in normal mode. 1 X -

CRC

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). 2 X X

CRYP

CRYP_AESModes

How to use the CRYP peripheral to encrypt/decrypt data(Plaintext/Ciphertext) using AES ECB, CBC and CTR algorithm. 1 X -

CRYP_AESModes_DMA

How to use the CRYPTO peripheral to encrypt/decrypt data(Plaintext/Ciphertext) using AES ECB algorithm in DMA mode with swapping. 1 X -

CRYP_TDESModes

How to use the CRYPTO peripheral to encrypt/decrypt data(Plaintext/Ciphertext) using TDES ECB and CBC algorithm. 1 X -

Cortex

CORTEXM_MPU

Presentation of the MPU feature. This example configures a memory area as privileged read-only, and attempts to perform read and write operations in different modes. 2 X X

CORTEXM_ModePrivilege

How to modify the Thread mode privilege access and stack. Thread mode is entered on reset or when returning from an exception. 1 X -

CORTEXM_SysTick

How to use the default SysTick configuration with a 1 ms timebase to toggle LEDs. 2 X X

DAC

DAC_SignalsGeneration

How to use the DAC peripheral to generate several signals using the DMA controller. 1 X -

DAC_SimpleConversion

How to use the DAC peripheral to do a simple conversion. 1 X -

DCMI

DCMI_CaptureMode

How to use the DCMI to interface with camera module and display in continuous mode the picture on LCD. 1 X -

DCMI_SnapshotMode

How to use the DCMI to interface with camera module and display in snapshot mode the picture on LCD. 1 X -

DMA

DMA_FIFOMode

How to, through the HAL API, use a DMA to transfer a word data buffer from Flash memory to embedded SRAM with FIFO mode enabled. 1 X -

DMA_FLASHToRAM

How to use a DMA to transfer a word data buffer from Flash memory to embedded SRAM through the HAL API. 2 X X

FLASH

FLASH_EraseProgram

How to configure and use the FLASH HAL API to erase and program the internal Flash memory. 2 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. 1 X -

FSMC

FSMC_SRAM

How to configure the FSMC controller to access the SRAM memory. 1 X -

FSMC_SRAM_DataMemory

How to configure the FSMC controller to access the SRAM memory including the heap and stack. 1 X -

GPIO

GPIO_EXTI

How to configure external interrupt lines. 2 X X

GPIO_IOToggle

How to configure and use GPIOs through the HAL API. 2 X X

HAL

HAL_TimeBase_RTC_ALARM

How to customize HAL using RTC alarm as main source of time base, instead of Systick. 2 X X

HAL_TimeBase_RTC_WKUP

How to customize HAL using RTC wakeup as main source of time base, instead of Systick. 2 X X

HAL_TimeBase_TIM

How to customize HAL using a general-purpose timer as main source of time base instead of Systick. 2 X X

HASH

HASH_HMAC_SHA1MD5

How to use the HASH peripheral to hash data with HMAC SHA-1 and HMAC MD5 algorithms. 1 X -

HASH_SHA1MD5

How to use the HASH peripheral to hash data with SHA-1 and MD5 algorithms. 1 X -

HASH_SHA1MD5_DMA

How to use the HASH peripheral to hash data using SHA-1 and MD5 algorithms when data are fed to the HASH unit with DMA. 1 X -

I2C

I2C_TwoBoards_AdvComIT

How to handle I2C data buffer transmission/reception between two boards, using an interrupt. 1 X -

I2S

I2S_Audio

Basic implementation of audio features. This example allows playing an audio file with an external codec on the STM322xG_EVAL board through the I2S peripheral using DMA transfer. 1 X -

IWDG

IWDG_Example

This example describes how to reload the IWDG counter and to simulate a software fault by generating an MCU IWDG reset when a programmed time period has elapsed. 2 X X

PWR

PWR_BOR

This example shows how to configure the programmable BOR thresholds using the FLASH option bytes. 1 X -

PWR_CurrentConsumption

How to configure the system to measure the current consumption in different low-power modes. 2 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. 1 X -

PWR_STANDBY

How to enter the Standby mode and wake up from this mode by using an external reset or the WKUP pin. 1 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. 1 X -

RCC

RCC_ClockConfig

Configuration of the system clock (SYSCLK) and modification of the clock settings in Run mode, using the RCC HAL API. 2 X X

RNG

RNG_MultiRNG

Configuration of the RNG using the HAL API. This example uses the RNG to generate 32-bit long random numbers. 1 X -

RTC

RTC_Alarm

Configuration and generation of an RTC alarm using the RTC HAL API. 1 X -

RTC_Calendar

Configuration of the calendar using the RTC HAL API. 2 X X

RTC_Tamper

Configuration of the RTC HAL API to write/read data to/from RTC Backup registers. 2 X X

RTC_TimeStamp

Configuration of the RTC HAL API to demonstrate the timestamp feature. 1 X -

SMARTCARD

SMARTCARD_T0

Firmware smartcard interface based on USART. The main purpose of this firmware example is to provide resources that ease the development of applications using the USART in Smartcard mode. 1 X -

SPI

SPI_FullDuplex_AdvComIT

Configuration of the HAL SPI API to transmit/receive a data buffer using Interrupt mode in an advanced communication mode: The master board always sends the command to the slave before performing any transmission; the slave board sends back an acknowledgement before proceeding. 1 X -

SPI_FullDuplex_ComDMA

Data buffer transmission/reception between two boards via SPI using DMA. 1 X -

SPI_FullDuplex_ComIT

Data buffer transmission/reception between two boards via SPI using Interrupt mode. 1 X -

SPI_FullDuplex_ComPolling

Data buffer transmission/reception between two boards via SPI using Polling mode. 1 X -

TIM

TIM_6Steps

This example shows how to configure the TIM1 peripheral to generate 6 Steps. 1 X -

TIM_7PWMOutput

Configuration of the TIM1 peripheral to generate seven PWM signals with four different duty cycles (50%, 37.5%, 25% and 12.5%). 1 X -

TIM_CascadeSynchro

Synchronization of TIM2 and TIM3/TIM4 timers in Cascade mode. 1 X -

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. 1 X -

TIM_DMA

Use of the DMA with TIMER Update request to transfer data from memory to TIMER Capture Compare Register 3 (TIM1_CCR3). 2 X X

TIM_DMABurst

Update of the TIMER channel 1 period and duty cycle using the TIMER DMA burst feature. 1 X -

TIM_Encoder

Configuration of the TIM1 peripheral in Encoder mode to determinate the rotation direction. 1 X -

TIM_ExtTriggerSynchro

Synchronization of TIM peripherals in Cascade mode with an external trigger. 1 X -

TIM_InputCapture

Use of the TIM peripheral to measure an external signal frequency. 2 X X

TIM_OCActive

Configuration of the TIM peripheral in Output Compare Active mode (when the counter matches the capture/compare register, the corresponding output pin is set to its active state). 2 X X

TIM_OCInactive

Configuration of the TIM peripheral in Output Compare Inactive mode with the corresponding Interrupt requests for each channel. 1 X -

TIM_OCToggle

Configuration of the TIM peripheral to generate four different signals at four different frequencies. 2 X X

TIM_OnePulse

Use of the TIM peripheral to generate a single pulse when an external signal rising edge is received on the timer input pin. 2 X X

TIM_PWMInput

Use of the TIM peripheral to measure the frequency and duty cycle of an external signal. 2 X X

TIM_PWMOutput

Configuration of the TIM peripheral in PWM (pulse width modulation) mode. 2 X X

TIM_ParallelSynchro

Synchronization of TIM2 and TIM3/TIM4 timers in Parallel mode. 1 X -

TIM_Synchronization

Synchronization of TIM1 and TIM3/TIM4 timers in Parallel mode. 1 X -

TIM_TimeBase

Configuration of the TIM peripheral to generate a timebase of one second with the corresponding interrupt request. 1 X -

UART

UART_Hyperterminal_DMA

UART transmission (transmit/receive) in DMA mode between a board and an HyperTerminal PC application. 1 X -

UART_Hyperterminal_IT

UART transmission (transmit/receive) in Interrupt mode between a board and an HyperTerminal PC application. 1 X -

UART_Printf

Re-routing of the C library printf function to the UART. 2 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. 2 X X
Total number of examples104 77 77 27

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. 1 - X

ADC_ContinuousConversion_TriggerSW

How to use an ADC peripheral to perform continuous ADC conversions on a channel, from a software start. 1 - X

ADC_ContinuousConversion_TriggerSW_Init

How to use an ADC peripheral to perform continuous ADC conversions on a channel, from a software start. 1 - X

ADC_GroupsRegularInjected

How to use an ADC peripheral with both ADC groups (regular and injected) in their intended use cases. 1 - X

ADC_MultiChannelSingleConversion

How to use an ADC peripheral to convert several channels. ADC conversions are performed successively in a scan sequence. 1 - X

ADC_MultimodeDualInterleaved

How to use several ADC peripherals in multimode and interleaved mode. 1 - 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). 1 - 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). 1 - 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). 1 - 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). 1 - 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. 1 - X

CORTEX

CORTEX_MPU

Presentation of the MPU feature. This example configures a memory area as privileged read-only, and attempts to perform read and write operations in different modes. 1 - 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). 1 - X

DAC

DAC_GenerateConstantSignal_TriggerSW

How to use the DAC peripheral to generate a constant voltage signal. This example is based on the STM32F2xx DAC LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx DAC LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx DAC LL API. The peripheral initialization uses LL initialization functions to demonstrate LL init usage. 1 - X

DMA

DMA_CopyFromFlashToMemory

This example describes how to use a DMA to transfer a word data buffer from Flash memory to embedded SRAM. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). 1 - X

DMA_CopyFromFlashToMemory_Init

This example describes how to use a DMA to transfer a word data buffer from Flash memory to embedded SRAM. Peripheral initialization done using LL initialization function to demonstrate LL init usage. 1 - 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 STM32F2xx LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx LL API. The peripheral initialization uses LL initialization functions to demonstrate LL init usage. 1 - 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 STM32F2xx LL API. The peripheral is initialized with LL unitary service functions to optimize for performance and size. 1 - 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 STM32F2xx LL API. The peripheral is initialized with LL initialization function to demonstrate LL init usage. 1 - 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. 1 - 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. 1 - 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. 1 - 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. 1 - 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. 1 - 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. 1 - 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. 1 - 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. 1 - 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. 1 - 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. 1 - X

PWR_EnterStopMode

How to enter the STOP_MAINREGU mode. 1 - X

RCC

RCC_OutputSystemClockOnMCO

This example describes how to configure MCO pins (PA8 and PC9) to output the system clock. 1 - X

RCC_UseHSEasSystemClock

Use of the RCC LL API to start the HSE and use it as system clock. 1 - X

RCC_UseHSI_PLLasSystemClock

Modification of the PLL parameters in run time. 1 - X

RNG

RNG_GenerateRandomNumbers

Configuration of the RNG to generate 32-bit long random numbers. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - X

RNG_GenerateRandomNumbers_IT

Configuration of the RNG to generate 32-bit long random numbers using interrupts. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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). 1 - 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. 1 - 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). 1 - 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). 1 - 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). 1 - 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). 1 - 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 STM32F2xx SPI LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx SPI LL API. The peripheral initialization uses the LL initialization function to demonstrate LL init usage. 1 - 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 STM32F2xx SPI LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - X

SPI_TwoBoards_FullDuplex_DMA

Data buffer transmission and receptionvia SPI using DMA mode. This example is based on the STM32F2xx SPI LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - X

SPI_TwoBoards_FullDuplex_IT

Data buffer transmission and receptionvia SPI using Interrupt mode. This example is based on the STM32F2xx SPI LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - X

TIM

TIM_BreakAndDeadtime

Configuration of the TIM peripheral to – generate three center-aligned PWM and complementary PWM signals – insert a defined dead time value – use the break feature – lock the desired parameters This example is based on the STM32F2xx TIM LL API; peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). 1 - 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 STM32F2xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - X

TIM_OutputCompare

Configuration of the TIM peripheral to generate an output waveform in different output compare modes. This example is based on the STM32F2xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx TIM LL API. The peripheral initialization uses LL initialization function to demonstrate LL init. 1 - X

TIM_TimeBase

Configuration of the TIM peripheral to generate a timebase. This example is based on the STM32F2xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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). 1 - 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). 1 - 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. 1 - 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 STM32F2xx USART LL API. 1 - X

USART_Communication_TxRx_DMA

Configuration of GPIO and USART peripherals to send characters asynchronously to/from an HyperTerminal (PC) in DMA mode. 1 - 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 STM32F2xx USART LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx USART LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx USART LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). 1 - 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 STM32F2xx 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). 1 - 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. 1 - X

UTILS_ReadDeviceInfo

This example describes how to read UID, Device ID and Revision ID and save them into a global information buffer. 1 - 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). 1 - X
Total number of examples_ll69 69 0 69

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 STM32F2xx ADC HAL and LL API. The LL API is used for performance improvement. 1 - X

CRC

CRC_CalculateAndCheck

How to use a CRC peripheral through the STM32F2xx CRC HAL & LL API (an LL API is used for performance improvement). A fixed CRC-32 (Ethernet) generator polynomial: 0x4C11DB7 is used in the CRC peripheral. 1 - X

DMA

DMA_FLASHToRAM

How to use a DMA to transfer a word data buffer from Flash memory to embedded SRAM through the STM32F2xx DMA HAL and LL API. The LL API is used for performance improvement. 1 - X

I2C

I2C_OneBoard_ComSlave7_10bits_IT

How to perform I2C data buffer transmission/reception between one master and 2 slaves with different address sizes (7-bit or 10-bit) and different Max speed support (400Khz or 100Khz). This example uses the STM32F2xx I2C HAL and LL API (LL API usage for performance improvement) and an interrupt. 1 - 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 STM32F2xx RTC and RCC HAL, and LL API (LL API use for maximizing performance). 1 - 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). 1 - X

SPI

SPI_FullDuplex_ComPolling

Data buffer transmission/reception between two boards via SPI using Polling mode. 1 - X

SPI_HalfDuplex_ComPollingIT

Data buffer transmission/reception between two boards via SPI using Polling (LL driver) and Interrupt modes (HAL driver). 1 - X

TIM

TIM_6Steps

Configuration of the TIM1 peripheral to generate six-step PWM signals. 1 - X

TIM_PWMInput

Use of the TIM peripheral to measure an external signal frequency and duty cycle. 1 - 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 STM32F2xx UART HAL and LL API, the LL API being used for performance improvement. 1 - 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 STM32F2xx UART HAL and LL API, the LL API being used for performance improvement. 1 - X
Total number of examples_mix12 12 0 12

Applications

Camera

Camera_To_USBDisk

This application provides a short description of how to use the DCMI to interface with camera module and display in continuous mode the picture on LCD and to save a picture in USB device. 1 X -

Display

LCD_Paint

This application describes how to configure LCD touch screen and attribute an action related to configured touch zone and how to save BMP picture in SD Card. 1 X -

EEPROM

EEPROM_Emulation

This application describes the software solution for substituting standalone EEPROM by emulating the EEPROM mechanism using the on-chip Flash of STM32F2xx devices. 2 X X

FatFs

FatFs_MultiDrives

How to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module. This example develops an application that exploits FatFs features, with multidrive (USB Disk, uSD) configurations. 1 X -

FatFs_RAMDisk

How to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module. This example develops an application that exploits FatFs features to configure a RAM disk (SRAM) drive. 1 X -

FatFs_RAMDisk_RTOS

How to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module. This example develops an application exploiting FatFs features, with a RAM disk (SRAM) drive in RTOS mode configuration. 1 X -

FatFs_USBDisk

How to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module and STM32 USB On-The-Go (OTG) host library, in both Full Speed (FS) and High Speed (HS) modes. This example develops an application exploiting FatFs features, with USB disk drive configuration. 2 X X

FatFs_USBDisk_MultipleAccess_RTOS

This application provides a description on how to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module, FreeRTOS as an RTOS module based on using CMSIS-OS wrapping layer common APIs, and also STM32 USB On-The-Go (OTG) host library, in both Full Speed (FS) and High Speed (HS) modes, in order to develop an application exploiting FatFs offered features with USB disk drive in RTOS mode configuration. 1 X -

FatFs_USBDisk_RTOS

How to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module, FreeRTOS as an RTOS module based on using CMSIS-OS wrapping layer common APIs, and STM32 USB On-The-Go (OTG) host library, in both Full Speed (FS) and High Speed (HS) modes. This example develops an application exploiting FatFs features, with a USB disk drive in RTOS mode configuration. 1 X -

FatFs_uSD

This application provides a description on how to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module, in order to develop an application exploiting FatFs offered features with microSD drive configuration. 1 X -

FatFs_uSD_RTOS

This application provides a description on how to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module, in order to develop an application exploiting FatFs offered features with microSD drive in RTOS mode configuration. 1 X -

FreeRTOS

FreeRTOS_LowPower

How to enter and exit low-power mode with CMSIS RTOS API. 1 X -

FreeRTOS_Mutexes

How to use mutexes with CMSIS RTOS API. 1 X -

FreeRTOS_Queues

How to use message queues with CMSIS RTOS API. 1 X -

FreeRTOS_Semaphore

How to use semaphores with CMSIS RTOS API. 1 X -

FreeRTOS_SemaphoreFromISR

How to use semaphore from ISR with CMSIS RTOS API. 1 X -

FreeRTOS_ThreadCreation

How to implement thread creation using CMSIS RTOS API. 1 X -

FreeRTOS_Timers

How to use timers of CMSIS RTOS API. 1 X -

IAP

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). 1 X -

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). 1 X -

LibJPEG

LibJPEG_Decoding

This application demonstrates how to read jpeg file from SDCard memory, decode it and display the final BMP image on the LCD. 1 X -

LibJPEG_Encoding

This application demonstrates how to read BMP file from micro SD, encode it, save the jpeg file in uSD Card then decode the jpeg file and display the final BMP image on the LCD. 1 X -

LwIP

LwIP_HTTP_Server_Netconn_RTOS

This application guides STM32Cube HAL API users to run a http server application based on Netconn API of LwIP TCP/IP stack The communication is done with a web browser application in a remote PC. 2 X X

LwIP_HTTP_Server_Raw

This application guides STM32Cube HAL API users to run a http server application based on Raw API of LwIP TCP/IP stack The communication is done with a web browser application in a remote PC. 1 X -

LwIP_HTTP_Server_Socket_RTOS

This application guides STM32Cube HAL API users to run a http server application based on Socket API of LwIP TCP/IP stack The communication is done with a web browser application in a remote PC. 1 X -

LwIP_IAP

This application guides STM32Cube HAL API users to run In-Application Programming (IAP) over Ethernet. 1 X -

LwIP_TCP_Echo_Client

This application guides STM32Cube HAL API users to run TCP Echo Client application based on Raw API of LwIP TCP/IP stack To run this application, On the remote PC, open a command prompt window. 1 X -

LwIP_TCP_Echo_Server

This application guides STM32Cube HAL API users to run TCP Echo Server application based on Raw API of LwIP TCP/IP stack To run this application, On the remote PC, open a command prompt window. 1 X -

LwIP_TFTP_Server

This application guides STM32Cube HAL API users to run a tftp server demonstration for STM32F2xx devices. 1 X -

LwIP_UDPTCP_Echo_Server_Netconn_RTOS

This application guides STM32Cube HAL API users to run a UDP/TCP Echo Server application based on Netconn API of LwIP TCP/IP stack To run this application, On the remote PC, open a command prompt window. 1 X -

LwIP_UDP_Echo_Client

This application guides STM32Cube HAL API users to run a UDP Echo Client application based on Raw API of LwIP TCP/IP stack To run this application, On the remote PC, open a command prompt window. 1 X -

LwIP_UDP_Echo_Server

This application guides STM32Cube HAL API users to run UDP Echo Server application based on Raw API of LwIP TCP/IP stack To run this application, On the remote PC, open a command prompt window. 1 X -

STemWin

STemWin_HelloWorld

Simple "Hello World" example based on STemWin. 1 X -

STemWin_SampleDemo

This application shows how to implement a sample demonstration example allowing to show some of the STemWin Library capabilities. 1 X -

USB_Device

AUDIO_Standalone

Implementation of the audio streaming capability (the output is a speaker/headset). 1 X -

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. 1 X -

CustomHID_Standalone

Use of the USB device application based on the Custom HID Class. 1 X -

DFU_Standalone

Compliant implementation of the Device Firmware Upgrade (DFU) capability to program the embedded Flash memory through the USB peripheral. 2 X X

DualCore_Standalone

This application is a part of the USB Device Library package using STM32Cube firmware. It describes how to use USB device application based on the STM32F2xx multi core support feature integrating Mass Storage (MSC) and Human Interface (HID) in the same project. 1 X -

HID_Standalone

Use of the USB device application based on the Human Interface (HID). 2 X X

MSC_Standalone

Use of the USB device application based on the Mass Storage Class (MSC). 1 X -

USB_Host

AUDIO_Standalone

Use of the USB host application based on the Audio OUT class. 1 X -

CDC_Standalone

Use of the USB host application based on the CDC class. 1 X -

DualCore_Standalone

This application is a part of the USB Host Library package using STM32Cube firmware. It describes how to use USB host application based on the STM32F2xx multi core support feature integrating Mass Storage (MSC) and Human Interface (HID) in the same project. 1 X -

DynamicSwitch_Standalone

This application is a part of the USB Host Library package using STM32Cube firmware. It describes how to use dynamically switch, on the same port, between available USB host applications on the STM32F2xx devices. 1 X -

FWupgrade_Standalone

This application is a part of the USB Host Library package using STM32Cube firmware. It describes how to use USB host application based on the In-Application programming (IAP) on the STM32F2xx devices. 1 X -

HID_RTOS

Use of the USB host application based on the HID class. 1 X -

HID_Standalone

Use of the USB host application based on the HID class. 2 X X

MSC_RTOS

This application is a part of the USB Host Library package using STM32Cube firmware. It describes how to use USB host application based on the Mass Storage Class (MSC) on the STM32F2xx devices in RTOS mode configuration. 1 X -

MSC_Standalone

Use of the USB host application based on the Mass Storage Class (MSC). 2 X X

mbedTLS

SSL_Client

This application describes how to run an SSL client application based on mbedTLS crypto library and LwIP TCP/IP stack on STM32F2 family. 1 X -

SSL_Server

This application guides STM32Cube HAL API users to run an SSL Server application based on mbedTLS crypto library and LwIP TCP/IP stack. 1 X -
Total number of applications59 52 52 7

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. 1 - X
Total number of demonstrations1 1 0 1
Total number of projects249 213 131 118