Data Fields
NVSRAM_HWAttrs Struct Reference

NVSRAM Hardware Attributes. More...

#include <NVSRAM.h>

Data Fields

void * regionBase
 
size_t regionSize
 
size_t sectorSize
 

Detailed Description

NVSRAM Hardware Attributes.

The 'sectorSize' is the minimal amount of data to that is cleared on an erase operation. Devices which feature internal FLASH memory usually have a 4096 byte sector size (refer to device specific documentation). It is recommended that the 'sectorSize' used match the FLASH memory sector size.

The 'regionBase' field must point to the base address of the region to be managed. It is also required that the region be aligned on a sectorSize boundary (example below to demonstrate how to do this).

The 'regionSize' must be an integer multiple of the 'sectorSize'.

Defining and reserving RAM memory regions can be done entirely within the ti_drivers_config.c file.

The example below defines a char array, 'ramBuf' and uses compiler pragmas to place 'ramBuf' at an aligned address within RAM.

#define SECTORSIZE (4096)
static char ramBuf[SECTORSIZE * 4] __attribute__ ((aligned (4096)));
NVSRAM_HWAttrs NVSRAMHWAttrs[1] = {
{
.regionBase = (void *) ramBuf,
.regionSize = SECTORSIZE * 4,
.sectorSize = SECTORSIZE
}
};

Field Documentation

§ regionBase

void* NVSRAM_HWAttrs::regionBase

Base address of RAM region

§ regionSize

size_t NVSRAM_HWAttrs::regionSize

The size of the region in bytes

§ sectorSize

size_t NVSRAM_HWAttrs::sectorSize

Sector size in bytes


The documentation for this struct was generated from the following file:
© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale