MKW30Z GATT store nonvolatile attribute

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MKW30Z GATT store nonvolatile attribute

666 次查看
lucianfiran
Contributor V

KW40Z_Connectivity_Software_1.0.1 (KSDK_1.3.0) IAR 7.5

For my current application I need to store (with some wear and tear mechanism)

the state of an RGB lamp set from a GATT profile attribute.

The function  GattDb_WriteAttribute can be use to store in NVMemory an attribute ?

This define is related to this attribute storage ?

ble_constants.h

/*! Number of bytes reserved for storing application-specific information about a device */
#define gcReservedFlashSizeForCustomInformation_c (50)

Thank you,

Lucian

标签 (1)
标记 (4)
1 回复

427 次查看
santiago_lopez
NXP Employee
NXP Employee

Hi Lucian,

 

In the Connectivity Software, attributes are stored in RAM so they can be modified at application time. Initially, the value of these attributes are loaded with the values you specified in the gatt_db file, but you can also initialize them with a different value when the service is started.

 

On POR or exit of any low power mode that does not retain RAM, any value previously written to these attributes is lost. In order to keep them you will need to reserve a section of FLASH and backup the attribute values there.

 

The Connectivity Framework Reference Manual (CONNFWKRM) in the section 3.5 has information on the Flash Management that includes some APIs to store/get data in FLASH.

 

Saludos

 

Santiago