STM32CubeL0 Firmware Examples for STM32L0xx Series

The STM32CubeL0 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_STM32CubeL0_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 STM32CubeL0 Firmware package.

Reference materials available on www.st.com/stm32cubefw
Level Module Name Project Name Description STM32L073Z_EVAL STM32L011K4-Nucleo STM32L031K6-Nucleo STM32L073RZ-Nucleo STM32L053R8-Nucleo STM32L053C8-Discovery

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
Total number of templates_ll: 6 1 1 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 X X
Total number of templates: 6 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

This example provides a short description of how to use the ADC peripheral to perform conversions with analog watchdog and interruptions. X - - X - -

ADC_DMA_Transfer

This example describes 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

ADC_LowPower

This example provides a short description of how to use the ADC peripheral to perform conversions with ADC low power modes: auto-wait and auto-power off. X X X X X X

ADC_OverSampler

This example describes how to configure and use ADC to convert an external analog input (PA0) combined with oversampling feature to increase resolution, through the STM32L0xx HAL API. - - X - X X

ADC_RegularConversion_Interrupt

This example describes how to use the ADC1 and Interrupt to convert continuously data from ADC1 channel0., through the STM32L0xx HAL API. X - X X X X

ADC_RegularConversion_Polling

This example describes how to use the ADC1 and the Polling mode to convert data from ADC1 channel0. X - X X X -

ADC_Sequencer

This example provides a short description of how to use the ADC peripheral with sequencer to convert several channels. - - - - X -

AES

AES_DMA

This example provides a short description of how to use the AES peripheral to encrypt and decrypt data using AES Algorithm with ECB chaining mode. - - - - X -

AES_Modes

This example provides a short description of how to configure the AES hardware accelerator to encrypt then to decrypt text with the different modes ECB, CBC et CTR. - - - - X -

COMP

COMP_AnalogWatchdog

This example shows how to make an analog watchdog using the COMP peripherals in window mode. X - - X X X

COMP_Interrupt

This example shows how to configure the COMP peripheral to compare the external voltage applied on PA1 with the Internal Voltage Reference. - - - - X -

COMP_PWMSignalControl

This example shows how to configure COMP2 peripheral to automatically hold TIM21 PWM output on safe state (low level) as soon as comparator output is set at high level. X - X X X X

COMP_PulseWidthMeasurement

This example shows how to configure the COMP1 peripheral to measure pulse width. X - - X X X

CRC

CRC_Data_Reversing_16bit_CRC

This example guides you through the different configuration steps by means of the HAL API. The CRC (Cyclic Redundancy Check) calculation unit computes a 16-bit long CRC code derived from a buffer of 8-bit data (bytes). - - - X - -

CRC_Example

This example guides you through the different configuration steps by mean of HAL API to ensure the use of the CRC (Cyclic Redundancy Check) calculation unit to get a CRC code of a given buffer of data words (32-bit long), based on a fixed generator polynomial (0x4C11DB7). X X X X X X

CRC_bytes_stream_7bit_CRC

This example guides you through the different configuration steps by means of the HAL API. The CRC (Cyclic Redundancy Check) calculation unit computes 7-bit long CRC codes derived from buffers of 8-bit data (bytes). - - - X - -

CRYP

CRYP_AESModes

This example provides a short description of how to use the CRYP peripheral to encrypt and decrypt data using AES in chaining modes (ECB, CBC, CTR). - X X X - -

CRYP_DMA

This example provides a short description of how to use the CRYP peripheral to encrypt and decrypt data using AES 128 Algorithm with ECB chaining mode in DMA mode. - 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 - - X X X

CORTEXM_ModePrivilege

This example shows how to modify CortexM0+ Thread mode privilege access and stack. - - - - X X

CORTEXM_SysTick

This example shows how to use the default SysTick configuration with a 1 ms timebase to toggle LEDs. X - - X X X

DAC

DAC_SignalsGeneration

This example provides a description of how to use the DAC peripheral to generate several signals using DMA controller. X - - X X X

DAC_SimpleConversion

This example provides a short description of how to use the DAC peripheral to do a simple conversion in 8 bits right alignment of 0xFF value, the result of conversion can be seen by connecting PA4(DAC channel1) to an oscilloscope. X - - X X 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 HAL API. X X X X X X

DMA_RAMToDAC

This example provides a description of how to use a DMA channel to transfer data buffer from RAM memory to DAC. - - - X X X

FIREWALL

FIREWALL_VolatileData_Executable

