ï€ Launch the Option Bytes loader
ï€ Erase the Option Bytes
ï€ Set/Reset the write protection
ï€ Set the Read protection Level
ï€ Program the user option Bytes
ï€ Set/Reset the BOOT1 bit
ï€ Enable/Disable the VDDA Analog Monitoring
ï€ Enable/Disable the SRAM parity
ï€ Get the user option bytes
ï€ Get the Write protection
ï€ Get the read protection status
4. FLASH Interrupts and flags management functions: this group includes all needed
functions to:
ï€ Enable/Disable the FLASH interrupt sources.
ï€ Get flags status.
ï€ Clear flags.
ï€ Get FLASH operation status.
ï€ Wait for last FLASH operation.
11.2.2 FLASH Interface configuration functions
This group includes the following functions:
ï‚· void FLASH_SetLatency(uint32_t FLASH_Latency);
ï‚· void FLASH_HalfCycleAccessCmd(uint32_t FLASH_HalfCycleAccess);
ï‚· void FLASH_PrefetchBufferCmd(FunctionalState NewState);
The unlock sequence is not needed for these functions.
ï‚· FLASH_SetLatency()
ï‚· FLASH_HalfCycleAccessCmd()
ï‚· FLASH_PrefetchBufferCmd()
11.2.3 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:
1. Call the FLASH_Unlock() function to enable the FLASH control register program
memory access.
2. Call the desired function to erase page or program data.
3. Call the FLASH_Lock() function to disable the FLASH control register access
(recommended to protect the FLASH memory against possible unwanted operation).
ï‚· FLASH_Unlock()
ï‚· FLASH_Lock()
ï‚· FLASH_ErasePage()