STM32F0xx Standard Peripherals Firmware Library: FLASH_WriteProtection

STM32F0xx Standard Peripherals Library

STM32F0xx Standard Peripherals Firmware Library

Defines

#define BANK1_WRITE_END_ADDR   ((uint32_t)0x08008000)
#define BANK1_WRITE_START_ADDR   ((uint32_t)0x08006000)
#define FLASH_PAGE_PROGRAM
#define FLASH_PAGE_SIZE   ((uint16_t)0x400)
#define FLASH_PAGES_TO_BE_PROTECTED   (OB_WRP_Pages20to23 | OB_WRP_Pages44to47 | OB_WRP_Pages60to63)

Enumerations

enum  TestStatus {
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 1, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED
}

Functions

int main (void)
 Main program.

Variables

uint32_t Address = 0x0
uint16_t Data = 0x1753
uint32_t EraseCounter = 0x0
__IO FLASH_Status FLASHStatus = FLASH_COMPLETE
__IO TestStatus MemoryProgramStatus = PASSED
uint32_t NbrOfPage
uint32_t ProtectedPages = 0x0
uint32_t WRPR_Value = 0xFFFFFFFF

Define Documentation

#define BANK1_WRITE_END_ADDR   ((uint32_t)0x08008000)
#define BANK1_WRITE_START_ADDR   ((uint32_t)0x08006000)
#define FLASH_PAGE_PROGRAM
#define FLASH_PAGE_SIZE   ((uint16_t)0x400)
#define FLASH_PAGES_TO_BE_PROTECTED   (OB_WRP_Pages20to23 | OB_WRP_Pages44to47 | OB_WRP_Pages60to63)

Enumeration Type Documentation

enum TestStatus
Enumerator:
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 

Definition at line 40 of file STM32F0xx_StdPeriph_Examples/FLASH/Flash_WriteProtection/main.c.


Function Documentation

int main ( void  )

Main program.

Parameters:
None
Return values:
None

< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32f0xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f0xx.c file

Definition at line 96 of file STM32F0xx_StdPeriph_Examples/FLASH/Flash_WriteProtection/main.c.

References Address, BANK1_WRITE_END_ADDR, BANK1_WRITE_START_ADDR, Data, EraseCounter, FAILED, FLASH_PAGE_SIZE, FLASH_PAGES_TO_BE_PROTECTED, FLASHStatus, MemoryProgramStatus, NbrOfPage, ProtectedPages, and WRPR_Value.


Variable Documentation

uint16_t Data = 0x1753
__IO FLASH_Status FLASHStatus = FLASH_COMPLETE
uint32_t ProtectedPages = 0x0
uint32_t WRPR_Value = 0xFFFFFFFF
STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32