This example shows how to use the Firewall IP to protect a volatile data segment located in SRAM and to define it as executable. X - - - - -

FIREWALL_VolatileData_Shared

This example shows how to use the Firewall IP to protect a code segment as well as volatile and non-volatile data segments. X - - - - -

FLASH

FLASH_DualBoot

This example guides you through the different configuration steps by mean of HAL API on how to program bank1 and bank2 of the STM32L0xx internal Flash memory mounted on STM32L073Z-EVAL and swap between both of them. X - - - - -

FLASH_DualBoot_Workaround

This example guides you through the different configuration steps by mean of HAL API on how to program bank1 and bank2 of the STM32L0xx internal Flash memory mounted on STM32L073Z-EVAL and possibly boot on one of them. X - - - - -

FLASH_EraseProgram

This example guides you through the different configuration steps by mean of HAL API how to erase and program the STM32L0xx internal Flash memory mounted on STM32L073Z-EVAL. X X X X X 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 X X X X X

GPIO

GPIO_EXTI

This example shows how to configure external interrupt lines. X - - X X X

GPIO_IOToggle

This example describes how to configure and use GPIOs through the STM32L0xx HAL API. X X X X X -

GPIO_IOToggle_MaxFrequency

This example describes how to configure and use GPIOs through the STM32L0xx HAL API. X X X X X X

GPIO_IOToggle_VariableFreq

This example describes how to make toggle LED3 at different frequencies. It configures and uses GPIOs for LED and vitual button through the STM32L0xx HAL API. - - X - - -

HAL

HAL_TimeBase

This example describes how to customize the HAL time base using a general purpose timer(TIM6) instead of Systick as main source of time base. - - - - 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 X X X X

I2C_TwoBoards_ComDMA

This example describes how to perform I2C data buffer transmission/reception between two boards, via DMA. X X X X X X

I2C_TwoBoards_ComIT

This example describes how to perform I2C data buffer transmission/reception between two boards using an interrupt. - X X - X X

I2C_TwoBoards_ComPolling

This example describes how to perform I2C data buffer transmission/reception between two boards in Polling mode. - X X - X -

I2C_TwoBoards_RestartAdvComIT

This example describes how to perform a multiple I2C data buffer transmission/reception between two boards in Interrupt mode and with a restart condition. - - - X - -

I2C_TwoBoards_RestartComIT

This example describes how to perform a single I2C data buffer transmission/reception between two boards in Interrupt mode and with a restart condition. - - - X - -

I2C_WakeUpFromStop

This example describes how to perform 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

This example describes how to ensure IWDG reload counter and simulate a software fault that generates an MCU IWDG reset when a programmed time period has elapsed. X X X X X X

IWDG_WindowMode

This example shows how to periodically update the IWDG reload counter and simulate a reload outside the window that generates an MCU IWDG reset. X - - X X X

LCD

This example provides a description of how to use the STM32L0xx embedded LCD GLASS controller and how to configures the LCD Blink mode and Blink frequency. X - - - X -

LCD_SegmentsDrive

This example provides a description of how to use the STM32L0xx embedded LCD controller to drive the Pacific Display LCD glass mounted on STM32L152C-Disovery board. - - - - X -

LPTIM

LPTIM_PWMExternalClock

This example describes how to configure and use LPTIM to generate a PWM at the lowest power consumption, using an external counter clock, through the HAL LPTIM API. X - - - X X

LPTIM_PWM_LSE

This example describes how to configure and use LPTIM to generate a PWM in low power mode using the LSE as a counter clock, through the HAL LPTIM API. X - - - X X

LPTIM_PulseCounter

This example describes how to configure and use LPTIM to count pulses through the LPTIM HAL API. X X X X X X

LPTIM_Timeout

This example describes how to implement a low power timeout to wake-up the system using the LPTIMER, through the HAL LPTIM API. X - X X X X

PWR

PWR_LPRUN

This example shows how to enters the system to Low Power Run mode and exit from this mode using Wkup/Tamper push-button. X X X X X X

PWR_LPSLEEP

This example shows how to enters the system to Low Power Sleep mode and wake-up from this mode using Wkup/Tamper push-button EXTI lines 4 to 15. X X X X X X

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

PWR_SLEEP

This example shows how to enters the system to Sleep mode and wake-up from this mode using Wkup/Tamper push-button EXTI lines 4 to 15. X X X X X 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 X X X X X

PWR_STANDBY_RTC

