EasyManua.ls Logo

ST STM32F31xx

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
FLASH Memory (FLASH)
UM1581
218/584
DocID023800 Rev 1
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()

Table of Contents

Related product manuals