SimpleLink MCU SDK Driver APIs
tidrivers_msp43x_3_01_01_03
|
NVSMSP432 attributes. More...
#include <NVSMSP432.h>
Data Fields | |
void * | block |
size_t | blockSize |
void * | copyBlock |
bool | isRam |
NVSMSP432 attributes.
The block is the address of a region in flash of size blockSize bytes.
For MSP432 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* NVSMSP432_HWAttrs::block |
Address of flash block to manage
size_t NVSMSP432_HWAttrs::blockSize |
The size of block
void* NVSMSP432_HWAttrs::copyBlock |
A RAM buffer or flash block to use for scratch when writing to the block.
bool NVSMSP432_HWAttrs::isRam |
TRUE if copyBlock is a RAM buffer