AnsweredAssumed Answered

STM32F3 Flash page capacity and reading from Flash

Question asked by oziom.dominik on Aug 4, 2015
Latest reply on Aug 6, 2015 by oziom.dominik
Hello,
Lately I've been trying to save some data on flash in my STM32F3 discovery board.
Saving data was succesful but I have a little problem in reading from this memory.

Function I'm using to check my data is:


 uint32_t dana=0x00A98AC7;
.
.
.
  __IO uint32_t data32;
  uint32_t AddressCheck = PageTable[PageNumber];
  while (AddressCheck < PageTable[PageNumber+1])
   {
     data32 = *(__IO uint32_t*)AddressCheck;
     if (data32 != dana)
     {
         HAL_GPIO_WritePin(GPIOE, GPIO_PIN_13, GPIO_PIN_SET);
     }
     Address = Address + 4;
   }


dana is a value I'm writing to flash. When I'm checking flash registers (in debug window) it is saved there correctly.
When I use the above function all the flash memo registers are reported to have multiple errors.
I guess the problem is in here:   data32 = *(__IO uint32_t*)AddressCheck;
Can anyone please tell me why?
 Oh and the post question: each of my flash pages has 2kb memory  (0x800)
how many uint32_t variables can I store in one page?  is it 512?
I'm asking because when I look on flash memory registers I can easly count exactly 240 variables on one page.

Regards
Dominik O.

Outcomes