cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103vgt6 flash issue

madhavi U
Associate II

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?

5 REPLIES 5

> 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

I bought it exclusively from STMicroelectronics. The part number is STM32F103VGT6.

Do you have problems programming the entire flash using STLink and CubeProgrammer?

JW

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.

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