<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>very rare lost of bonding infos</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72182/very-rare-lost-of-bonding-infos</link><description>To the kind attention of Nordic support team, 
 we are experiencing a very random and rare loosing of existing ble bonding infos (device side). So that to reconnect to the host we have to redo 
 a bonding. I&amp;#39;m suspecting that fds get full, a bonding update</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Mar 2021 09:54:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72182/very-rare-lost-of-bonding-infos" /><item><title>RE: very rare lost of bonding infos</title><link>https://devzone.nordicsemi.com/thread/300049?ContentTypeID=1</link><pubDate>Tue, 16 Mar 2021 09:54:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ead7d452-05ef-453c-b876-739258cf6e4e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Stelly,&lt;/p&gt;
[quote user="astella"]flash memory that is storing FDS_PAGE_TAG_MAGIC after fds init was corrupted&amp;nbsp;[/quote]
&lt;p&gt;Do you also see the &lt;a title="Page tag" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_fds_format.html?cp=7_1_3_16_2_1#lib_fds_format_page"&gt;Page tag&lt;/a&gt; with&amp;nbsp;&lt;span&gt;FDS_PAGE_DATA and FDS_PAGE_SWAP?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="astella"]I focused on&amp;nbsp;FDS_PAGE_TAG_MAGIC&amp;nbsp;only; debugging page_identify routine in fds.c I saw that p_page_addr[FDS_PAGE_TAG_WORD_0] was not FDS_PAGE_TAG_MAGIC anymore for each of the three pages we assigned to fds[/quote]
&lt;p&gt;Do you get the&amp;nbsp;FDS_PAGE_UNDEFINED error?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="astella"]May you please theoretically explain what does it mean &amp;quot;missing the swap page&amp;quot;. How to use swap page appropriately?[/quote]
&lt;p&gt;&lt;span&gt;Each virtual page that is used by FDS is marked with a &lt;a title="Page tag" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_fds_format.html?cp=7_1_3_16_2_1#lib_fds_format_page"&gt;Page tag&lt;/a&gt; that is used by the system to store information about the page. If&amp;nbsp;&lt;/span&gt;&lt;span&gt;fds_init return the NO_SWAP error to indicate that like this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67746/fds-no-swap-page"&gt;case&lt;/a&gt;. Do you get any error code from&amp;nbsp;fds_init or peer_manager_init?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Are you able to add DEBUG into processor&amp;nbsp;definitions (build with Debug), enable&amp;nbsp;PM_LOG_LEVEL and modify&amp;nbsp;PM_LOG_LEVEL 4 (debug) and provid the log?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you tried to use SDK17.0.2? There have been some FDS patches in the later SDKs. Try that, and see if it can fix the issue or not.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: very rare lost of bonding infos</title><link>https://devzone.nordicsemi.com/thread/299433?ContentTypeID=1</link><pubDate>Fri, 12 Mar 2021 10:15:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c13d6e4a-364d-4227-a11e-74abdd131903</guid><dc:creator>astella</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Amanda thank you very much for your suggestions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-- Is FDS_PAGE_TAG_MAGIC missing?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes flash memory that is storing FDS_PAGE_TAG_MAGIC after fds init was corrupted&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-- Not the&amp;nbsp;FDS_PAGE_SWAP (missing swap page)?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m not sure about this, or what kind of extra care or init it needs so to use appropriately the swap page . I focused on&amp;nbsp;FDS_PAGE_TAG_MAGIC&amp;nbsp;only; debugging page_identify routine in fds.c I saw that p_page_addr[FDS_PAGE_TAG_WORD_0] was not FDS_PAGE_TAG_MAGIC anymore for each of the three pages we assigned to fds&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Did you use FDS before adding the peer manager?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m aware that if I&amp;#39;m initializing fds before calling a complete init using the peer manager (peer_manager_init&amp;nbsp;), this action can then modify or delete pre-existing flash data, so to accommodate&amp;nbsp;a new set of meta data.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-What SDK are you using? 16&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And is FDS working apart from the peer manager? We are basically using&amp;nbsp;peer_manager_init as our application is using ble. And calling test write routines after that init&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My guess is just that the flash is full, or you have run into a bug where you are missing the swap page in the FDS. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;- it seems interesting. May you please theoretically explain what does it mean &amp;quot;missing the swap page&amp;quot;. How to use swap page appropriately?&lt;/p&gt;
&lt;p&gt;But as I said I think could be normal from my point of view: we were just calling writing routines and just stressing the device switching it on and off randomly. You are claiming that with the right usage of fds, this kind of corruption shouldn&amp;#39;t be possible?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: very rare lost of bonding infos</title><link>https://devzone.nordicsemi.com/thread/299157?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 07:08:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2009a912-ddf4-4115-bd9f-c660d6ae4097</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Stelly,&amp;nbsp;&lt;/p&gt;
[quote user="astella"]As we found debugging the FDS_PAGE_TAG_MAGIC was missing[/quote]
&lt;p&gt;Is FDS_PAGE_TAG_MAGIC missing? Not the&amp;nbsp;FDS_PAGE_SWAP (missing swap page)? Did you use FDS before adding the peer manager? What SDK are you using? And is FDS working apart from the peer manager? My guess is just that the flash is full, or you have run into a bug where you are missing the swap page in the FDS. What function that return FDS_PAGE_TAG_MAGIC?&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
[quote user="astella"]I&amp;#39;d like to ask if after the initial bonding, flash ble infos ever require some sort of update. And, should it be the case, what kind of updates? What are the ble circumstances that may lead to update ble bond infos (if any). [/quote]
&lt;p&gt;When reconnecting to the bonded peer, you might get PM event like PM_EVT_CONN_SEC_SUCCEEDED and&amp;nbsp;&lt;span&gt;PM_EVT_PEER_DATA_UPDATE_SUCCEEDED. See my colleague&amp;#39;s answer in this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/56910/getting-multiple-pm_evt_peer_data_update_succeeded-events/230592#230592"&gt;post&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;If you call &lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__pm__handler.html#gaaf263143208cbe51498bc11dd61bd977"&gt;pm_handler_pm_evt_log&lt;/a&gt;()&lt;/span&gt;&lt;span style="font-family:inherit;"&gt; in the peer_manager_handler.c and&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;enable&amp;nbsp;&lt;/span&gt;&lt;a style="font-family:inherit;" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__log__config.html#ga70c66e0ad642e63bdd3c4e5b88c47387"&gt;PM_LOG_ENABLED&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;&amp;nbsp;in the sdk_config.h, you might see what is updated from the log.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: very rare lost of bonding infos</title><link>https://devzone.nordicsemi.com/thread/297619?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 18:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9efa9bd6-afa9-4e37-96f2-0e17f3014e3e</guid><dc:creator>astella</dc:creator><description>&lt;p&gt;Thank you very much Amanda for your kind reply. I&amp;#39;ll update this thread in case we find something interesting/useful about the topic. Right now we did some experiments using fds and stressing its routines, and I can confirm that flash corruption may very well obviously occur in case of power failures. As we found debugging the FDS_PAGE_TAG_MAGIC was missing (exactly like in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/29770/peer-manager-initialisation-error"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/29770/peer-manager-initialisation-error&lt;/a&gt;). In this case we want to redo this kind of experiments after activating pof comparator to see if we can experience an improvement (&lt;a title="https://infocenter.nordicsemi.com/pdf/nrf52833_ps_v1.3.pdf" href="https://infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.3.pdf" rel="noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.3.pdf&lt;/a&gt;&amp;nbsp;4.3.7 is talking about NVMC power failure protection in combination with Vpof threshold)&lt;/p&gt;
&lt;p&gt;Anyway, hope to come back in days if we find anything useful about the ble related problem. And if it could be related to fds usage. Maybe, if it is not much trouble, I&amp;#39;d like to ask if after the initial bonding, flash ble infos ever require some sort of update. And, should it be the case, what kind of updates? What are the ble circumstances that may lead to update ble bond infos (if any). I&amp;#39;d like to understand this point in the first place. Thank you very much, best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: very rare lost of bonding infos</title><link>https://devzone.nordicsemi.com/thread/297205?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 13:40:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15e7b41f-9cf8-4863-a4fd-48f85bd8275c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Stella,&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;p&gt; I&amp;#39;m suspecting that fds get full, a bonding update is failing and this is causing this very rare issue. And that is what I&amp;#39;m going to monitor. I only I&amp;#39;d like to know if it is plausible? I mean, it can happen that bonding infos of an existing bonding sometime needs to be updated in flash and this is prone to fail if fds hasn&amp;#39;t got room anymore?&lt;/p&gt;[/quote]
&lt;p&gt;&lt;span&gt;Peer Manager uses FDS to&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_pm_usage.html#lib_pm_usage_data"&gt;store bonding data to flash&lt;/a&gt;&lt;span&gt;. If there is no more space to store bonding data in the pages allocated to FDS, the peer manager will try to delete the oldest bonded peer(s). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;#39;s hard to say what is the issue without the log. Are you able to provide the completed debug log? Does it indicate that &amp;quot;Flash storage is full&amp;quot;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>