STM32 – Part 4: Overview of the STM32 G0 series capabilities

28.05.2025 4 minutes Author: animator404

I’d like to share my personal experience working with the G0 series, which I find very interesting and popular among enthusiasts. STMicroelectronics introduced the G0 series in 2019 as a replacement for the “mainstream” F0 series, but with improved power efficiency inspired by the L4 series. In essence, this series sits somewhere between the budget-friendly F0 and the energy-efficient L4.

Power Efficiency

The G0 series is based on a 90 nm process, which is a significant improvement over the 130 nm used in the F0. According to ST, the G0 consumes less than 100 µA per MHz when running at 64 MHz. This is significantly lower compared to the 250 µA of the F0. Additionally, a Shutdown mode has been added (where everything is turned off except the RTC), which may be useful in certain low-power scenarios. Some higher-end G0 variants also feature LP (Low-Power) UART.

Cost Optimization

With the G0 series, ST has implemented several design decisions to reduce the cost of the final product as much as possible:

  • Power supply pins for digital and analog peripherals have been merged. The entire MCU now runs from a single pair of power pins — VDD and VSS. This simplifies PCB routing but removes the ability to separate analog/digital power domains, which could theoretically have downsides. However, ST claims to have improved noise performance and stability.
  • By default, the BOOT0 pin now functions as a regular GPIO, freeing up one more I/O pin.
  • The freed-up pins can now serve as additional GPIO, allowing the use of smaller MCU packages.
  • Internal oscillator accuracy has been improved — now HSI16.
  • In models like STM32G0B and STM32G0C with Full-Speed USB support, a third internal oscillator (HSI48) has been added to enable USB functionality without requiring an external crystal.
  • Improved protection circuitry now handles voltage spikes up to several thousand volts.

Currently, the G0 series can be considered the most cost-effective among all STM32 MCUs, even with the recent launch of the ultra-budget C0 series.

Software BOOT0

Another “improvement” in the G0 series is that by default, it’s no longer possible to enter the bootloader mode by pulling the BOOT0 pin high. Now, booting from system memory (bootloader mode) requires a specific combination of the nBOOT0 and nBOOT1 bits in the Option Bytes. These can be configured either programmatically or via the STM32CubeProgrammer.

It’s still possible to restore the old behavior by clearing the nBOOT_SEL bit. If nBOOT_SEL = 1 (the default), the BOOT0 pin is completely ignored.

/*
* LAB Name: STM32 Boot0 Enable
* Author: Khaled Magdy
* For More Info Visit: www.DeepBlueMbedded.com
*/
#include "stm32g0xx.h"
void Flash_Unlock(void) {
FLASH->KEYR = 0x45670123; // Unlock Flash memory
FLASH->KEYR = 0xCDEF89AB;
FLASH->OPTKEYR = 0x08192A3B; // Unlock Option Bytes
FLASH->OPTKEYR = 0x4C5D6E7F;
}
void Boot0_Enable(void) {
FLASH->OPTR &= ~FLASH_OPTR_nBOOT_SEL; // Clear the nBOOT_SEL bit to enable BOOT0 pin functionality 
while(FLASH->SR & FLASH_SR_BSY1); // Wait for any ongoing flash operation to complete
FLASH->CR |= FLASH_CR_OPTSTRT; // Start the Option Byte programming
while(FLASH->SR & FLASH_SR_BSY1); // Wait for the programming to complete
FLASH->CR |= FLASH_CR_OBL_LAUNCH; // Launch the option byte loading
}
int main(void) {
if ((FLASH->OPTR & FLASH_OPTR_nBOOT_SEL) == 0) // Check if the nBOOT_SEL bit is already cleared
{
for (;;); // If already cleared, do nothing
}

Flash_Unlock(); // Unlock flash memory and option bytes
Boot0_Enable(); // Enable BOOT0 pin functionality
for (;;); // We should never reach this point as the system will reset
}

BOOT0 Behavior

The BOOT0 pin only functions if nBOOT_SEL = 0. ST explains this new approach as offering more flexibility and convenience for factory programming. Now, the bootloader will automatically activate if no firmware is present — regardless of the Option Bytes configuration.

Other Features

  • Packages: from 8-pin to 100-pin
  • Memory: up to 512 KB Flash, up to 144 KB RAM
  • Often used/second-hand units on AliExpress (may come pre-flashed)
  • ST-Link required for firmware recovery
  • No JTAG support

Conclusions

The G0 series is an attractive option for low-cost devices: low price, strong energy efficiency, and improved functionality. Despite the launch of the C0 series, the G0 currently offers better value for money. The most interesting variants are the cheapest models, since the more expensive ones lose their edge compared to other STM32 families.

Link to the original source: https://solderkid-blog.netlify.app/stm32/neopixel

Subscribe
Notify of
0 Коментарі
Oldest
Newest Most Voted
Found an error?
If you find an error, take a screenshot and send it to the bot.