# STM32CubeF1 Firmware Examples for STM32F1xx Series

Copyright 2017 STMicroelectronics

The STM32CubeF1 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_STM32CubeF1_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, \SW4STM32 and \TrueSTUDIO 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 STM32CubeF1 Firmware package.

Reference materials available on www.st.com/stm32cubefw

- Latest release of STM32CubeF1 Firmware package.
- UM1847: Getting started with STM32CubeF1 for STM32F1 Series.
- UM1853: STM32CubeF1 Nucleo demonstration firmware.
- UM1850: Description of STM32F1xx HAL drivers.
- UM1734: STM32Cube USB Device library.
- UM1720: STM32Cube USB host library.
- UM1721: Developing Applications on STM32Cube with FatFs.
- UM1722: Developing Applications on STM32Cube with RTOS.
- UM1713: Developing applications on STM32Cube with LwIP TCP/IP stack.
- UM1709: STM32Cube Ethernet IAP example.

Level | Module Name | Project Name | Description | STM32VL-Discovery | STM3210E_EVAL | STM32F103RB-Nucleo | STM3210C_EVAL
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
Total number of templates_ll: 4 | 1 | 1 | 1 | 1
Templates | - | Starter project | This projects provides a reference template that can be used to build any firmware application. | X | X | X | X
Total number of templates: 4 | 1 | 1 | 1 | 1
Examples | - | BSP | This example provides a description of how to use the different BSP drivers. | - | X | - | X
ADC | ADC_AnalogWatchdog | This example provides a short description of how to use the ADC peripheral to perform conversions with analog watchdog and out-of-window interruptions enabled. | - | - | X | -
ADC_DualModeInterleaved | This example provides a short description of how to use two ADC peripherals to perform conversions in interleaved dual-mode. | - | - | - | X
ADC_Regular_injected_groups | This example provides a short description of how to use the ADC peripheral to perform conversions using the two ADC groups: regular group for ADC conversions on main stream and injected group for ADC conversions limited on specific events (conversions injected within main conversions stream). | X | - | - | X
ADC_Sequencer | This example provides a short description of how to use the ADC peripheral with sequencer, to convert several channels. | - | X | - | -
CAN | CAN_Networking | This example shows how to configure the CAN peripheral to send and receive CAN frames in normal mode. | - | X | - | -
CRC | CRC_Example | This example guides you through the different configuration steps by means of 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
Cortex | CORTEXM_MPU | This example presents the MPU feature. The example purpose is to configure a memory region as privileged read only region and tries to perform read and write operation in different mode. | - | X | - | -
CORTEXM_ModePrivilege | This example shows how to modify Thread mode privilege access and stack. Thread mode is entered on reset or when returning from an exception. | - | X | - | -
CORTEXM_SysTick | This example shows how to use the default SysTick configuration with a 1 ms timebase to toggle LEDs. | - | X | - | -
DAC | DAC_SignalsGeneration | This example provides a description of how to use the DAC peripheral to generate several signals using DMA controller. | - | - | - | X
DAC_SimpleConversion | This example provides a short description of how to use the DAC peripheral to do a simple conversion. | - | X | - | -
DMA | DMA_FLASHToRAM | This example provides a description of how to use a DMA channel to transfer a word data buffer from Flash memory to embedded SRAM through the HAL API. | - | X | - | -
FLASH | FLASH_EraseProgram | This example describes how to configure and use the FLASH HAL API to erase and program the internal Flash memory. | - | - | X | -
FLASH_WriteProtection | This example describes how to configure and use the FLASH HAL API to enable and disable the write protection of the internal Flash memory. | - | - | X | -
FSMC | FSMC_NAND | This example describes how to configure the FSMC controller to access the NAND memory. | - | X | - | -
FSMC_NOR | This example describes how to configure the FSMC controller to access the NOR memory. | - | X | - | -
FSMC_NOR_CodeExecute | This example describes how to build an application to be loaded into the NOR memory mounted on board and then execute it from internal Flash. | - | X | - | -
FSMC_SRAM | This example describes how to configure the FSMC controller to access the SRAM memory. | - | X | - | -
FSMC_SRAM_DataMemory | This example describes how to configure the FSMC controller to access the SRAM memory including heap and stack. | - | X | - | -
GPIO | GPIO_EXTI | This example shows how to configure external interrupt lines. | X | - | - | -
GPIO_IOToggle | This example describes how to configure and use GPIOs through the HAL API. | X | X | X | X
HAL | HAL_TimeBase_RTC_ALARM | This example describes how to customize the HAL time base using RTC Alarm instead of Systick as main source of time base. The discovery board user button (connected to EXTI Line0) will be used to Suspend or Resume tick increment. | X | X | X | X
HAL_TimeBase_TIM | This example describes how to customize the HAL time base using a general purpose timer instead of Systick as main source of time base. | X | X | X | X
I2C | I2C_TwoBoards_AdvComIT | This example describes how to perform I2C data buffer transmission/reception between two boards, using an interrupt. | - | X | X | -
I2C_TwoBoards_ComDMA | This example describes how to perform I2C data buffer transmission/reception between two boards, via DMA. | - | X | X | -
I2C_TwoBoards_ComIT | This example describes how to perform I2C data buffer transmission/reception between two boards using an interrupt. | - | X | X | -
I2C_TwoBoards_ComPolling | This example describes how to perform I2C data buffer transmission/reception between two boards in Polling mode. | - | X | X | -
I2C_TwoBoards_RestartAdvComIT | This example describes how to perform I2C data buffer sequential transmission/reception between two boards using an interrupt. | - | X | X | -
I2C_TwoBoards_RestartComIT | This example describes how to perform I2C data buffer sequential transmission/reception between two boards using an interrupt. | - | X | X | -
I2S | I2S_Audio | This example provides basic implementation of audio features. | - | - | - | 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. | - | - | - | X
PWR | PWR_PVD | This example shows how to configure the programmable voltage detector using an external interrupt line. External DC supply has to be used to power Vdd. | - | X | - | -
PWR_SLEEP | This example shows how to enter Sleep mode and wake up from this mode by using an interrupt. | X | - | - | -
PWR_STANDBY | This example shows how to enters the system to STANDBY mode and wake-up from this mode using: external RESET or WKUP pin. | - | - | X | -
RCC | RCC_ClockConfig | This example describes how to use the RCC HAL API to configure the system clock (SYSCLK) and modify the clock settings in run mode. | X | X | X | X
RTC | RTC_Alarm | This example guides you through the different configuration steps by means of the RTC HAL API to configure and generate an RTC alarm. | - | - | X | -
RTC_Calendar | This example guides you through the different configuration steps by mean of HAL API to ensure Calendar configuration using the RTC peripheral. | - | X | - | -
RTC_LSI | This example demonstrates and explains how to use the LSI clock source auto calibration to get a precise RTC clock. | - | - | - | X
RTC_LowPower_STANDBY | This example shows how to enter the system to STANDBY mode and wake-up from this mode using RTC Alarm Event connected to EXTI_Line17. | X | - | - | -
RTC_Tamper | This example guides you through the different configuration steps by means of the RTC HAL API to write/read data to/from RTC Backup registers and demonstrate the tamper detection feature. | - | X | - | -
SMARTCARD | SMARTCARD_T0 | This example describes a firmware Smartcard Interface based on the USART peripheral. The main purpose of this firmware example is to provide resources facilitating the development of an application using the USART peripheral in smartcard mode. | - | X | - | X
SPI | SPI_FullDuplex_ComDMA | This example shows how to perform SPI data buffer transmission/reception between two boards via DMA. | X | - | X | -
SPI_FullDuplex_ComIT | This example shows how to ensure SPI data buffer transmission/reception between two boards by using an interrupt. | X | - | X | -
SPI_FullDuplex_ComPolling | This example shows how to ensure SPI data buffer transmission/reception in Polling mode between two boards. | X | - | X | -
TIM | TIM_ComplementarySignals | This example shows how to configure the TIM1 peripheral to generate three complementary TIM1 signals, to insert a defined dead time value, to use the break feature and to lock the desired parameters. | - | X | - | -
TIM_DMA | This example provides a description of how to use DMA with TIM1 Update request to transfer Data from memory to TIM1 Capture Compare Register 3 (CCR3). | - | X | X | -
TIM_InputCapture | This example shows how to use the TIM peripheral to measure the frequency of an external signal. | - | X | - | -
TIM_PWMOutput | This example shows how to configure the TIM peripheral in PWM (Pulse Width Modulation) mode. | - | X | - | -
TIM_TimeBase | This example shows how to configure the TIM peripheral to generate a time base of one second with the corresponding Interrupt request. | X | X | X | X
UART | UART_HyperTerminal_DMA | This example shows how to ensure UART Data buffer transmission and reception with DMA. The communication is done with the Hyperterminal PC application. | X | - | X | X
UART_Printf | This example shows how to reroute the C library printf function to the UART. It outputs a message sent by the UART on the HyperTerminal. | X | X | X | X
UART_TwoBoards_ComDMA | This example describes an UART transmission (transmit/receive) in DMA mode between two boards. | X | - | X | X
UART_TwoBoards_ComIT | This example describes an UART transmission (transmit/receive) in interrupt mode between two boards. | X | - | X | X
UART_TwoBoards_ComPolling | This example describes an UART transmission (transmit/receive) in polling mode between two boards. | X | - | X | X
WWDG | WWDG_Example | This example guides you through the different configuration steps by means of the HAL API to perform periodic WWDG counter update and simulate a software fault that generates an MCU WWDG reset when a predefined time period has elapsed. | - | - | X | -
Total number of examples: 98 | 18 | 34 | 27 | 19
Examples_LL | ADC | ADC_AnalogWatchdog | This example describes how to use a ADC peripheral with ADC analog watchdog to monitor a channel and detect when the corresponding conversion data is out of window thresholds; This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_ContinuousConversion_TriggerSW | This example describes how to use a ADC peripheral to perform continuous ADC conversions of a channel, from a SW start; This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_ContinuousConversion_TriggerSW_Init | This example describes how to use a ADC peripheral to perform continuous ADC conversions of a channel, from a SW start; This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_GroupsRegularInjected | This example describes how to use a ADC peripheral with both ADC groups (ADC group regular and ADC group injected) in their intended use case; This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_MultiChannelSingleConversion | This example describes how to use a ADC peripheral to convert several channels, ADC conversions are performed successively in a scan sequence; This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_MultimodeDualInterleaved | This example describes how to use several ADC peripherals in multimode, mode interleaved; This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_SingleConversion_TriggerSW | This example describes how to use a ADC peripheral to perform a single ADC conversion of a channel, at each software start; Example using programming model: polling (for programming models interrupt or DMA transfer, refer to other examples); This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_SingleConversion_TriggerSW_DMA | This example describes how to use a ADC peripheral to perform a single ADC conversion of a channel, at each software start; Example using programming model: DMA transfer (for programming models polling or interrupt, refer to other examples); This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_SingleConversion_TriggerSW_IT | This example describes how to use a ADC peripheral to perform a single ADC conversion of a channel, at each software start; Example using programming model: interrupt (for programming models polling or DMA transfer, refer to other examples); This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_SingleConversion_TriggerTimer_DMA | This example describes how to use a ADC peripheral to perform a single ADC conversion of a channel, at each trigger event from timer; Conversion data are transferred by DMA into a table, indefinitely (circular mode); This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
ADC_TemperatureSensor | This example describes how to use a ADC peripheral to perform a single ADC conversion of the internal temperature sensor and to calculate the temperature in Celsius degrees; Example using programming model: polling (for programming models interrupt or DMA transfer, refer to other examples); This example is based on the STM32F1xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
CORTEX | CORTEX_MPU | This example presents the MPU feature. Its purpose is to configure a memory area as privileged read-only area and attempt to perform read and write operations in different modes. | - | X | - | -
CRC | CRC_CalculateAndCheck | This example shows how to configure CRC calculation unit to get a CRC code of a given data buffer, based on a fixed generator polynomial (default value 0x4C11DB7). Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
DAC | DAC_GenerateConstantSignal_TriggerSW | This example describes how to use the DAC peripheral to generate a constant voltage signal; This example is based on the STM32F1xx DAC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | X | - | -
DAC_GenerateWaveform_TriggerHW | This example describes how to use the DAC peripheral to generate a waveform voltage from digital data stream transfered by DMA; This example is based on the STM32F1xx DAC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | X | - | -
DAC_GenerateWaveform_TriggerHW_Init | This example describes how to use the DAC peripheral to generate a waveform voltage from digital data stream transfered by DMA; This example is based on the STM32F1xx DAC LL API; peripheral initialization done using LL initialization function to demonstrate LL init usage. | - | X | - | -
DMA | DMA_CopyFromFlashToMemory | This example describes how to use a DMA channel 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). | - | - | X | -
DMA_CopyFromFlashToMemory_Init | This example describes how to use a DMA channel to transfer a word data buffer from Flash memory to embedded SRAM. Peripheral initialization done using LL initialization function to demonstrate LL init usage. | - | - | X | -
EXTI | EXTI_ToggleLedOnIT | This example describes 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 STM32F1xx LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
EXTI_ToggleLedOnIT_Init | This example describes 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 STM32F1xx LL API. Peripheral initialization is done using LL initialization function to demonstrate LL init usage. | - | - | X | -
GPIO | GPIO_InfiniteLedToggling | This example describes how to configure and use GPIOs to toggle every 250 ms the user LEDs available on the board. This example is based on the STM32F1xx LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
GPIO_InfiniteLedToggling_Init | This example describes how to configure and use GPIOs to toggle every 250 ms the user LEDs available on the board. This example is based on the STM32F1xx LL API. Peripheral initialization is done using LL initialization function to demonstrate LL init usage. | - | - | X | -
I2C | I2C_OneBoard_AdvCommunication_DMAAndIT | This example describes how to exchange data between an I2C Master device in DMA mode and an I2C Slave device in Interrupt mode. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
I2C_OneBoard_Communication_DMAAndIT | This example describes how to transmit data bytes from an I2C Master device using DMA mode to an I2C Slave device using Interrupt mode. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
I2C_OneBoard_Communication_IT | This example describes how to receive one data byte from an I2C Slave device to an I2C Master device. Both devices operate in Interrupt mode. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
I2C_OneBoard_Communication_IT_Init | This example describes how to receive one data byte from an I2C Slave device to an I2C Master device. Both devices operate in Interrupt mode. Peripheral initialization is done using LL initialization function to demonstrate LL init usage. | - | - | X | -
I2C_OneBoard_Communication_PollingAndIT | This example describes how to transmit data bytes from an I2C Master device using Polling mode to an I2C Slave device using Interrupt mode. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
I2C_TwoBoards_MasterRx_SlaveTx_IT | This example describes how to receive one data byte from an I2C Slave device to an I2C Master device. Both devices operate in Interrupt mode. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
I2C_TwoBoards_MasterTx_SlaveRx | This example describes how to transmit data bytes from an I2C Master device using Polling mode to an I2C Slave device using Interrupt mode. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
I2C_TwoBoards_MasterTx_SlaveRx_DMA | This example describes how to transmit data bytes from an I2C Master device using DMA mode to an I2C Slave device using DMA mode. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
IWDG | IWDG_RefreshUntilUserEvent | This example describes how to configure the IWDG to ensure period counter update and generate an MCU IWDG reset when a user button is pressed. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
PWR | PWR_EnterStandbyMode | This example shows how to enter the system in STANDBY mode and wake-up from this mode using external RESET or wake-up interrupt. | - | - | X | -
PWR_EnterStopMode | This example shows how to enter the system in STOP_MAINREGU mode. | - | - | X | -
RCC | RCC_OutputSystemClockOnMCO | This example describes how to configure MCO pin (PA8) to output the system clock. | - | - | X | -
RCC_UseHSEasSystemClock | This example describes how to use the RCC LL API how to start the HSE and use it as system clock. | - | - | X | -
RCC_UseHSI_PLLasSystemClock | This example shows how to modify the PLL parameters in run time. | - | - | X | -
RTC | RTC_Alarm | This example guides you through the different configuration steps by mean of LL API to ensure Alarm configuration and generation using the RTC peripheral. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
RTC_Alarm_Init | This example guides you through the different configuration steps by mean of LL API to ensure Alarm configuration and generation using the RTC peripheral. Peripheral initialization done using LL initialization function to demonstrate LL init usage. | - | - | X | -
RTC_Calendar | This example guides you through the different configuration steps by mean of HAL API to configure the RTC calendar. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
RTC_Tamper | This example guides you through the different configuration steps by mean of LL API to ensure Tamper configuration using the RTC peripheral. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
SPI | SPI_OneBoard_HalfDuplex_DMA | This example shows how to configure GPIO and SPI peripherals to transmit bytes from an SPI Master device to an SPI Slave device in DMA mode. The example is based on the STM32F1xx SPI LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
SPI_OneBoard_HalfDuplex_DMA_Init | This example shows how to configure GPIO and SPI peripherals to transmit bytes from an SPI Master device to an SPI Slave device in DMA mode. The example is based on the STM32F1xx SPI LL API. Peripheral initialization is done using LL initialization function to demonstrate LL init usage. | - | - | X | -
SPI_OneBoard_HalfDuplex_IT | This example shows how to configure GPIO and SPI peripherals to transmit bytes from an SPI Master device to an SPI Slave device in Interrupt mode. The example is based on the STM32F1xx SPI LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
SPI_TwoBoards_FullDuplex_DMA | This example shows how to ensure SPI data buffer transmission and reception in DMA mode. The example is based on the STM32F1xx SPI LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
SPI_TwoBoards_FullDuplex_IT | This example shows how to ensure SPI Data buffer transmission and reception in Interrupt mode. The example is based on the STM32F1xx SPI LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
TIM | TIM_BreakAndDeadtime | This example shows how to configure the TIMER to perform the following: â€“ 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 STM32F1xx TIM LL API; peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
TIM_DMA | This example provides a description of how to use DMA with TIMER update request to transfer Data from memory to TIMER Capture Compare Register 3 (TIMx_CCR3); Example using the STM32F1xx TIM LL API, peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
TIM_InputCapture | This example shows how to use the TIM peripheral to measure the frequency of a periodic signal provided either by an external signal generator or by another timer instance; Example using the STM32F1xx TIM LL API, peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
TIM_OnePulse | This example shows how to configure 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 STM32F1xx TIM LL API; peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
TIM_OutputCompare | This example shows how to configure the TIM peripheral to generate an output waveform in different output compare modes; Example using the STM32F1xx TIM LL API, peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
TIM_PWMOutput | This example describes how to use a timer peripheral to generate a PWM output signal and update PWM duty cycle; Example using the STM32F1xx TIM LL API, peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
TIM_PWMOutput_Init | This example describes how to use a timer peripheral to generate a PWM output signal and update PWM duty cycle; Example using the STM32F1xx TIM LL API, peripheral initialization done using LL initialization function to demonstrate LL init usage. | - | - | X | -
TIM_TimeBase | This example shows how to configure the TIM peripheral to generate a time base; Example using the STM32F1xx TIM LL API, peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
USART | USART_Communication_Rx_IT | This example shows how to configure GPIO and USART peripheral for receiving characters from HyperTerminal (PC) in Asynchronous mode using Interrupt mode. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
USART_Communication_Rx_IT_Continuous | This example shows how to configure GPIO and USART peripheral for continuously receiving characters from HyperTerminal (PC) in Asynchronous mode using Interrupt mode. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
USART_Communication_Rx_IT_Init | This example shows how to configure GPIO and USART peripheral for receiving characters from HyperTerminal (PC) in Asynchronous mode using Interrupt mode. Peripheral initialization is done using LL initialization function to demonstrate LL init usage. | - | - | X | -
USART_Communication_Tx | This example shows how to configure GPIO and USART peripherals to send characters asynchronously to an HyperTerminal (PC) in Polling mode. If the transfer could not be completed within the allocated time, a timeout allows to exit from the sequence with a Timeout error code. This example is based on STM32F1xx USART LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
USART_Communication_TxRx_DMA | This example shows how to configure GPIO and USART peripheral to send characters asynchronously to/from an HyperTerminal (PC) in DMA mode. This example is based on STM32F1xx USART LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
USART_Communication_Tx_IT | This example shows how to configure GPIO and USART peripheral to send characters asynchronously to HyperTerminal (PC) in Interrupt mode. This example is based on STM32F1xx USART LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
USART_HardwareFlowControl | This example shows how to configure GPIO and USART peripheral to receive characters asynchronously from HyperTerminal (PC) in Interrupt mode with Hardware Flow Control feature enabled. This example is based on STM32F1xx USART LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
USART_SyncCommunication_FullDuplex_DMA | This example shows how to configure GPIO, USART, DMA and SPI peripherals for transmitting bytes from/to an USART peripheral to/from an SPI peripheral (in slave mode) by using DMA mode through the STM32F1xx USART LL API. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
USART_SyncCommunication_FullDuplex_IT | This example shows how to configure GPIO, USART, DMA and SPI peripherals for transmitting bytes from/to an USART peripheral to/from an SPI peripheral (in slave mode) by using Interrupt mode through the STM32F1xx USART LL API (SPI is using DMA for receving/transmitting characters sent from/received by USART). Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | 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 | This example describes how to configure the WWDG, periodically update the counter, and generate an MCU WWDG reset when a user button is pressed. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). | - | - | X | -
Total number of examples_ll: 65 | 0 | 4 | 61 | 0
Examples_MIX | ADC | ADC_SingleConversion_TriggerSW_IT | This example describes how to use the ADC to perform a single ADC channel conversion, at each software start. This example uses the interrupt programming model (for programming models in Polling or DMA mode, refer to other examples). This example is based on the STM32F1xx ADC HAL and LL API (LL API usage for performance improvement). | - | X | - | -
CRC | CRC_CalculateAndCheck | This example provides a description of how to use CRC peripheral through the STM32F1xx CRC HAL & LL API (LL API used for performance improvement); Fixed generator polynomial used in CRC IP is CRC-32 (Ethernet) polynomial: 0x4C11DB7. | - | - | X | -
DMA | DMA_FLASHToRAM | This example provides a description of how to use a DMA to transfer a word data buffer from Flash memory to embedded SRAM through the STM32F1xx DMA HAL and LL API (LL API used for performance improvement). | - | - | X | -
I2C | I2C_OneBoard_ComSlave7_10bits_IT | This example describes 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 STM32F1xx I2C HAL and LL API (LL API usage for performance improvement) and an interrupt. | - | - | X | -
PWR | PWR_STOP | This example shows how to enter the system in STOP with Low power regulator mode and wake-up from this mode using external RESET or wake-up interrupt (all the RCC functions calls use RCC LL API for footprint and performance improvements). | - | - | X | -
SPI | SPI_FullDuplex_ComPolling | This example shows how to ensure SPI data buffer transmission/reception in Polling mode between two boards. | - | - | X | -
SPI_HalfDuplex_ComPollingIT | This example shows how to ensure SPI data buffer transmission/reception between two boards by using Polling (LL Driver) an interrupt mode (HAL Driver). | - | - | X | -
TIM | TIM_6Steps | This example shows how to configure the TIM1 peripheral to generate 6 Steps PWM signal. The STM32F1xx TIM1 peripheral allows programming in advance the configuration for the next TIM1 output behavior (or step) and changing the configuration of all the channels simultaneously. This operation is possible when the COM (commutation) event is used. This example is based on the STM32F1xx TIM HAL and LL API (LL API usage for performance improvement). | - | - | X | -
TIM_PWMInput | This example shows how to use the TIM peripheral to measure the frequency and duty cycle of an external signal. | - | - | X | -
UART | UART_HyperTerminal_IT | This example describes how to use an UART to transmit data (transmit/receive) between a board and an HyperTerminal PC application in Interrupt mode. This example provides a description of how to use USART peripheral through the STM32F1xx UART HAL and LL API (LL API usage for performance improvement). | - | - | X | -
UART_HyperTerminal_TxPolling_RxIT | This example describes how to use an UART to transmit data (transmit/receive) between a board and an HyperTerminal PC application both in Polling and Interrupt modes. This example provides a description of how to use USART peripheral through the STM32F1xx UART HAL and LL API (LL API usage for performance improvement). | - | - | X | -
Total number of examples_mix: 11 | 0 | 1 | 10 | 0
Applications | EEPROM | EEPROM_Emulation | Please refer to AN2594 for futher details regarding this application. | - | - | X | -
FatFs | FatFs_uSD | This example provides a description on how to use STM32Cube firmware with FatFs middleware component as a generic FAT file system module. The objective is to develop an application using most of the features offered by FatFs to configure a microSD drive. | - | X | - | X
FreeRTOS | FreeRTOS_Mail | This application shows how to use mail queues with CMSIS RTOS API. | - | X | - | -
FreeRTOS_Signal | This application shows how to use thread signaling using CMSIS RTOS API. | - | X | - | -
FreeRTOS_SignalFromISR | This application shows how to use thread signaling from an interrupt using CMSIS RTOS API. | - | X | - | -
FreeRTOS_ThreadCreation | This example creates two threads with the same priority, which execute in a periodic cycle of 5 seconds for Thread 1 and 10 seconds for Thread 2. | - | X | 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) using the USART. | - | X | - | 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 | - | X
LwIP | 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. | - | - | - | 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. | - | - | - | 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. | - | - | - | 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. | - | - | - | X
STemWin | STemWin_HelloWorld | This application shows how to implement a simple "Hello World" example based on STemWin. | - | X | - | X
USB_Device | CDC_Standalone | This application shows how to use the USB device application based on the Device Communication Class (CDC) following the PSTN subprotocol using the USB Device and UART peripherals. | - | X | - | X
CustomHID_Standalone | This application shows how to use the USB device application based on the Custom HID Class. | - | X | - | X
DFU_Standalone | This application presents a compliant implementation of the Device Firmware Upgrade (DFU) capability for programming the embedded flash memory through the USB peripheral. | - | X | - | X
HID_Standalone | This application shows how to use the USB device application based on the Humain Interface (HID). | - | X | X | X
MSC_Standalone | This application shows how to use the USB device application based on the Mass Storage Class (MSC). | - | X | - | X
USB_Host | CDC_Standalone | This application shows how to use the USB host application based on the CDC class. | - | - | - | X
HID_RTOS | This application shows how to use the USB host application based on the HID class. | - | - | - | X
HID_Standalone | This application shows how to use the USB host application based on the HID class. | - | - | - | X
MSC_RTOS | This application shows how to use the USB host application based on the Mass Storage Class (MSC). | - | - | - | X
MSC_Standalone | This application shows how to use the USB host application based on the Mass Storage Class (MSC). | - | - | - | X
Total number of applications: 35 | 0 | 13 | 3 | 19
Demonstrations | - | Adafruit_LCD_1_8_SD_Joystick | The provided demonstration firmware based on STM32Cube helps you to discover STM32 Cortex-M devices that can be plugged on a STM32NUCLEO board. | - | - | X | -
Total number of demonstrations: 1 | 0 | 0 | 1 | 0
Total number of projects: 218 | 20 | 54 | 104 | 40