PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
work_flash.c File Reference
#include "work_flash.h"
Include dependency graph for work_flash.c:

Go to the source code of this file.

Macros

#define Flash_Read(addr)   *(volatile uint16_t*)((uint32_t)(addr))
 Read a half word data from Flash. More...
 
#define Flash_Write(addr, data)   *(volatile uint16_t*)((uint32_t)(addr)) = ( uint16_t)(data)
 Wirte a half word data into Flash. More...
 

Functions

static uint8_t WFlash_CheckToggle (uint16_t *pu16Addr)
 automatic algorithm of flash memory execution More...
 
static void WFlash_ReadResetCmd (uint16_t *pu16ResetSecAddr)
 Issue read/reset command. More...
 
uint8_t WFlash_ChipErase (void)
 Flash chip erase. More...
 
uint8_t WFlash_SectorErase (uint16_t *pu16SecAddr)
 Flash sector erase. More...
 
uint8_t WFlash_Write (uint16_t *pu16WriteAddr, uint16_t *pu16WriteData, uint32_t u32Size)
 Flash half-word write with ECC. More...
 

Detailed Description

A detailed description is available at WorkFlash Module description

History:

  • 2013-10-09 0.1 Edison Zhang First version.

Definition in file work_flash.c.