EasyManuals Logo

ST STM32F31xx User Manual

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
Page #219 background imageLoading...
Page #219 background image
UM1581
FLASH Memory (FLASH)
DocID023800 Rev 1
219/584
ï‚· FLASH_EraseAllPages()
ï‚· FLASH_ProgramWord()
ï‚· FLASH_ProgramHalfWord()
11.2.4 Option Bytes Programming functions
This group includes the following functions:
ï‚· void FLASH_OB_Unlock(void);
ï‚· void FLASH_OB_Lock(void);
ï‚· void FLASH_OB_Erase(void);
ï‚· FLASH_Status FLASH_OB_WRPConfig(uint32_t OB_WRP, FunctionalState
NewState);
ï‚· FLASH_Status FLASH_OB_RDPConfig(uint8_t OB_RDP);
ï‚· FLASH_Status FLASH_OB_UserConfig(uint8_t OB_IWDG, uint8_t OB_STOP,
uint8_t OB_STDBY);
ï‚· FLASH_Status FLASH_OB_BOOTConfig(uint8_t OB_BOOT1);
ï‚· FLASH_Status FLASH_OB_VDDAConfig(uint8_t OB_VDDA_ANALOG);
ï‚· FLASH_Status FLASH_OB_SRMParityConfig(uint8_t OB_SRAM_Parity);
ï‚· FLASH_Status FLASH_OB_WriteUser(uint8_t OB_USER);
ï‚· FLASH_Status FLASH_OB_Launch(void);
ï‚· uint32_t FLASH_OB_GetUser(void);
ï‚· uint8_t FLASH_OB_GetWRP(void);
ï‚· uint8_t FLASH_OB_GetRDP(void);
Any operation of erase or program should follow these steps:
1. Call the FLASH_OB_Unlock() function to enable the FLASH option control register
access.
2. Call one or several functions to program the desired Option Bytes:
 void FLASH_OB_WRPConfig(uint32_t OB_WRP, FunctionalState NewState); =>
to Enable/Disable the desired sector write protection.
 FLASH_Status FLASH_OB_RDPConfig(uint8_t OB_RDP) => to set the desired
read Protection Level.
 FLASH_Status FLASH_OB_UserConfig(uint8_t OB_IWDG, uint8_t OB_STOP,
uint8_t OB_STDBY); => to configure the user Option Bytes.
 FLASH_Status FLASH_OB_BOOTConfig(uint8_t OB_BOOT1); => to set the
boot1 mode
 FLASH_Status FLASH_OB_VDDAConfig(uint8_t OB_VDDA_ANALOG); => to
Enable/Disable the VDDA monotoring.
 FLASH_Status FLASH_OB_SRMParityConfig(uint8_t OB_SRAM_Parity); => to
Enable/Disable the SRAM Parity check.
 FLASH_Status FLASH_OB_WriteUser(uint8_t OB_USER); => to write all user
option bytes: OB_IWDG, OB_STOP, OB_STDBY, OB_BOOT1,
OB_VDDA_ANALOG and OB_VDD_SD12.
3. Once all needed Option Bytes to be programmed are correctly written, call the
FLASH_OB_Launch() function to launch the Option Bytes programming process. (#@)
When changing the IWDG mode from HW to SW or from SW to HW, a system reset is
needed to make the change effective.
4. Call the FLASH_OB_Lock() function to disable the FLASH option control register
access (recommended to protect the Option Bytes against possible unwanted
operations).
ï‚· FLASH_OB_Unlock()
ï‚· FLASH_OB_Lock()

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F31xx and is the answer not in the manual?

ST STM32F31xx Specifications

General IconGeneral
BrandST
ModelSTM32F31xx
CategoryMicrocontrollers
LanguageEnglish

Related product manuals