0

Most efficient/smart way of persisting characteristic values on nRF52

muhammadakram.karimi gravatar image

asked 2017-02-16 13:29:37 +0200

Hello, Can anyone help me figuring out the best possible way to store certain characteristics which I want to never reset values on the events of controller RESET or power cycle (OFF/ON). The only way to reset those characteristics must be through flash (firmware) programming.

I am looking into Flash Data Storage (FDS) and App context (having support in Device Manager). Can anyone tell me what's the difference between these and which one will be better in my case. Please note that I am using Peer Manager instead of Device Manager on my nRF52 device. I am also worried about maximum flash write endurance (may be 20k times) and power consumption. Please address these issues in your answer as well.

Also, do I need to save the bonded device info for using App context? What if I delete the bond every time I disconnect (I am doing this so that nRF52 asks for passkey every time a connection is made no matter if the device was previously bonded or not).

Looking for your expert opinion. Thanks

edit retag flag offensive close delete report spam

1 answer

Sort by ยป oldest newest most voted
0
Petter gravatar image

answered 2017-02-17 11:48:49 +0200

If you are using Peer Manager you are already using FDS (and Fstorage), so I would recommend to only use this. Device Manager uses Pstorage which could conflict with Fstorage.

There are some threads in here on how to use FDS to store application data. I would just update the data in flash every time a characteristic value is written to, and then every time the device starts up set the characteristic values with sd_ble_gatts_value_set().

FDS implements wear leveling, so the flash endurance shouldn't be a problem, this if course depends on how many writes we are talking about here.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2017-02-16 13:29:37 +0200

Seen: 89 times

Last updated: Feb 17