Where CyBle_StoreBondingData function stores the bonding data ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JoAl_1333936
Level 1
Level 1

Hi,

I'm checking the datasheet, BLE_v3_30.pdf . And I can't find anywhere where the bonding data is stored after calling the CyBle_StoreBondingData function.

Is there anyone who can help me?

Tks

Jordi

0 Likes
1 Solution

Hello,

Bonding data will be stored in the Flash memory.
Yes, bonding data is placed in the checksum excluded area of the flash memory.
Struct CY_BLE_FLASH_STORAGE will give information about stack internal bonding data, number of bonded devices.

Please refer the Structure in the BLE component datasheet.

struct CY_BLE_FLASH_STORAGE
Data Fields
• uint8 stackFlashptr [((0x09u+(0x9Cu *0x04u)))]
• uint8 attValuesCCCDFlashMemory [0x04u+1u][(1u)]
• uint8 cccdCount
• uint8 boundedDevCount

Thanks,
P Yugandhar.

View solution in original post

0 Likes
5 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello Jordi,

CyBle_StoreBondingData function writes the new bonding data from RAM to the dedicated Flash location. It performs data comparing between RAM and Flash before writing to Flash. If there is no change between RAM and Flash data, then no write is performed.

Please refer the API CyBle_StoreBondingData (uint8 isForceWrite) in the datasheet.

Thanks,

P Yugandhar.

0 Likes

Hello P Yugandhar

Thank you for the answer.

What I can't find in the API is in what memory location this information is stored. I need to combine in the same project an over the air bootloader  with store bonding data. And I would like to be able to keep the data after a software update.

Where is the BLE-bonding information stored in Flash ?

Thanks

Jordi

0 Likes

There is a flash area named system flash (SFlash) which can only be written with system APIs. Have a look into the "System Reference Guide" from Creator help menu.

Bob

0 Likes

Hi  Bob

So, the bonding data is stored in the sflash? Is that correct?

The fact is, I'm a little confused. The BLE Updgradable Stack Example Projects 1.2 document states that :

To prevent changing the checksum of the application code, bonding data is placed in the checksum excluded area of the flash memory (named "Stack project" and "Application project" data sections in Figure 2. Flash Memory Structure).

Therefore I understand that it is part of the Checksum excluding section

Could you clarify this point, please? Is there any document that clearly tells where the bonding information is stored?

Thanks

Jordi

0 Likes

Hello,

Bonding data will be stored in the Flash memory.
Yes, bonding data is placed in the checksum excluded area of the flash memory.
Struct CY_BLE_FLASH_STORAGE will give information about stack internal bonding data, number of bonded devices.

Please refer the Structure in the BLE component datasheet.

struct CY_BLE_FLASH_STORAGE
Data Fields
• uint8 stackFlashptr [((0x09u+(0x9Cu *0x04u)))]
• uint8 attValuesCCCDFlashMemory [0x04u+1u][(1u)]
• uint8 cccdCount
• uint8 boundedDevCount

Thanks,
P Yugandhar.

0 Likes