STM32F1xx vs STM32L1xx

The STM32L1xx is one recent evolution of the STM32 targeting application requiring very low power consumption. While working on the STM32L1xx support I realized that there was much more than just power optimizations in the STM32L1xx, this new sub-family is greatly improved compared to the classic STM32F1xx.

Why make it different?

The STM32 has been immensely successful so far, it is feature rich, scalable and supports an excellent variety of peripherals. Perfection is not of this world however so even the STM32F1xx had its limits. The STM32L1xx is a clear effort in pushing the platform forward.

Internal organization

Internally the STM32L1xx is much like the classic STM32F1xx, it shares all the peripherals, naming conventions and most details however, while being largely compatible with the STM32F1xx, some peripherals have been improved and enhanced. Let's examine the platform by analyzing differences.


The clock tree is simpler than the STM32F1xx devices but there are significant differences:

  1. A new clock source has been added: MSI. This source is used after reset.
  2. Now it is possible to enable peripheral clocks separately for the normal mode and the low power mode, basically you can program which peripheral clocks are automatically stopped when entering the low power mode.
  3. The ADC is clocked directly by the HSI. It is not affected by any other clock setting.
  4. The USB clock is generated by dividing by two the PLL VCO clock, so it must be programmed to 96MHz, setting that clock to 96MHz requires the power mode 1 (1.8 volts), the USB is not available in power modes 2 and 3 (1.5 and 1.2 volts). The power mode is selected in the PWR_CR register, after reset the device is in power mode 2.

Everything else is similar but the registers layout is different, a specific initialization driver is required.


The STM32F1xx GPIO was already very good and has been greatly improved in the STM32L, it is now much more flexible. The AFIO functionality has been merged in the GPIO and now each pin can be reconfigured to up to 16 different alternate functions. Main differences are:

  1. No separate AFIO functionality.
  2. Each pin has its own AFIO settings.
  3. Now Pull-Up and Pull-Down resistors can be independently controlled and are not affected by the output latch.
  4. A new very slow output mode has been added (400KHz).


The ADC module has received a whole lot of improvements over the standard STM32F10x module.

  1. Variable resolution 6, 8, 10 and 12 bits modes.
  2. Larger number of input channels (requiring a different register layout).
  3. Analog watchdog.
  4. Handling of overflow errors during continuous conversions, this can happen when the DMA is saturated and it does not read the ADC data register fast enough, this condition goes undetected in STM32F1xx family.
  5. Now it is possible to insert arbitrary hardware delays between conversions.


The RTC module is entirely new, it is no more a simple seconds counter but a real calendar allowing easy date format conversions in software. It also includes two alarm comparators and is tied to EXTI lines in order to generate events or interrupts.


The STM32L1xx lost the advanced timer but gained several “normal” timers: TIM9/10/11.

chibios/articles/stm32f1_vs_stm32l1.txt · Last modified: 2011/10/06 11:16 by giovanni
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.3