AnsweredAssumed Answered

STM32F2 In application programming using image files

Question asked by bhatt.mit.001 on Dec 8, 2012
Latest reply on Dec 8, 2012 by Clive One
Hi All,

Device: STM32F207VC
Flash: 256KB
RAM: 128KB

I have a general question regarding programming image file to user code area in flash located at: 0x8000000

I am running following procedure to do this.
1). Making sure Flash Erase/Read/Write utility functions are executing from SRAM
2). Program the binary image file to Sector 5 on flash, located at addr: 0x8020000 (works fine)
3). Disable interrupts
4). Copy code image file from 0x8020000 to 0x8000000.

Problem occurs when I try to erase sector 0 located at 0x8000000, my program stalls, and but debugger is running so I was able to identify that FLASH_SR value is (status: 0xC0), meaning that PGSERR and PGPERR bits are set. 

Not sure what the problem is. Do I need to relocated RESET vector and vector table to SRAM?

Thanks in advance,

Mit

Outcomes