See Flash Memory Control for documentation.


Copyright 2018 Silicon Laboratories Inc.

The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.

#ifndef __FLASH_H__
#define __FLASH_H__

#include "memmap.h"

bool halFlashEraseIsActive(void);


//[[ The following eraseType definitions must match the FIB erase types! ]]

#define MFB_MASS_ERASE 0x01
#define MFB_PAGE_ERASE 0x02
#define CIB_ERASE      0x03

EmberStatus halInternalFlashErase(uint8_t eraseType, uint32_t address);

EmberStatus halInternalFlashWrite(uint32_t address, uint16_t * data, uint32_t length);

EmberStatus halInternalCibOptionByteWrite(uint8_t byte, uint8_t data);


#endif //__FLASH_H__



Tells the calling code if a Flash Erase operation is active.

Function Documentation#


bool halFlashEraseIsActive (void)

Tells the calling code if a Flash Erase operation is active.


This state is import to know because Flash Erasing is ATOMIC for 21ms and could disrupt interrupt latency. But if an ISR can know that it wasn't serviced immediately due to Flash Erasing, then the ISR has the opportunity to correct in whatever manner it needs to.


  • A bool flag: true if Flash Erase is active, false otherwise.

Definition at line 46 of file /mnt/raid/workspaces/ws.04isO4uyE/overlay/gsdk/platform/base/hal/micro/cortexm3/flash.h