CC26xx Driver Library
flash.c File Reference
#include <inc/hw_types.h>
#include <inc/hw_ccfg.h>
#include <driverlib/flash.h>
#include <driverlib/rom.h>
#include <driverlib/chipinfo.h>

Go to the source code of this file.

Macros

#define CCFG_OFFSET_SECURITY   CCFG_O_BL_CONFIG
 
#define CCFG_OFFSET_SECT_PROT   CCFG_O_CCFG_PROT_31_0
 
#define CCFG_SIZE_SECURITY   0x00000014
 
#define CCFG_SIZE_SECT_PROT   0x00000004
 

Typedefs

typedef uint32_t(* FlashPrgPointer_t) (uint8_t *, uint32_t, uint32_t)
 
typedef uint32_t(* FlashSectorErasePointer_t) (uint32_t)
 

Functions

static void SetReadMode (void)
 
void FlashPowerModeSet (uint32_t ui32PowerMode, uint32_t ui32BankGracePeriode, uint32_t ui32PumpGracePeriode)
 Set power mode. More...
 
uint32_t FlashPowerModeGet (void)
 Get current configured power mode. More...
 
void FlashProtectionSet (uint32_t ui32SectorAddress, uint32_t ui32ProtectMode)
 Set sector protection. More...
 
uint32_t FlashProtectionGet (uint32_t ui32SectorAddress)
 Get sector protection. More...
 
uint32_t FlashProtectionSave (uint32_t ui32SectorAddress)
 Save sector protection to make it permanent. More...
 
uint32_t FlashSectorErase (uint32_t ui32SectorAddress)
 Erase a flash sector. More...
 
uint32_t FlashProgram (uint8_t *pui8DataBuffer, uint32_t ui32Address, uint32_t ui32Count)
 Programs unprotected main bank flash sectors. More...
 
bool FlashEfuseReadRow (uint32_t *pui32EfuseData, uint32_t ui32RowAddress)
 Reads efuse data from specified row. More...
 
void FlashDisableSectorsForWrite (void)
 Disables all sectors for erase and programming on the active bank. More...
 
uint32_t MemBusWrkAroundHapiProgramFlash (uint8_t *pui8DataBuffer, uint32_t ui32Address, uint32_t ui32Count)
 
uint32_t MemBusWrkAroundHapiEraseSector (uint32_t ui32Address)
 

Variables

const uint8_t g_pui8CcfgDefaultSec []
 

Macro Definition Documentation

#define CCFG_OFFSET_SECT_PROT   CCFG_O_CCFG_PROT_31_0

Definition at line 80 of file flash.c.

Referenced by FlashProtectionSave().

#define CCFG_OFFSET_SECURITY   CCFG_O_BL_CONFIG

Definition at line 79 of file flash.c.

#define CCFG_SIZE_SECT_PROT   0x00000004

Definition at line 82 of file flash.c.

Referenced by FlashProtectionSave().

#define CCFG_SIZE_SECURITY   0x00000014

Definition at line 81 of file flash.c.

Typedef Documentation

typedef uint32_t(* FlashPrgPointer_t) (uint8_t *, uint32_t, uint32_t)

Definition at line 97 of file flash.c.

typedef uint32_t(* FlashSectorErasePointer_t) (uint32_t)

Definition at line 99 of file flash.c.

Function Documentation

uint32_t MemBusWrkAroundHapiEraseSector ( uint32_t  ui32Address)

Definition at line 758 of file flash.c.

uint32_t MemBusWrkAroundHapiProgramFlash ( uint8_t *  pui8DataBuffer,
uint32_t  ui32Address,
uint32_t  ui32Count 
)

Definition at line 728 of file flash.c.

static void SetReadMode ( void  )
static

Definition at line 574 of file flash.c.

Referenced by FlashDisableSectorsForWrite().

Variable Documentation

const uint8_t g_pui8CcfgDefaultSec[]
Initial value:
= {0xFF, 0xFF, 0xFF, 0xC5,
0xFF, 0xFF, 0xFF, 0xFF,
0xC5, 0xFF, 0xFF, 0xFF,
0xC5, 0xC5, 0xC5, 0xFF,
0xC5, 0xC5, 0xC5, 0xFF
}

Definition at line 90 of file flash.c.