MKW30Z GATT store nonvolatile attribute

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MKW30Z GATT store nonvolatile attribute

711件の閲覧回数
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 返信

472件の閲覧回数
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