Vikrant More <vikrant8051@...>
toggle quoted messageShow quoted text
Thanks for clarification & providing other additional important details.
I think, Local sequence no. (for sender) & RPL (for receiver ) both are same for flash in terms of write cycle. Ultimately this gonna headache in #BluetoothMesh implementation. :)
On Feb 16, 2018 11:13 PM, "Johan Hedberg" <johan.hedberg@...
On Fri, Feb 16, 2018, Vikrant More wrote:
> SoC like nRF52840 supports only 10k write cycles.
> Is that means, saving sequence no. as soon as NODE receives message,
Do you mean "sends" and not "receives"? The local sequence number is
updated whenever you send a message. It's the RPL that's updated when
you receive a message. Or are you talking about the RPL?
> on flash could corrupt it after 500 days if it receives 20 messages
> per day from same source address ?
That only holds true if you don't do any wear leveling. And even with
wear leveling it would be a quite suboptimal implementation of sequence
number persitency. A more optimal solution is to update the sequence
number in flash e.g. only for every 100th message, and then add 100 to
the stored value when you boot up. More advanced products might not
store the sequence number actively in flash at all, but instead have a
"backup" capacitor that has enough energy to write the current sequence
number to flash when the main power is lost.
If you were referring to the RPL rather than the local sequence number,
then similar approaches could be used for that as well.