Skip to main content
gui2
Associate
November 1, 2015
Question

Flash @ STM32F429VIT6

  • November 1, 2015
  • 11 replies
  • 2353 views
Posted on November 02, 2015 at 00:43

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 
    This topic has been closed for replies.

    11 replies

    gui2
    gui2Author
    Associate
    November 2, 2015
    Posted on November 02, 2015 at 20:36

    SOLVED!!!!

    Thank you very much everyone specially clive1!

    You was right! I was making confusion with the index and with the initial address of sectors! Everything goes right now!

    Thank you!

    --

    Guilherme