This example shows how to enter the system to STANDBY mode and wake-up from this mode using RTC Wakeup Timer Event connected to EXTI Line 20. X X X X X X

PWR_STOP

This example shows how to enters the system to STOP mode and wake-up from this mode using Key push button EXTI_Line4-15. X X X X X X

PWR_STOP_RTC

This example shows how to enter the system to STOP mode and wake-up from this mode using RTC Wakeup Timer Event connected to EXTI_Line17. X X X X X X

RCC

RCC_CRS_Synchronization_IT

This example describes how to use the RCC HAL API to configure Clock Recovery Service in IT mode. X - - - - -

RCC_CRS_Synchronization_Polling

This example describes how to use the RCC HAL API to configure Clock Recovery Service in using polling mode. X - - - - -

RCC_ClockConfig

This example describes how to use the RCC HAL API to configure the system clock (SYSCLK) and modify the clock settings on run time. X - - - X -

RCC_LSIConfig

This example describes how to use the RCC HAL API to enable or disable the low-speed internal (LSI) RC oscillator (about 40 KHz) at run time. X X X X - -

RNG

RNG_MultiRNG

This example guides you through the HAL API different configuration steps to ensure 32-bit long random numbers generation by RNG peripheral. 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 X X X X 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 X X - - X

RTC_LSI

This example demonstrates and explains how to use the LSI clock source auto calibration to get a precise RTC clock. X X X X X 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. 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 X X X X X

RTC_TimeStamp

This example guides you through the different configuration steps by means of the RTC HAL API to demonstrate the timestamp feature. X X X X X X

SMBUS

SMBUS_TSENSOR

This example guides you through the different configuration steps by mean of HAL API to ensure SMBUS Data buffer transmission and reception with IT. X - - - - -

SPI

SPI_FullDuplex_AdvCom

This example guides you through the different configuration steps by mean of HAL API to transmit/receive SPI data buffer in Polling mode and in an advanced communication mode: the master board always sends the command to the slave before any transmission is performed. - - - - X -

SPI_FullDuplex_ComDMA

This example shows how to perform SPI data buffer transmission/reception between two boards via DMA. X X X X 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 X X X X

SPI_FullDuplex_ComPolling

This example shows how to ensure SPI data buffer transmission/reception in Polling mode between two boards. X X X X X -

TIM

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 (CCR3). X X X X X X

TIM_DMABurst

This example shows how to update the TIMER channel1 period and the duty cycle using the TIMER DMA burst feature. X X X X X X

TIM_ExtTriggerSynchro

This example shows how to synchronize TIM peripherals in cascade mode with an external trigger. - - - - X -

TIM_InputCapture

This example shows how to use the TIM peripheral to measure the frequency of an external signal. X X X X X X

TIM_OCActive

This example shows how to configure the TIM peripheral in Output Compare Active mode (when the counter matches the capture/compare register, the concerned output pin is set to its active state). X X X X X X

TIM_OCInactive

This example shows how to configure the TIM peripheral in Output Compare Inactive mode with the corresponding Interrupt requests for each channel. X X X X X -

TIM_OCToggle

This example shows how to configure the TIM peripheral to generate four different signals with four different frequencies. X X X X X X

TIM_OnePulse

This example shows how to use the TIM peripheral to generate a One pulse Mode after a Rising edge of an external signal is received in Timer Input pin. X X X X X -

TIM_PWMInput

This example shows how to use the TIM peripheral to measure the frequency and duty cycle of an external signal. - - - X X -

TIM_PWMOutput

This example shows how to configure the TIM peripheral in PWM (Pulse Width Modulation) mode. X X X X X 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 X X

TSC

TSC_BasicAcquisition_Interrupt

This example describes how to use the TSC to perform continuous acquisitions of two channels in interrupt mode. X - - - - -

TSC_BasicAcquisition_Polling

This example describes how to use the TSC to perform continuous acquisitions of one channel in polling mode. X - - - - -

UART

LPUART_TwoBoards_ComIT

This Example shows a LPUART transmission (transmit/receive) between 2 STM32L0538-DISCO boards in interrupt mode, the two LPUART are clocked with LSI. - - - - - X

LPUART_WakeUpFromStop

This example shows how to configure the LPUART to wake up the MCU from STOP mode when the proper stimulus is received. - - - - - X

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_LowPower_HyperTerminal_DMA

This example guides you through the different configuration steps by mean of HAL API to ensure UART Data buffer transmission and reception with DMA. X - - - - -

UART_Printf

