Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more
FLASH Memory Programming functions
[FLASH_Private_Functions]
  FLASH Memory Programming functions. More...
| Functions | |
| void | FLASH_Unlock (void) | 
| Unlocks the FLASH control register access. | |
| void | FLASH_Lock (void) | 
| Locks the FLASH control register access. | |
| FLASH_Status | FLASH_ErasePage (uint32_t Page_Address) | 
| Erases a specified page in program memory. | |
| FLASH_Status | FLASH_EraseAllPages (void) | 
| Erases all FLASH pages. | |
| FLASH_Status | FLASH_ProgramWord (uint32_t Address, uint32_t Data) | 
| Programs a word at a specified address. | |
| FLASH_Status | FLASH_ProgramHalfWord (uint32_t Address, uint16_t Data) | 
| Programs a half word at a specified address. | |
Detailed Description
FLASH Memory Programming functions.
 ===============================================================================
              ##### FLASH Memory Programming functions #####
 ===============================================================================   
    [..] This group includes the following functions:
         (+) void FLASH_Unlock(void);
         (+) void FLASH_Lock(void);
         (+) FLASH_Status FLASH_ErasePage(uint32_t Page_Address);
         (+) FLASH_Status FLASH_EraseAllPages(void);
         (+) FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data);
         (+) FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data);
    [..] Any operation of erase or program should follow these steps:
         (#) Call the FLASH_Unlock() function to enable the FLASH control register 
             program memory access.
         (#) Call the desired function to erase page or program data.
         (#) Call the FLASH_Lock() function to disable the FLASH control register 
             access (recommended to protect the FLASH memory against possible 
             unwanted operation).
    
Function Documentation
| FLASH_Status FLASH_EraseAllPages | ( | void | ) | 
Erases all FLASH pages.
- Note:
- To correctly run this function, the FLASH_Unlock() function must be called before. all the FLASH_Lock() to disable the flash memory access (recommended to protect the FLASH memory against possible unwanted operation)
- Parameters:
- 
  None 
- Return values:
- 
  FLASH Status: The returned value can be: FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. 
Definition at line 298 of file stm32f30x_flash.c.
| FLASH_Status FLASH_ErasePage | ( | uint32_t | Page_Address ) | 
Erases a specified page in program memory.
- Note:
- To correctly run this function, the FLASH_Unlock() function must be called before.
- Call the FLASH_Lock() to disable the flash memory access (recommended to protect the FLASH memory against possible unwanted operation)
- Parameters:
- 
  Page_Address,: The page address in program memory to be erased. 
- Note:
- A Page is erased in the Program memory only if the address to load is the start address of a page (multiple of 1024 bytes).
- Return values:
- 
  FLASH Status: The returned value can be: FLASH_ERROR_PROGRAM, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. 
Definition at line 260 of file stm32f30x_flash.c.
| void FLASH_Lock | ( | void | ) | 
Locks the FLASH control register access.
- Parameters:
- 
  None 
- Return values:
- 
  None 
Definition at line 242 of file stm32f30x_flash.c.
| FLASH_Status FLASH_ProgramHalfWord | ( | uint32_t | Address, | 
| uint16_t | Data | ||
| ) | 
Programs a half word at a specified address.
- Note:
- To correctly run this function, the FLASH_Unlock() function must be called before. Call the FLASH_Lock() to disable the flash memory access (recommended to protect the FLASH memory against possible unwanted operation)
- Parameters:
- 
  Address,: specifies the address to be programmed. Data,: specifies the data to be programmed. 
- Return values:
- 
  FLASH Status: The returned value can be: FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. 
Definition at line 391 of file stm32f30x_flash.c.
| FLASH_Status FLASH_ProgramWord | ( | uint32_t | Address, | 
| uint32_t | Data | ||
| ) | 
Programs a word at a specified address.
- Note:
- To correctly run this function, the FLASH_Unlock() function must be called before. Call the FLASH_Lock() to disable the flash memory access (recommended to protect the FLASH memory against possible unwanted operation)
- Parameters:
- 
  Address,: specifies the address to be programmed. Data,: specifies the data to be programmed. 
- Return values:
- 
  FLASH Status: The returned value can be: FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. 
Definition at line 333 of file stm32f30x_flash.c.
| void FLASH_Unlock | ( | void | ) | 
Unlocks the FLASH control register access.
- Parameters:
- 
  None 
- Return values:
- 
  None 
Definition at line 227 of file stm32f30x_flash.c.
Generated on Tue Jul 12 2022 17:34:45 by
 1.7.2
 1.7.2