2024-02-16 02:34 PM
Hello. I am confused about the amount of flash on an STM32F105VBT6. From the overview for the STM32F105/107 devices, I gather that this MCU should have 128 Kbytes of flash. And in STM32CubeProgrammer, in the lower right, it says that the target has 128 Kbytes of flash as well. However, I was able to program 139 Kbytes of flash, and it seems like I can successfully write 0x00000000 to the 4 bytes at 0x0803FFFC to 0x0803FFFF. So, the MCU seems to have 256 Kbytes, which is what an STM32F105VC should have. Does anyone know what's going on?
Solved! Go to Solution.
2024-02-16 02:58 PM - edited 2024-02-16 03:00 PM
In short, the flash is likely there, you can use it, but it hasn't been tested. In all likelihood, it will work fine, but isn't something guaranteed to work by ST.
ST uses the same die for multiple chips, which saves on fab costs.
ST only tests 128 kB of flash on chips on which they guarantee it in order to save on testing costs.
See discussion here, among many other threads:
https://community.st.com/t5/stm32-mcus-products/stm32f030f4-with-32k-of-flash/m-p/638951
2024-02-16 02:58 PM - edited 2024-02-16 03:00 PM
In short, the flash is likely there, you can use it, but it hasn't been tested. In all likelihood, it will work fine, but isn't something guaranteed to work by ST.
ST uses the same die for multiple chips, which saves on fab costs.
ST only tests 128 kB of flash on chips on which they guarantee it in order to save on testing costs.
See discussion here, among many other threads:
https://community.st.com/t5/stm32-mcus-products/stm32f030f4-with-32k-of-flash/m-p/638951
2024-02-16 03:01 PM - edited 2024-02-16 03:02 PM
Psst! you've found an anomaly in the Matrix. You can exploit it if you are careful and keep it secret. If you report it, they will send the bots and restore the rendering to the dull norm.
2024-02-16 10:00 PM
Trust the manual (except you are really sure it is wrong).
The "fact" that you can write on the last word of 256K, but chip should just have 128K of flash - does not mean anything:
BTW:
I cannot imagine that STM leave in 256KB flash, if just 128KB are "provided" via datasheet: this is space and power consumption. I am pretty sure, if DS says "you have just 128KB" - you really just 128KB.
You are trapped by a wrong "illusion": if you write a zero, e.g. at the end of 128KB and there is an "address aliasing": you can read back a 0 also at 256KB end. But it does not mean you have really 256KB (where I am pretty sure, you do not have if DS says 128KB).
2024-02-19 10:10 AM
Thank you for your response. I'll follow your suggestion and learn how to write a better memory test.