This example shows how to retarget the C library printf function to the UART. X X X - - -

UART_TwoBoards_ComDMA

This example describes an UART transmission (transmit/receive) in DMA mode between two STM32L073Z-EVAL boards. X X X X X X

UART_TwoBoards_ComIT

This example describes an UART transmission (transmit/receive) in interrupt mode between two STM32L073Z-EVAL boards. X X X X X X

UART_TwoBoards_ComPolling

This example describes an UART transmission (transmit/receive) in polling mode between two STM32L073Z-EVAL boards. X X X X X -

UART_WakeUpFromStop

This example shows how to configure an UART to wake up the MCU from STOP mode when the proper stimulus is received. 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 X X X X X
Total number of examples: 375 76 50 56 64 72 57

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 STM32L0xx 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 STM32L0xx 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 STM32L0xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

ADC_ContinuousConversion_TriggerSW_LowPower

This example describes how to use a ADC peripheral with ADC low power features; This example is based on the STM32L0xx 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 STM32L0xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

ADC_Oversampling

This example describes how to use a ADC peripheral with ADC oversampling; This example is based on the STM32L0xx 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 STM32L0xx 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 STM32L0xx 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 STM32L0xx 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 STM32L0xx 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 STM32L0xx ADC LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

COMP

COMP_CompareWithInternalReference_IT

This example shows how to use a comparator peripheral to compare a voltage level applied on a GPIO pin versus the internal voltage reference (VrefInt), in interrupt mode; This example is based on the STM32L0xx COMP LL API; peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

COMP_CompareWithInternalReference_IT_Init

This example shows how to use a comparator peripheral to compare a voltage level applied on a GPIO pin versus the internal voltage reference (VrefInt), in interrupt mode; This example is based on the STM32L0xx COMP LL API; peripheral initialization done using LL initialization function to demonstrate LL init usage. - - - 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 - -

CRC_UserDefinedPolynomial

This example shows how to configure and use CRC calculation unit to get a 8-bit long CRC of a given data buffer, based on a user-defined generating polynomial. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

CRS

CRS_Synchronization_IT

This example describes how to configure Clock Recovery Service in IT mode through the STM32L0xx CRS LL API. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

CRS_Synchronization_Polling

This example describes how to configure Clock Recovery Service in polling mode through the STM32L0xx CRS LL API. 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 STM32L0xx 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 STM32L0xx 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 STM32L0xx 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 using the STM32L0xx LL API to toggles the available users LEDs on the board when User button is pressed. Peripheral initialization 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 using the STM32L0xx LL API to toggles the available users LEDs on the board when User button is pressed. Peripheral initialization done using LL initialization function to demonstrate LL init usage. - - - X - -

GPIO

GPIO_InfiniteLedToggling

This example describes how to configure and use GPIOs through the LL API to toggles the available users LEDs on the board each 250 ms. Peripheral initialization 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 through the LL API to toggles the available users LEDs on the board each 250 ms. Peripheral initialization done using LL initialization function to demonstrate LL init usage. - - - X - -

I2C

I2C_OneBoard_AdvCommunication_DMAAndIT

This example describes how to exchange some datas between an I2C Master device using DMA mode and an I2C Slave device using IT mode. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

I2C_OneBoard_Communication_DMAAndIT

This example describes how to transmit some data bytes from an I2C Master device using DMA mode to an I2C Slave device using IT mode. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

I2C_OneBoard_Communication_IT

This example describes how to receive data byte from an I2C Slave device using IT mode to an I2C Master device using IT mode. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

I2C_OneBoard_Communication_IT_Init

This example describes how to receive data byte from an I2C Slave device using IT mode to an I2C Master device using IT mode. Peripheral initialization 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 IT mode. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

I2C_TwoBoards_MasterRx_SlaveTx_IT

This example describes how to receive data byte from an I2C Slave device using IT mode to an I2C Master device using IT mode. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

I2C_TwoBoards_MasterTx_SlaveRx

This example describes how to transmit some data bytes from an I2C Master device using Polling mode to an I2C Slave device using IT mode. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

I2C_TwoBoards_MasterTx_SlaveRx_DMA

This example describes how to transmit some data bytes from an I2C Master device using DMA mode to an I2C Slave device using DMA mode. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

I2C_TwoBoards_WakeUpFromStop_IT

This example describes how to receive data byte from an I2C Slave device in Stop mode using IT mode to an I2C Master device using IT mode. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

IWDG

IWDG_RefreshUntilUserEvent

