TI-RTOS Drivers  tidrivers_full_2_20_00_08
Data Fields
NVSTiva_HWAttrs Struct Reference

NVSTiva attributes. More...

#include <NVSTiva.h>

Data Fields

void * block
 
size_t blockSize
 
void * copyBlock
 
bool isRam
 

Detailed Description

NVSTiva attributes.

The block is the address of a region in flash of size blockSize bytes.

For TM4C129x devices, the smallest erase page size is 16KB, so in most cases, blockSize should be set to 16KB for this device. If the blockSize is less than the page size, care should be taken not to use the rest of the page. A write to the block will cause the entire page to be erased! A blockSize greater than the page size is not supported. The page size for the device can be obtained through NVS_getAttrs().

When the block is written to, a scratch region is needed to preserve the unmodified data in the block. This scratch region, referred to as copyBlock, can be a page in flash or a buffer in RAM. The application can set copyBlock in the HWAttrs directly, if it is known at compile time, or set copyBlock through NVS_control(), for example, if it is allocated on the heap. The copyBlock can be shared accross multiple NVS instances. It is up to the application to ensure that copyBlock is set before the first call to NVS_write(). Using a blockSize less than the page size decreases RAM or heap only if copyBlock is not in flash.

Field Documentation

void* NVSTiva_HWAttrs::block

Address of flash block to manage

size_t NVSTiva_HWAttrs::blockSize

The size of block

void* NVSTiva_HWAttrs::copyBlock

A RAM buffer or flash block to use for scratch when writing to the block.

bool NVSTiva_HWAttrs::isRam

TRUE if copyBlock is a RAM buffer


The documentation for this struct was generated from the following file:
Copyright 2016, Texas Instruments Incorporated