AnsweredAssumed Answered

Flash @ STM32F429VIT6

Question asked by amaral.guilherme on Nov 2, 2015
Latest reply on Nov 2, 2015 by amaral.guilherme
Hi,

I'm using FLASH to store some data. Everything works great when I write in an empty address. When I try to write in a already used memory position, the stored value becomes to zero!
I tried erase the sector before call the write function but the uC crashes. 

Here it follows:


FLASH_Unlock();
FLASH_ClearFlag(FLASH_FLAG_EOP | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR|FLASH_FLAG_PGSERR); 
FLASH_EraseSector(ADDR_FLASH_SECTOR_4,VoltageRange_3);
FLASH_ProgramWord(ADDR_FLASH_SECTOR_4, data);
FLASH_Lock();


Anyone can help me? I'm using FreeRTOS.

Thanks in advance,
--
Guilherme 

Outcomes