Introduction
For designers of STM32 microcontroller applications, the ability to easily replace one microcontroller type with another from the
same product family is an important asset.
Migrating an application to a different microcontroller is often needed when product requirements grow, putting extra demands
on memory size or increasing the number of I/Os. Cost reduction objectives may also be a reason to switch to smaller
components and shrink the PCB area.
This application note analyses the steps required to migrate an existing design between STM32F303/F334 lines and
STM32G431xx/G474xx/G491xx microcontrollers. All the most important information is grouped here. Three aspects need to
be considered for the migration: the hardware, peripheral(s) and firmware.
This document lists the full set of features available for STM32F303/F334 lines and the equivalent features on STM32G431xx/
G474xx/G491xx devices.
To fully benefit from this application note, the user should be familiar with the STM32 microcontroller documentation available on
www.st.com with a particular focus on:
STM32F3 reference manuals:
STM32F303xB/C/D/E, STM32F303x6/8, STM32F328x8, STM32F358xC, STM32F398xE advanced Arm
®
-based
MCUs (RM0316)
STM32F334xx advance Arm
®
-based 32-bit MCUs (RM0364)
STM32F3 datasheets:
STM32F303xB STM32F303xC datasheet
STM32F303xD STM32F303xE datasheet
STM32F303x6/x8 datasheet
STM32G4xx reference manuals:
STM32G4xx advanced Arm
®
-based 32-bit MCUs (RM0440)
STM32G431xx/G474xx/G491xx datasheets
Table 1. Applicable products
Type Product lines and part numbers
Microcontrollers
STM32F3xx
STM32F303 Lines
STM32F334 Lines
STM32G431xx
STM32G431C6, STM32G431C8, STM32G431CB, STM32G431K6, STM32G431K8, STM32G431KB,
STM32G431M6, STM32G431M8, STM32G431MB, STM32G431R6, STM32G431R8, STM32G431RB,
STM32G431V6, STM32G431V8, STM32G431VB
STM32G474xx
STM32G474CB, STM32G474CC, STM32G474CE, STM32G474MB, STM32G474MC, STM32G474ME,
STM32G474QB, STM32G474QC, STM32G474QE, STM32G474RB, STM32G474RC, STM32G474RE,
STM32G474VB, STM32G474VC, STM32G474VE
STM32G491xx
STM32G491CC, STM32G491CE, STM32G491KC, STM32G491KE, STM32G491MC, STM32G491ME,
STM32G491RC, STM32G491RE, STM32G491VC, STM32G491VE
Migrating between STM32F334/303 lines and STM32G431xx/G474xx/G491xx
microcontrollers
AN5094
Application note
AN5094 - Rev 4 - September 2021
For further information contact your local STMicroelectronics sales office.
www.st.com
1 STM32G431xx/G474xx/G491xx overview
The STM32G431xx/G474xx/G491xx are based on the high-performance Arm
®
Cortex
®
-M4 32-bit, up to 170 MHz
and include a larger set of peripherals with advanced features compared to the STM32F303 lines ones, such as:
Advanced encryption hardware accelerator (AES)
Serial audio interface (SAI)
Low-power UART (LPUART)
Low-power timer (LPTIM)
Voltage reference buffer (VREFBUF)
Quad-SPI interface (QUADSPI)
Clock recovery system (CRS) for USB
SRAM1 size is different on the various STM32G431xx/G474xx/G491xx devices:
16 Kbytes for STM32G431xx
80 Kbytes for STM32G474xx
80 Kbytes for STM32G491xx
Additional SRAM2 with data preservation in Standby mode:
6 Kbytes for STM32G431xx
16 Kbytes for STM32G474xx
16 Kbytes for STM32G491xx
CCM SRAM :
10 Kbytes for STM32G431xx
32 Kbytes for STM32G474xx
16 Kbytes for STM32G491xx
8-bit ECC on FLASH memory
Dual bank boot (only on STM32G474xx)
This migration guide is only covering the migration from STM32F303/F334 lines to STM32G431xx/G474xx/
G491xx devices. As a consequence the new features present on STM32G431xx/G474xx/G491xx but not already
present on STM32F303 lines are not covered (refer to the STM32G431xx/G474xx/G491xx devices reference
manuals and datasheets for an exhaustive overview).
This document applies to STM32F334/303 lines and STM32G431xx/G474xx/G491xx Arm
®
-based devices.
Note: Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
AN5094
STM32G431xx/G474xx/G491xx overview
AN5094 - Rev 4
page 2/36