2016-02-17 09:56 PM
I am using STM32F427IG microcontroller. The Flash Rom is connected to the FMC Controller. I am getting error when I tried to erase a sector of flash memory. The error status flags- PGSERR, PGPERR was set. It worked fine when I cleared this error flags and tried again.
This error exists when I tried to erase again. So everytime, I need to clear the status flag and have to try again.2016-02-18 12:00 AM
> I am using STM32F427IG microcontroller. The Flash Rom is connected to the FMC Controller.
So, you have an external FLASH connected to the mcu? What kind of it? > I am getting error when I tried to erase a sector of flash memory. The error status flags- PGSERR, PGPERR was set. These flags are related to *internal* memory, not to external memory connected through FMC. JW2016-02-18 12:31 AM
Sorry, I was wrong. We are using the internal flash.
2016-02-18 02:05 AM
Could you unlock the flash successfully. Not sure about your part number but I think that you cant erase a sector, you only can erase complete page.
So the better way to erase a sector is first read the complete page content. keep that in RAM(buffer). Edit the desired sector location in RAM. Erase the page and write the updated RAM(buffer)./*Please
mark helpfull
if this post helps you or solves your problem.*/
/* If you need any personal support for your work please contact at
embeddeddesign.help@gmail.com*/
2016-02-18 10:40 AM
You're doing something wrong, what exactly that is is hard to know from your presentation of the problem. Refine your presentation.
Show you code, ideally a sufficiently complete example, that demonstrates the failure. The erase on the F4 takes a block number, not an address.