This example describes how to configure the IWDG and insure counter update at regular period and generating an MCU IWDG reset at User Button pressed. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

LPTIM

LPTIM_PulseCounter

This example describes how to use the LPTIM in counter mode to generate a PWM output signal and update PWM duty cycle, based on a trigger provided by an external function generator. This example is based on the STM32L0xx LPTIM LL API; peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

LPTIM_PulseCounter_Init

This example describes how to use the LPTIM in counter mode to generate a PWM output signal and update PWM duty cycle, based on a trigger provided by an external function generator. This example is based on the STM32L0xx LPTIM LL API; peripheral initialization is done using LL initialization function to demonstrate LL init usage. - - - X - -

LPUART

LPUART_WakeUpFromStop

This example shows how to configure GPIO and LPUART peripherals to allow characters received on LPUART RX pin, to wake up MCU from low power mode; This example is based on STM32L0xx LPUART LL API; Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

LPUART_WakeUpFromStop_Init

This example shows how to configure GPIO and LPUART peripherals to allow characters received on LPUART RX pin to wake up the MCU from low-power mode; This example is based on the STM32L0xx LPUART LL API; Peripheral initialization is done using LL initialization function to demonstrate LL init usage. - - - 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 mode. - - - X - -

PWR_LPRunMode_SRAM1

This example shows how to execute code (LowPowerRun Mode) from SRAM1. - - - X - -

PWR_OptimizedRunMode

This example shows how to increase/decrease Frequency and Vcore and how to enter/exit LowPowerRun 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 - -

RNG

RNG_GenerateRandomNumbers

This example shows how to configure RNG peripheral to allow generation of 32-bit long Random Numbers. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

RNG_GenerateRandomNumbers_IT

This example shows how to configure RNG peripheral to allow generation of 32-bit long Random Numbers, using interrupts. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - 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_ExitStandbyWithWakeUpTimer

This example shows how to configure the RTC in order to wakeup system from standby mode using RTC Wakeup Timer. Peripheral initialization is done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

RTC_ProgrammingTheWakeUpTimer

This example shows how to configure the RTC in order to work with the WUT. 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 - -

RTC_TimeStamp

This example guides you through the different configuration steps by mean of LL API to ensure Time Stamp 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 for transmitting bytes from an SPI Master device to an SPI Slave device by using DMA mode through the STM32L0xx SPI LL API. Peripheral initialization 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 for transmitting bytes from an SPI Master device to an SPI Slave device by using DMA mode through the STM32L0xx SPI LL API. Peripheral initialization 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 for transmitting bytes from an SPI Master device to an SPI Slave device by using IT mode through the STM32L0xx SPI LL API. Peripheral initialization 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 using DMA mode through the STM32L0xx SPI LL API. Peripheral initialization 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 using Interrupt mode through the STM32L0xx SPI LL API. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

TIM

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 STM32L0xx 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 STM32L0xx 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 STM32L0xx 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 STM32L0xx 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 STM32L0xx 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 STM32L0xx 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 STM32L0xx 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 IT. Peripheral initialization 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 IT. Peripheral initialization 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 IT. Peripheral initialization 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 STM32L0xx USART LL API; Peripheral initialization 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 STM32L0xx USART LL API; Peripheral initialization 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 STM32L0xx USART LL API; Peripheral initialization 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 STM32L0xx USART LL API; Peripheral initialization 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 STM32L0xx USART LL API. Peripheral initialization 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 IT mode through the STM32L0xx USART LL API (SPI is using DMA for receving/transmitting characters sent from/received by USART). Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -

USART_WakeUpFromStop

This example shows how to configure GPIO and USART peripherals for allowing characters received on USART RX pin, to wake Up MCU from low power mode, using STM32L0xx USART LL API. Peripheral initialization 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 WWDG and update counter at regular period and generating an MCU WWDG reset at User Button pressed. Peripheral initialization done using LL unitary services functions for optimization purpose (performance and size). - - - X - -
Total number of examples_ll: 82 0 0 0 82 0 0

Examples_MIX

ADC

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 STM32L0xx ADC HAL & LL API (LL API used for performance improvement). - - - X - -

CRC

CRC_PolynomialUpdate

This example provides a description of how to use CRC peripheral through the STM32L0xx CRC HAL & LL API (LL API used for performance improvement). - - - 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 STM32L0xx DMA HAL & 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 master and 2 slaves with different Address size (7-bit or 10-bit) through the STM32L0xx HAL & LL API (LL API used for performance improvement), using an interrupt. - - - X - -

