cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103VG Flash Memory Write failure

Gagan Gupta
Associate II

Hi, I am using STM32F103VG micro-controller. I am trying to program the memory in range 0x8014000 to 0x8090000. My code is able to program the memory till 0x807FFFF but after that it failed to write into memory i.e. problem happens after I start writing to bank2 once bank1 programming is finished.

I am using STM32 HAL library to write to memory.

If I directly write to bank2 memory area without first writing into bank1 memory area and then to bank2, it gets passed without any failure.

1 ACCEPTED SOLUTION

Accepted Solutions
Gagan Gupta
Associate II

I found the mistake. I was erasing both bank together causing the issue. Once I erased the bank1, bank2 separately, problem is resolved.

Actually HAL library does not support bank1/bank2 to be erased together.

View solution in original post

1 REPLY 1
Gagan Gupta
Associate II

I found the mistake. I was erasing both bank together causing the issue. Once I erased the bank1, bank2 separately, problem is resolved.

Actually HAL library does not support bank1/bank2 to be erased together.