2024-09-30 03:40 AM
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:
This is when STM32CubeIDE reads the chip
why do we see different available sizes with different tools?
thank you.
Solved! Go to Solution.
2024-09-30 04:03 AM - edited 2024-09-30 05:00 AM
@danmcb wrote:I have some strange problems trying to access all 32kB FLASH on this chip.
STM32C011F4 only has 16K of Flash:
https://www.st.com/resource/en/datasheet/stm32c011f4.pdf
2024-09-30 03:50 AM
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 ...
2024-09-30 04:03 AM - edited 2024-09-30 05:00 AM
@danmcb wrote:I have some strange problems trying to access all 32kB FLASH on this chip.
STM32C011F4 only has 16K of Flash:
https://www.st.com/resource/en/datasheet/stm32c011f4.pdf