PWR

PWR_STANDBY_RTC

This example shows how to enter the system in STANDBY mode and wake-up from this mode using external RESET or RTC Wake-up Timer through the STM32L0xx RTC & RCC HAL & LL API (LL API used for performance improvement). - - - X - -

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_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 STM32L0xx UART HAL & LL API (LL API used 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 STM32L0xx UART HAL & LL API (LL API used for performance improvement). - - - X - -
Total number of examples_mix: 11 0 0 0 11 0 0

Applications

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, in order to develop an application exploiting FatFs offered features with microSD drive configuration. X - - - X -

FatFs_uSD_RTOS

This example 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 using the SD card available on the Adafruit 1.8" TFT shield and mounted on top of the STM32 Nucleo board. - - - - X -

FreeRTOS

FreeRTOS_LowPower

This application shows how to enter and exit low power mode with CMSIS RTOS API. X - X X X X

FreeRTOS_LowPower_LPTIM

This application aims to enter MCU in the STOP mode when all RTOS tasks are suspended. - - - - X -

FreeRTOS_Mail

This application shows how to use mail queues with CMSIS RTOS API. X - X X X X

FreeRTOS_Mutexes

This application shows how to use mutexes with CMSIS RTOS API. X - X X X X

FreeRTOS_Queues

This application shows how to use message queues with CMSIS RTOS API. X - X X X X

FreeRTOS_Semaphore

This application shows how to use semaphores with CMSIS RTOS API . X - X X X X

FreeRTOS_SemaphoreFromISR

This application shows how to use semaphore from ISR with CMSIS RTOS API . X - X X X X

FreeRTOS_Signal

This application shows how to use thread signalling using CMSIS RTOS API. X - X X X X

FreeRTOS_SignalFromISR

This application shows how to use thread signalling from an interrupt using CMSIS RTOS API. X - X X X X

FreeRTOS_ThreadCreation

This application shows how to implement a thread creation using CMSIS RTOS API. X - X X X X

FreeRTOS_Timers

This application shows how to use timers of CMSIS RTOS API. X - X 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 - - - - -

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 - - - - -

LCD

LCD_Display_Text

This example provides a description of how to use the STM32L0xx embedded LCD GLASS controller and how to configures the LCD to display a simple text and activate the different icons. X - - - - -

TouchSensing

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

USB_Device

CDC_Standalone

This example is a part of the USB Device Library package using STM32Cube firmware. It describes how to use USB device application based on the Device Communication Class (CDC) following the PSTN sub-protocol in the STM32L0xx devices using the USB Device and UART peripherals. X - - - - -

DFU_Standalone

This example is a part of the USB Device Library package using STM32Cube firmware. It describes how to use USB device application based on the Device Firmware Upgrade (DFU) on the STM32L0xx devices. X - - - X X

HID_Standalone

This example is a part of the USB Device Library package using STM32Cube firmware. This application shows how to use the USB device application based on the Human Interface (HID). X - - - X -

HID_Standalone_BCD

This example is a part of the USB Device Library package using STM32Cube firmware. This example describes how to use the BCD feature based on the USB HID device application. X - - - X X

HID_Standalone_LPM

This example describes how to use USB device application based on the Human Interface (HID) with Link Power Management Protocol (LPM) on the STM32L073xx USB FS devices. X - - - X -

HID_TSL_Standalone

This example is a part of the USB Device Library package using STM32Cube firmware. This example describes how to use USB device application based on the Human Interface (HID). - - - - - X

HID_TSL_Standalone_LPM

This example describes how to use USB device application based on the Human Interface (HID) with Link Power Management Protocol (LPM) on the STM32L053xx USB FS devices. - - - - - X

MSC_Standalone

This example is a part of the USB Device Library package using STM32Cube firmware. It describes how to use USB device application based on the Mass Storage Class (MSC) on the STM32L0xx devices. X - - - - -
Total number of applications: 73 21 0 10 10 17 15

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 - -

Demo

The provided demonstration firmware based on STM32Cube helps you to discover STM32 Cortex-M devices that can be plugged on a STM32L073Z_EVAL board. X - - - X X

Gravitech_4digits

The provided demonstration firmware based on STM32Cube helps you to discover STM32 Cortex-M devices that can be plugged on a STM32NUCLEO_32 board. - X X - - -
Total number of demonstrations: 6 1 1 1 1 1 1
Total number of projects: 559 100 53 69 170 92 75