<?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>Power off while writing pairing information</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100448/power-off-while-writing-pairing-information</link><description>Dear Support, 
 
 We received a strange question from our quality assurance department. I&amp;#39;m sorry, but please tell me. 
 What happens to the pairing information on the Nrf52840 if it is powered off while the pairing information is being stored in NVRAM</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Jun 2023 10:30:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100448/power-off-while-writing-pairing-information" /><item><title>RE: Power off while writing pairing information</title><link>https://devzone.nordicsemi.com/thread/429239?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2023 10:30:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fa152e4-c5a8-4293-9aca-6aad1f5be414</guid><dc:creator>toshi.g</dc:creator><description>&lt;p&gt;This answer is fine.&lt;br /&gt;Thank you for your answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power off while writing pairing information</title><link>https://devzone.nordicsemi.com/thread/429219?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2023 09:19:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2122031d-46f8-4cec-ac58-7b0a833f0c08</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Toshifumi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are using nRF5 SDK, it&amp;#39;s most likely that you use peer_manager module to handle bonding. The peer_manager module uses FDS as the flash backend to handle writing and erasing bond information.&amp;nbsp;&lt;br /&gt;In the documentation for FDS you can find this record format:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_fds_format.html?cp=9_1_3_16_2_0#lib_fds_format_data"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_fds_format.html?cp=9_1_3_16_2_0#lib_fds_format_data&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="height:362px;max-height:362px;max-width:504px;" height="362" src="https://devzone.nordicsemi.com/resized-image/__size/1008x724/__key/communityserver-discussions-components-files/4/pastedimage1685956667074v1.png" width="503" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So each record would have a record key and CRC. The record key can decide if the data is invalidated or not. And the CRC value will check if the data has been stored properly or not.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So if there is a power shortage when storing or deleting data scenario number 2 will happens.&amp;nbsp;&lt;br /&gt;Only after the records are stored with correct CRC it will be valid. So you don&amp;#39;t have to worry about corrupted data when you booting up.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power off while writing pairing information</title><link>https://devzone.nordicsemi.com/thread/429201?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2023 08:51:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c53d929-0848-4aa7-ac6c-fc7541731c23</guid><dc:creator>toshi.g</dc:creator><description>&lt;p&gt;Dear Support,&lt;/p&gt;
&lt;p&gt;I will write the requested information.&lt;/p&gt;
&lt;p&gt;firmware using on the chip ?&lt;br /&gt;　chip:nRF52840&lt;br /&gt;　softdevice:S140_nrf52_7.3.0&lt;/p&gt;
&lt;p&gt;Which SDK is used ?&lt;br /&gt;　nRF5_SDK 17.1.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power off while writing pairing information</title><link>https://devzone.nordicsemi.com/thread/429186?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2023 07:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4969d9c9-a8c3-4bad-b399-582e9eb08ecc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Toshifumi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please give us more information about the firmware using on the chip ? Which SDK is used ? Is it nRF Connect SDK or nRF5 SDK ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In most cases, there will be a flash management that handle the bond information storing and reading. If there is an interruption when storing data the data will not be validated. And the next time when the device turned on it will not read such data.&amp;nbsp;&lt;br /&gt;So in most cases, scenario number 2 will be the case.&amp;nbsp;&lt;br /&gt;Regarding deleting bond, if any part of the data has been deleted but the whole delete has not completed, the data will not be valid in the next boot (because of CRC mismatch) and the data will be considered invalid and device will not load the corrupted bond information.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>