AnsweredAssumed Answered

SMT32F103x_XL FLASH bank 2 stays BUSY

Question asked by van_wyk.herman on Sep 12, 2012
Latest reply on Sep 28, 2012 by van_wyk.herman
Hi all,
I am using an STM32F103ZG with the STM32F10x_StdPeriph Library. I started the development of the project with Keil ARM-MDK but now moved over to GCC.
The switch over has gone pretty smooth until now. I use the last page of FLASH as a configuration page to store product specific parameters. This is page is obviously situated in bank 2. In certain instances these configuration parameters need to be updated at runtime, but now that I have moved over to GCC, the second memory bank goes into a busy state as soon as I try to write to it and then it stays busy until I cycle the power. Erase works fine, but writing fails.
I do unlock all the FLASH and make sure that all the clocks are initialized to access the FLASH. Not sure if there is a problem with my linker file or if I screw something up in my startup file.
Attached are my linker file, startup file and other source. I call function Libhl_Flash_Init() as one of the first functions within main()

If anyone can tell me what I am doing wrong I will be very grateful.