2023-09-21 10:11 PM
I am currently using the STM32F103VGT6 MCU controller, which has an internal flash 1MB divided into two banks, each with a size of 512KB. I have written a code that is 600KB in size. After writing to the entirety of Bank 1, I attempted to write to Bank 2 but have been unsuccessful. Is there a specific setting that needs to be adjusted in order to write to Bank 2?
2023-09-21 11:41 PM
> After writing to the entirety of Bank 1, I attempted to write to Bank 2
How?
Is your mcu genuine ST part from a reputable source? The are many counterfeited STM32F103 out there.
JW
2023-09-21 11:49 PM
I bought it exclusively from STMicroelectronics. The part number is STM32F103VGT6.
2023-09-22 12:16 AM
Do you have problems programming the entire flash using STLink and CubeProgrammer?
JW
2023-09-22 02:55 AM
I was able to download the program using STLink, but when I tried to execute it, I received an INVSTATE hardfault error. Upon further investigation, I connected to the STLink utility and saw that the data in bank2 memory location.I could only see ffffffff data in bank2 memory after the download process. This was confirmed me that it is not allowing me to write.
2023-09-22 04:09 AM
Check the option bytes. Make sure no write protection is on. Note, that all Bank2 (together with upper half of Bank 1) is write-protected by a single bit. See PM0068.
JW