<?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>DFU exiting prematurely</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1939/dfu-exiting-prematurely</link><description>Hello, 
 I have set up my project to use the DFU bootloader to upgrade the application. When my application is running it can be sent a command from the central device to go into DFU mode. When my application receives that command it writes a 0xA5 into</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Mar 2014 14:59:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1939/dfu-exiting-prematurely" /><item><title>RE: DFU exiting prematurely</title><link>https://devzone.nordicsemi.com/thread/8328?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2014 14:59:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4d773cf-d418-4630-863c-3b00b8f94918</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Yep, it was the watchdog timer. I didn&amp;#39;t find an easy way to disable the watchdog timer in the application as there doesn&amp;#39;t seem to to a stop task or disable register. So, I added a watchdog service in the DFU&amp;#39;s wait for events loop and the DFU now stays up outside of the debugger.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU exiting prematurely</title><link>https://devzone.nordicsemi.com/thread/8327?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2014 12:56:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab6963fb-5a3b-4144-a5b1-fd29104a5ea4</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Thanks for your work and time. Your post triggered a couple of thoughts and I think I know what is going on. The fact that your experiment got me thinking about what is different when running in the debugger vs. not. One was that the watchdog timer doesn&amp;#39;t fire. In my application I set a 4 second watchdog timer. I checked the retained registers in the reference manual and the watchdog is preserved over reset. The bootloader is not servicing the watchdog so I suspect that is what is causing my DFU to exit when not in the debugger.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to do an experiment this morning disabling the watchdog before performing the reset to start the bootloader. If that works, I&amp;#39;ll mark this question as answered.&lt;/p&gt;
&lt;p&gt;Regards,
John&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU exiting prematurely</title><link>https://devzone.nordicsemi.com/thread/8326?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2014 11:09:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1582c28f-696d-4e70-afe9-36c1b2e11f5f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;
&lt;p&gt;I tested here with your bootloader and found no issue. I wrote 0xA5 to GPREGRET register and can manage to get to the bootloader and update new firmware from there.
If I leave it in DFU mode, it will stay for a minute or so before returning to the normal app.&lt;/p&gt;
&lt;p&gt;I guess there might be something wrong with the hardware, so that it reset before the timeout when advertising and early switched back  to normal application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU exiting prematurely</title><link>https://devzone.nordicsemi.com/thread/8325?ContentTypeID=1</link><pubDate>Thu, 20 Mar 2014 18:03:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51803c92-fe3d-48e6-819c-55579e0785dd</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;The bootloader is the bootloader that came with the SDK with some modifications to enter bootloader mode based on the NRF_POWER-&amp;gt;GPREGRET register. I am currently using SDS 5.2.1 with SDK 4.4.1. I plan on moving over to SDS 6.0.0 and SDK 5.1.0 when I can obtain the newer revision radio parts. I know I will have to port my changes to the bootloader that comes with the new SDK due to the pstorage feature.&lt;/p&gt;
&lt;p&gt;I have not tried the Dev kit or Ev Kit. I&amp;#39;ve given that HW to our production guy so he can make a DTM tester, but I can see if he has one he is not using. It might be interesting to reproduce this on the Dev board with debug output to the UART. I may even be able to do that on my board because we bring the UART out to a header when we are in DTM, I could initialize the UART like we are in DTM and use that header with a terminal program.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to attach the bootloader I modified so you can take a look at it. I&amp;#39;m stripping my application FW from the Zip, so there is nothing proprietary or private in there. Navigate to the &amp;quot;radio bootloader-&amp;gt;arm&amp;quot; folder to find the project file. The project does contain links to files in the 4.4.1 SDK which is not included in the zip.&lt;/p&gt;
&lt;p&gt;Thanks!
John&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/radio-bootloader.zip"&gt;radio bootloader.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU exiting prematurely</title><link>https://devzone.nordicsemi.com/thread/8324?ContentTypeID=1</link><pubDate>Thu, 20 Mar 2014 14:12:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e629faaa-5281-48af-8dd3-2d191e3c7b87</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;
&lt;p&gt;Your issue sounds a little bit strange. The bootloader that you are testing, is it our bootloader comes with the SDK or it&amp;#39;s your own bootloader ?
Do you have the same issue when testing with our Dev kit or Ev Kit ?
You can also try to use UART for logging.&lt;/p&gt;
&lt;p&gt;If it&amp;#39;s your own bootloader, please send us so that we can test here. You can upload your bootloader here or in the support portal if there is confidential matter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>