Here is my configuration:
#define gAppUseNvm_d 1 ... #if gAppUseNvm_d /* configure NVM module */ #define gNvStorageIncluded_d (1) #define gNvFragmentation_Enabled_d (1) #define gNvUseFlexNVM_d (1) #if gNvUseFlexNVM_d #define gUnmirroredFeatureSet_d (0) #else #define gUnmirroredFeatureSet_d (1) #endif #define gNvRecordsCopiedBufferSize_c (128) #endif
#define gEEPROM_DATA_SET_SIZE_CODE_c (0x33U) //#define gEEPROM_DATA_SET_SIZE_CODE_c (0x39U) /* * Name: gFLEXNVM_PARTITION_CODE_c * Description: FlexNVM partition code */ #define gFLEXNVM_PARTITION_CODE_c (0x3U)
When I enable battert level notification, Gap_CheckNotificationStatus returns gDevDbCccdNotFound_c, so it can not send notifications.
Hope you are doing well. First of all, I would recommend to check your memory Locations and Sizes. For this you can refer to section 18.104.22.168 of the Reference Manual (pages 135-138).
We have made the following test:
First, using the flexnvm example, with gEEPROM_DATA_SET_SIZE_CODE_c (0x33U) and gFLEXNVM_PARTITION_CODE_c (0x3U).
And then, running the HRS example, with the following memory configuration:
And we were able to get the Notification Status correctly:
So you need to check your memory settings and also I would recommend to use the newest SDK version.
Thank you very much for your reply! Now after I initialize eeprom, I don't use it and no problem occurs. But if I write data to the eeprom (starting from 0x14000000), I get this problem. I see that SDK seems to use NVM_RegisterDataSet to save cccd data, I wonder if it will conflict with my eeprom use here?