Answers for "how to write data to the internal flash memory of an stm32"

C
0

how to write flash memory in stm32f030

// You can write into flash page but can not over write erase page before write again.
//https://stackoverflow.com/questions/47373317/how-to-write-erase-on-chip-flash-continuously-in-stm32f030-family
uint32_t pageAddress = 0x08008000;
  uint16_t buffer = 0xdddd;          // data buffer
  HAL_HAL_StatusTypeDef  status;

  while(1)
  { 
     HAL_FLASH_Unlock();              // unlock the flash memory in ST
     //FLASH_PageErase(pageAddress); 
     status=HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, pageAddress, 
     buffer);
     HAL_FLASH_Lock();                // Flash memory locked
  }
Posted by: Guest on February-06-2021

Code answers related to "how to write data to the internal flash memory of an stm32"

Code answers related to "C"

Browse Popular Code Answers by Language