2026-01-14 3:20 PM
Hi,
is there a 64Kb drop-in replacement for the STM32C031G6U6 (which is only 32kb)?
We need to find a part where - ideally - we just use the same code without any mods, this is the most important part.
And is there perhaps a tool that helps with that? Or at least allows us to make an accurate comparison check between two parts?
We just use GPIOs and 1 x RS232 and 1 x I2C in their default pin locations.
Thank you
2026-01-14 3:39 PM
The STM32C031 is only available in 16 kB or 32 kB flash sizes.
The part selector in STM32CubeMX can help you narrow down and find a suitable chip. Here are STM32C0 chips with 64+ kB of flash.
Ultimately it depends on what your program does, but in most cases those will be able to run the same code without modification.
2026-01-14 11:07 PM - edited 2026-01-14 11:09 PM
How about C071?
Maybe changing the compiler optimization level from the default -O0 to -Os will be enough to solve your problem without changing the chip. If not, get rid of HAL. ;)
2026-01-15 12:40 AM - edited 2026-01-15 12:43 AM
Hello @Ricko ,
The STM32C051G8U6 is the 64kB flash drop in replacement of STM32C031G6U6.
They are in the same series, so the package pinout, alternate function and platform are the same. The main differences are that in STM32C051G8U6 there are more flash and more peripherals.
You can have a look on this application where STM32G0 and STM32C0 are compared. There are multiple tables comparing the devices; https://www.st.com/resource/en/application_note/an5969-migrating-between-stm32g0-and-stm32c0-mcus-stmicroelectronics.pdf
Best regards,
Simon