cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C011F4 FLASH size 32kB ?

danmcb
Associate II

I have some strage problems trying to access all 32kB FLASH on this chip.

If I run a program in the first 16kB of the flash space, it runs perfectly and I can read and write the full 32kB of flash. Reading and writing the full flash is also possible from STM32CubeProgrammer.

If I run a program in the first 16kB of the flash space and jump to a program in the last 16kB of the flash, I get a hard fault. (Could this be a coding error ... ?)

If I try to run a program larger than 16kB from STM32CubeIDE, I get the error below and the flash still contains its original content (so the erase also was not executed).

If I flash a program larger than 16kB via STM32CubeProgrammer it successfully flashes and runs perfectly fine after a reset.

And this is written in the console:

 

 

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a13276.srec

  File          : ST-LINK_GDB_server_a13276.srec

  Size          : 20.95 KB

  Address       : 0x08000000


Erasing memory corresponding to segment 0:

Error: Operation exceeds memory limits

Error: failed to erase memory

Encountered Error when opening C:\ST\STM32CubeIDE_1.12.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.400.202404281720\tools\bin\STM32_Programmer_CLI.exe

Error in STM32CubeProgrammer

Shutting down...

Exit.

 

 

This is the result when STM32CubeProgrammer reads the chip:

 

image001.png 

This is when STM32CubeIDE reads the chip

image002.png

why do we see different available sizes with different tools?

 

thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Evangelist III

@danmcb wrote:

I have some strange problems trying to access all 32kB FLASH on this chip.


STM32C011F4 only has 16K of Flash:

AndrewNeil_0-1727694173448.png

https://www.st.com/resource/en/datasheet/stm32c011f4.pdf 

 

 

AndrewNeil_1-1727697512202.png

AndrewNeil_2-1727697604329.png

 

 

View solution in original post

2 REPLIES 2
Andreas Bolsch
Lead II

Although the F4 and F6 are the same die, the F4 has only 16 kByte of flash - officially. The extra 16 kByte might not be tested, might even be defective or slightly out of specs. Some tools might allow use of the extra flash, others might strictly stick to the advertized flash size ... 

Andrew Neil
Evangelist III

@danmcb wrote:

I have some strange problems trying to access all 32kB FLASH on this chip.


STM32C011F4 only has 16K of Flash:

AndrewNeil_0-1727694173448.png

https://www.st.com/resource/en/datasheet/stm32c011f4.pdf 

 

 

AndrewNeil_1-1727697512202.png

AndrewNeil_2-1727697604329.png