AnsweredAssumed Answered

Problem using 32-bit data in internal Flash on STM32F407.

Question asked by liljedahl.bo on May 17, 2017
Latest reply on May 17, 2017 by waclawek.jan

Hello.

 

I have problem writing 32-bits word in internal Flash at certain addresses in STM32F407. It is impossible to write 32-bit data at address 0x080E000A. If I try to write data at 0x080F0000 it works perfectly. If I try to write at 0x080F0002 I read 0xFFFFFFFF. 0x080F0004 does not work either.

What can I do wrong? 

 

Is there any busy flag to read?

 

Here is my not working code:

address = 0x080F0004;
Pointer = (uint32_t *)0x080F0004;

 

HAL_FLASH_Unlock();
FLASH_Erase_Sector(11,FLASH_VOLTAGE_RANGE_3);
HAL_FLASH_Lock();
ReadData = *Pointer;
data = 0xABBABAAB;
HAL_FLASH_Unlock();
HAL_FLASH_Program(TYPEPROGRAM_WORD, address, data);
HAL_FLASH_Lock();
ReadData = *Pointer;

 

Best regards.

 

/Bosse

Outcomes