This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2642R: osal snv存储数据疑问

Part Number: CC2642R
Other Parts Discussed in Thread: UNIFLASH

请教一下:

1、如果在.syscfg里配置NVS成1page或2page,那么,SNV_ID最后一个ID,对应flash的绝对位置是不是不一样?

2、如果前面那些ID没有使用,只使用最后一个ID,是不是数据也被存储在NVS划分的flash最前面呢?

3、用ccs下载程序,或者用Flash Programmer 2或UniFlash 7.0.0烧录程序,那么,不管旧板还是新板,都会先全芯片擦除,对吗?这样的话,程序首次上电运行的时候去读SNV_ID,读得的值应该是0xff,对吗?为何我读出的是0x00呢?

#define OTA_SNV_ID       0x11f

Task_sleep(900000);
osal_snv_read(OTA_SNV_ID,0x02,ValidSign.bytes);
PRINTF( "ValidSign.bytes[0]=%d\n",ValidSign.bytes[0]);
PRINTF("ValidSign.bytes[1]=%d\n",ValidSign.bytes[1]);
if(ValidSign.word[0]==0xffff)
{//first power up
...
}

打印结果是ValidSign.bytes[0]=0
ValidSign.bytes[1]=0

不知道哪里搞错了