Herzog Library 00.00.01  rel_libdev.herzog.00.00.01.10606
Data Structures | Macros | Functions
flash_sfrs.h File Reference

Go to the source code of this file.

Data Structures

struct  FLASH_SFRS_t
 A structure to represent Special Function Registers for FLASH. More...
 

Macros

#define FLASH_SFRS   ((__IO FLASH_SFRS_t *) (FLASH_CTRL_BASE))
 
#define E_FLASH_CODE_PROTECT   ((uint32_t) 0xF2E11047)
 
#define E_FLASH_CODE_UNPROTECT   ((uint32_t) 0x00000000)
 
#define E_FLASH_BYTE_UNLOCK_PAT   ((uint32_t) 0x55555555)
 
#define E_FLASH_BYTE_WRITE_PAT   ((uint32_t) 0xAAAAAAAA)
 
#define E_FLASH_BLOCK_UNLOCK_PAT   ((uint32_t) 0x77777777)
 
#define E_FLASH_BLOCK_ERASE_PAT   ((uint32_t) 0x88888888)
 
#define E_FLASH_SECTOR_UNLOCK_PAT   ((uint32_t) 0x66666666)
 
#define E_FLASH_SECTOR_ERASE_PAT   ((uint32_t) 0x99999999)
 

Functions

static __ramfunc __INLINE void f_FLASH_EraseBlock (__IO uint32_t address)
 Flash memory erase block function. More...
 
static __ramfunc __INLINE uint32_t f_FLASH_CheckErasingBlock (void)
 Flash memory erase block check function. More...
 
static __ramfunc __INLINE void f_FLASH_EraseSector (__IO uint32_t address)
 Flash memory erase sector function. More...
 
static __ramfunc __INLINE uint32_t f_FLASH_CheckErasingSector (void)
 Flash memory erase sector check function. More...
 
static __ramfunc __INLINE void f_FLASH_WriteByte (__IO uint32_t address, uint8_t data)
 Flash memory write byte function. More...
 
static __ramfunc __INLINE uint32_t f_FLASH_CheckWritingByte (void)
 Flash memory write byte check function. More...
 
static __INLINE void f_FLASH_CodeProtection (uint32_t mode)
 Flash memory write byte check function. More...
 

Detailed Description

This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.

Macro Definition Documentation

#define E_FLASH_BLOCK_ERASE_PAT   ((uint32_t) 0x88888888)
#define E_FLASH_BLOCK_UNLOCK_PAT   ((uint32_t) 0x77777777)
#define E_FLASH_BYTE_UNLOCK_PAT   ((uint32_t) 0x55555555)
#define E_FLASH_BYTE_WRITE_PAT   ((uint32_t) 0xAAAAAAAA)
#define E_FLASH_CODE_PROTECT   ((uint32_t) 0xF2E11047)
#define E_FLASH_CODE_UNPROTECT   ((uint32_t) 0x00000000)
#define E_FLASH_SECTOR_ERASE_PAT   ((uint32_t) 0x99999999)
#define E_FLASH_SECTOR_UNLOCK_PAT   ((uint32_t) 0x66666666)
#define FLASH_SFRS   ((__IO FLASH_SFRS_t *) (FLASH_CTRL_BASE))

Function Documentation

static __ramfunc __INLINE uint32_t f_FLASH_CheckErasingBlock ( void  )
static

Flash memory erase block check function.

Returns
Block Erase Flag, 1 if still erasing, 0 otherwise
static __ramfunc __INLINE uint32_t f_FLASH_CheckErasingSector ( void  )
static

Flash memory erase sector check function.

Returns
Sector Erase Flag, 1 if still erasing, 0 otherwise
static __ramfunc __INLINE uint32_t f_FLASH_CheckWritingByte ( void  )
static

Flash memory write byte check function.

Returns
Byte write Flag, 1 if still erasing, 0 otherwise
static __INLINE void f_FLASH_CodeProtection ( uint32_t  mode)
static

Flash memory write byte check function.

Parameters
modeThe enumeration of enable or disable code protection
static __ramfunc __INLINE void f_FLASH_EraseBlock ( __IO uint32_t  address)
static

Flash memory erase block function.

Parameters
addressinside the block to be erased.
static __ramfunc __INLINE void f_FLASH_EraseSector ( __IO uint32_t  address)
static

Flash memory erase sector function.

Parameters
addressinside the sector to be erased.
static __ramfunc __INLINE void f_FLASH_WriteByte ( __IO uint32_t  address,
uint8_t  data 
)
static

Flash memory write byte function.

Parameters
addressand data (byte) to be programmed into flash.
dataand data (byte) to be programmed into flash.