<?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>OTA - Brick prevention - Buttonless DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74994/ota---brick-prevention---buttonless-dfu</link><description>Hello, 
 For our device we are using a NRF52832 and SDK version 17.0.2. It only has one Button connected to P02. Due to needing the device to be water resistant the decision was against a possibility of changing/disconnecting the battery or a switch that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 May 2021 11:33:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74994/ota---brick-prevention---buttonless-dfu" /><item><title>RE: OTA - Brick prevention - Buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/310118?ContentTypeID=1</link><pubDate>Tue, 18 May 2021 11:33:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0394eef2-def2-414e-bafb-0774a51966ca</guid><dc:creator>Sigurd</dc:creator><description>[quote user="mrono"]How to enter the bootloader in that case?[/quote]
&lt;p&gt;This would be covered by suggestion #2, i.e. when app_error_handler is called. Note that when the device resets, it will boot the bootloader, and the bootloader will&amp;nbsp;decide&amp;nbsp;if it should enter DFU mode, or start/jump to the application.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA - Brick prevention - Buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/310097?ContentTypeID=1</link><pubDate>Tue, 18 May 2021 10:24:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2df5ab13-4cfc-4ba7-8c07-968f4360c8e5</guid><dc:creator>mrono</dc:creator><description>&lt;p&gt;Watchdog will generally save you from a stuck application. As Sigurd said, you can configure the bootloader to stay in bootloader mode after a watchdog reset.&lt;/p&gt;
&lt;p&gt;Note that your last resort case can also be handled without modifying the bootloader: You can configure the bootloader to also stay in BL-mode if a button is pressed during boot. So add to your user instructions to keep the button pressed when connecting the charging cable.&lt;/p&gt;
&lt;p&gt;A trickier case is if your application is faulty in such a way that it can&amp;#39;t enter DFU, but isn&amp;#39;t completely stuck either. How to enter the bootloader in that case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA - Brick prevention - Buttonless DFU</title><link>https://devzone.nordicsemi.com/thread/310074?ContentTypeID=1</link><pubDate>Tue, 18 May 2021 09:25:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c543453c-54ac-4fc0-9fec-f3db63b06283</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you are afraid of your application bricking the device, then here are some suggestions on how to deal with this:&lt;/p&gt;
&lt;p&gt;1) Always go into DFU mode after a watchdog-reset. Standard DFU timeout before the bootloader will start the app again is 2 min (NRF_BL_DFU_INACTIVITY_TIMEOUT_MS).&lt;br /&gt;2) For hard-faults and app-errors, you could in the error-handler enter DFU mode by setting the GPREGRET registers and call nvic_systemreset, or loop until the watchdog times out.&lt;/p&gt;
[quote user=""]We at some point managed to use TWI wrong which led to an reboot loop. We are not able to reproduce this. But how to deal with such a problem?[/quote]
&lt;p&gt;&amp;nbsp;This link might be useful:&amp;nbsp;&lt;a href="https://www.i2c-bus.org/i2c-primer/analysing-obscure-problems/blocked-bus/"&gt;https://www.i2c-bus.org/i2c-primer/analysing-obscure-problems/blocked-bus/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>