<?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>nRF52532 can&amp;#39;t quit ota mode if ble disconnect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51335/nrf52532-can-t-quit-ota-mode-if-ble-disconnect</link><description>hi: 
 when device is in ota mode, app quits abnormly, we find device will in OTA forever; 
 There is 2 versions, A and B, A can quit ,but B can&amp;#39;t, B just adds one function, OTA of B is same as A&amp;#39;s; 
 Thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Aug 2019 09:02:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51335/nrf52532-can-t-quit-ota-mode-if-ble-disconnect" /><item><title>RE: nRF52532 can't quit ota mode if ble disconnect</title><link>https://devzone.nordicsemi.com/thread/205813?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 09:02:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efcb66dd-cb34-4510-be4e-2e550acda000</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Since the application is deleted there is no application to start, so the only option for the bootloader is to stay in DFU mode. The only way to prevent this from happening is by using dual bank upgrades. If so, the new application would have to fit between the end of the old application and the beginning of the bootloader, or even lower if you use FDS or other application data in flash below the bootloader (see &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/lib_bootloader.html?cp=5_5_7_3_5_0_1#lib_bootloader_memory"&gt;memory layout&lt;/a&gt;).&amp;nbsp;Since that is not being done I assume there is not enough free space to do a dual bank application upgrade? If there is no free space then you have to live with the fact that the app stays in DFU mode until a successful upgrade, or alternatively see if you are able to make the application smaller to make it fit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52532 can't quit ota mode if ble disconnect</title><link>https://devzone.nordicsemi.com/thread/205805?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 08:53:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3c4e8c5-c509-41f4-a915-a559e93a22a6</guid><dc:creator>visionwang</dc:creator><description>&lt;p&gt;After using &lt;span&gt;&amp;quot;nrfjprog.exe --memrd 0 --n 0x80000 &amp;gt; flash_dump.txt&amp;quot;, I find that part of the application is&amp;nbsp; erased in DFU process;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How should I do to fixed it;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52532 can't quit ota mode if ble disconnect</title><link>https://devzone.nordicsemi.com/thread/205801?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 08:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06ad4f60-0344-4067-bb0a-33fa5161592d</guid><dc:creator>visionwang</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;nbsp;Hi,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SDK version is v12.3,&amp;nbsp;&amp;nbsp;and SoftDevice version is v3.0;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I mean&amp;nbsp;&amp;nbsp;the OTA process is interrupted in the middle of the upgrade, bootloader stays in DFU mode;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Why the OTA&amp;nbsp; process is interrupted in the middle of the upgrade&amp;nbsp; is because the phone disconnects. If there is no application in flash , could&amp;nbsp; timeout still work?&amp;nbsp; Timeout will restart device, but there is no application, will bootloader stay in DFU mode?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52532 can't quit ota mode if ble disconnect</title><link>https://devzone.nordicsemi.com/thread/205783?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 08:15:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cacf4ef-45c8-49de-9ce4-8e5f5264eb5d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which SDK and SoftDevice version are you using?&lt;/p&gt;
[quote user=""]&amp;nbsp; when device is in ota mode, app quits abnormly, we find device will in OTA forever;[/quote]
&lt;p&gt;I am not sure I understood the question correctly. Do you mean that the OTA process is interrupted in the middle of the upgrade? If so, then there are a few things that could be happening:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you use a single bank update of the application, then the application will be erased at the start of the DFU process. So in that case, there is no application to start and the bootloader will always enter and stay in DFU mode until a valid application is transferred via DFU. Is the application upgraded via a single bank or dual bank? (recent SDK versions will automatically use dual bank if there is room for it, if not single bank). You can check the state of the device by reading out the flash content using for instance &amp;quot;nrfjprog.exe --memrd 0 --n 0x80000 &amp;gt; flash_dump.txt&amp;quot;. This will show you if the application is present or not.&lt;/li&gt;
&lt;li&gt;If the phone disconnects somewhere in the DFU process, the bootloader might be stuck there. This should not happen with recent SDK versions though, as there is a timeout.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Or does the problem happen after successfully programming the application via DFU? If so, then a typical reason is if your new code writes to flash, and this flash is within the part of the application that the bootloader checks the CRC of (to see if the application has been corrupted for some reason). If so, the bootloader will enter DFU upgrade mode.&lt;/p&gt;
&lt;p&gt;In either of the two cases using RTT logging in the bootloader is always a good idea, as it will most of the time tell you why the bootloader stays in DFU mode instead of starting the application. Note that you must use the debug bootloader project for this.&lt;/p&gt;
[quote user=""] There is 2 versions, A and B, A can quit ,but B can&amp;#39;t,&amp;nbsp; B just adds one function, OTA of&amp;nbsp; B is same as A&amp;#39;s;[/quote]
&lt;p&gt;Can you elaborate?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>