![]() |
![]() |
TI-RTOS Drivers
tidrivers_full_2_20_01_10
|
NVSCC26XX attributes. More...
#include <NVSCC26XX.h>
Data Fields | |
void * | block |
size_t | blockSize |
void * | copyBlock |
bool | isRam |
NVSCC26XX attributes.
The block is the address of a region in flash of size blockSize bytes.
For CC26XX devices, the smallest erase page size is 4KB, so in most cases, blockSize should be set to 4KB 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.
void* NVSCC26XX_HWAttrs::block |
Address of flash block to manage
size_t NVSCC26XX_HWAttrs::blockSize |
The size of block
void* NVSCC26XX_HWAttrs::copyBlock |
A RAM buffer or flash block to use for scratch when writing to the block.
bool NVSCC26XX_HWAttrs::isRam |
TRUE if copyBlock is a RAM buffer