Part Number: CC2642R
Other Parts Discussed in Thread: SYSCONFIG
Hi everone,
I'm using NVS to write and read some data in the flash memory and I use simple_peripheral_oad_offchip_CC26X2R1_LAUNCHXL_tirtos_ccs project.
I have found the regionAttrs.regionBase is 0xFFFFFFFF, regionAttrs.sectorSize is 0x00001000, regionAttrs.regionSize is 0x00200000. These values doesn't match with the following syscfg.
My syscfg:

ti_drivers_config.c:
#if defined(__TI_COMPILER_VERSION__) || defined(__clang__)
static char flashBuf0[0x4000] __attribute__ ((retain, noinit, location(0x48000)));
static char flashBuf1[0x4000] __attribute__ ((retain, noinit, location(0x52000)));
#elif defined(__IAR_SYSTEMS_ICC__)
__no_init static char flashBuf0[0x4000] @ 0x48000;
__no_init static char flashBuf1[0x4000] @ 0x52000;
#elif defined(__GNUC__)
__attribute__ ((section (".nvs")))
static char flashBuf0[0x4000];
__attribute__ ((section (".nvs")))
static char flashBuf1[0x4000];
#endif
NVSCC26XX_Object nvsCC26XXObjects[2];
static const NVSCC26XX_HWAttrs nvsCC26XXHWAttrs[2] = {
/* CONFIG_NVSINTERNAL */
{
.regionBase = (void *) flashBuf0,
.regionSize = 0x4000
},
/* CONFIG_NVS_0 */
{
.regionBase = (void *) flashBuf1,
.regionSize = 0x4000
},
};
#include <ti/drivers/nvs/NVSSPI25X.h>
/*
* NVSSPI25X External NVS flash region definitions
*/
/*
* Provide write verification buffer whose size is
* the largest specified Verification Buffer Size
*/
static uint8_t verifyBuf[64];
NVSSPI25X_Object nvsSPI25XObjects[1];
static const NVSSPI25X_HWAttrs nvsSPI25XHWAttrs[1] = {
/* CONFIG_NVSEXTERNAL */
{
.regionBaseOffset = 0x0,
.regionSize = 0x200000,
.sectorSize = 0x1000,
.verifyBuf = verifyBuf,
.verifyBufSize = 64,
/* NVS opens SPI */
.spiHandle = NULL,
/* SPI driver index */
.spiIndex = CONFIG_SPI_0,
.spiBitRate = 4000000,
/* GPIO driver pin index */
.spiCsnGpioIndex = CONFIG_GPIO_0,
.statusPollDelayUs = 100
},
};
#define CONFIG_NVS_COUNT 3
const NVS_Config NVS_config[CONFIG_NVS_COUNT] = {
/* CONFIG_NVSINTERNAL */
{
.fxnTablePtr = &NVSCC26XX_fxnTable,
.object = &nvsCC26XXObjects[0],
.hwAttrs = &nvsCC26XXHWAttrs[0],
},
/* CONFIG_NVS_0 */
{
.fxnTablePtr = &NVSCC26XX_fxnTable,
.object = &nvsCC26XXObjects[1],
.hwAttrs = &nvsCC26XXHWAttrs[1],
},
/* CONFIG_NVSEXTERNAL */
{
.fxnTablePtr = &NVSSPI25X_fxnTable,
.object = &nvsSPI25XObjects[0],
.hwAttrs = &nvsSPI25XHWAttrs[0],
},
};
const uint_least8_t CONFIG_NVSINTERNAL_CONST = CONFIG_NVSINTERNAL;
const uint_least8_t CONFIG_NVSEXTERNAL_CONST = CONFIG_NVSEXTERNAL;
const uint_least8_t CONFIG_NVS_0_CONST = CONFIG_NVS_0;
const uint_least8_t NVS_count = CONFIG_NVS_COUNT;
I'm a beginner with TI-RTOS. Could someone helps me?
Thanks a lot.

