<?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>nRF52 Delete bonds while in Bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91487/nrf52-delete-bonds-while-in-bootloader</link><description>I&amp;#39;m working on a custom board that uses an nRF52832 module. It has a single button that is used to power the device On/Off and a &amp;gt;= 5sec long press from Off to force enter the bootloader (my fail-case backup). The bootloader can also be entered by the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 Aug 2022 16:37:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91487/nrf52-delete-bonds-while-in-bootloader" /><item><title>RE: nRF52 Delete bonds while in Bootloader</title><link>https://devzone.nordicsemi.com/thread/384198?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 16:37:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:719157bb-9033-4d9b-a0ff-9c685c1cf7ca</guid><dc:creator>Zami</dc:creator><description>&lt;p&gt;&lt;span&gt;When you refer to flash configuration, are you talking about the linker flash/ram size and location configurations?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Delete bonds while in Bootloader</title><link>https://devzone.nordicsemi.com/thread/384091?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2022 10:11:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55cde571-2b77-4b6a-901b-132bbc1bebf3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Andrew,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s possible to erase bond information in the bootloader without pulling the entire peer maanger but it will be more like wipeout the whole flash storage and when the application run again it will need to re-initialize the flash database. This could be an issue if you have other data to be preserved.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So what you are doing with the&amp;nbsp;&lt;span&gt;GPREGRET2 and do the bond erasing in the application could be a better solution. One thing to take into account is that when you update a new app it should be able to use the same flash configuration (or prepare a way to re-initialize&amp;nbsp;the flash if it can&amp;#39;t re-use the original flash configuration from previous version).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Delete bonds while in Bootloader</title><link>https://devzone.nordicsemi.com/thread/384001?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2022 23:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c9bf0ef-da3b-47a1-b4c3-98ff5c4d173d</guid><dc:creator>Zami</dc:creator><description>&lt;p&gt;I suppose one way I could do this is setting a&amp;nbsp;delete-bonds-flag in GPREGRET2. Then if the app is valid it would read the flag, delete bonds, and reset GPREGRET2.&amp;nbsp; ..I&amp;#39;ll try this first but I&amp;#39;m open to more suggestions.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;EDIT: So I got it working but I had to change the bootloader behavior when the power button is pressed as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;button&amp;nbsp;pressed &amp;lt; 5sec run bootloader normally&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;button pressed &amp;gt;= 5sec set the delete-bonds flag in GPREGRET2&amp;nbsp;and let the bootloader run normally when released,&amp;nbsp;ie if valid app then it will jump to it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;button pressed &amp;gt;= 10sec&amp;nbsp;then stay in the bootloader (delete-bonds flag still set)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>