<?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>Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63323/failed-to-start-application-after-dfu---blinky-app-repeatably-loads-fine</link><description>I continue to successfully upload the Blinkey app via DFU. However, when I attempt to upload my development app it does not start. From what I read it has successfully loaded the app. 
 I&amp;#39;m not sure I fully understand the RTT readout - Could it be related</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Aug 2020 12:07:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63323/failed-to-start-application-after-dfu---blinky-app-repeatably-loads-fine" /><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/263211?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2020 12:07:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aaa7af0-1187-433a-9782-c0db17888b98</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Peter,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I have just tested here with the nRF Connect and nRF52832 but I don&amp;#39;t see the same issue. The buttonless application switched to the bootloader in about 2-3 seconds and then the bootloader get connected right after that.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try to test doing DFU again using nRF Connect app on the phone (Android/iOS) to check if it works.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Also please try testing using stock buttonless (and stock bootloader) example.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;In stead of checking the current consumption, you can also check which firmware is running by using a &lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Sniffer"&gt;sniffer &lt;/a&gt;or using a phone to scan for BLE advertising packet.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/263078?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2020 18:51:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:769544f9-f3c4-4ff7-b5e8-141dd550e4a9</guid><dc:creator>PeterInStillwater</dc:creator><description>&lt;p&gt;The advertising interval is not what I use.&amp;nbsp; I utilize a ~ 155ms interval and I&amp;#39;m seeing ~500ms.&lt;/p&gt;
&lt;p&gt;Note that I verified I&amp;#39;m calling the same&amp;nbsp;function&amp;nbsp;&lt;span&gt;nrf_pwr_mgmt_run&lt;/span&gt;(); in a tight loop as does the button-less DFU example.&lt;/p&gt;
&lt;p&gt;I have a 1 second timer interrupt where I wake up and evaluate&amp;nbsp;the environment and act as needed, then I go to sleep (&amp;nbsp;&lt;span&gt;nrf_pwr_mgmt_run&lt;/span&gt;() ) until the next 1 second interrupt.&lt;/p&gt;
&lt;p&gt;There is no other activity going on in the application.&lt;/p&gt;
&lt;p&gt;looking at the current flow below, starting from the left - going in large blocks&lt;/p&gt;
&lt;p&gt;1) power up&lt;br /&gt;2) Initial advertising (155ms)&lt;br /&gt;3) First Solid block - is nrfConnect connecting to my device and my staring the DFU&lt;br /&gt;4) nrfConnect disconnects and the device then advertises for ~1-2 minutes @ 500ms intervals&lt;br /&gt;5) the next solid block is nrfConnect re-establishing connection&lt;br /&gt;6) the large block (about 1/4 the entire .jpg is the DFU file transfer&lt;br /&gt;7) followed by disconnect and restart of the device&lt;br /&gt;8) at the far right of the photo is the device starting up again with 155 ms advertisements.&lt;/p&gt;
&lt;p&gt;Hope this helps&lt;br /&gt;Peter&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Consolas&amp;#39;;font-size:9.0pt;font-style:normal;font-weight:normal;text-decoration:none;"&gt;
&lt;pre&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1596566760133v1.png" alt=" " /&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/262971?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2020 11:29:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65647a52-1e29-4d35-8355-bbbff6b1f828</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Peter&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you mentioned &amp;quot;&lt;span&gt;I can see that the device is advertising right after the disconnect.&amp;quot; the device advertised in application mode or in bootloader mode ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/262861?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2020 17:36:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0823f4e4-65b0-48d0-8e47-7e763916b87c</guid><dc:creator>PeterInStillwater</dc:creator><description>&lt;p&gt;Hung - I can see that the device is advertising right after the disconnect.&amp;nbsp; I did see that when I messed up a DFU my device would go directly into the DFU bootloader mode (MAC address drops by one) I would then initiate a DFU with the bootloader and it would pretty much start the transfer immediately, (FYI - the DFU is then successful and all is fine.)&lt;/p&gt;
&lt;p&gt;So - I suspect there is something in my code.&amp;nbsp; I cut and pasted the button-less DFU example into my code and made changes where needed (I think)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Where would you suggest I concentrate in my code - I suspect a DFU function.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/262721?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2020 08:37:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9d90353-6a1c-400b-8039-68c54459c244</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Peter,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Sorry&amp;nbsp;for the late response. nRF Connect disconnect with the device is normal. It&amp;#39;s when the device switch from application to DFU mode. But 2 minutes delay is high. We need to check if it was the board didn&amp;#39;t switch to the bootloader right away or it&amp;#39;s because nRF Connect didn&amp;#39;t establish a new connection.&amp;nbsp;&lt;br /&gt;You can check this by capture a sniffer trace. Or you can also use a phone to scan and check if the device is advertising as &amp;quot;DFUTarg&amp;quot; after disconnect from nRF Connect.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest to test with stock example (stock bootloader + stock buttonless application) to see if it has the same behavior.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/261840?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2020 15:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da2ccaa1-2adf-4aba-bff4-0a925fe496ca</guid><dc:creator>PeterInStillwater</dc:creator><description>&lt;p&gt;Hung - The DFU continues to work albeit with one concern.&amp;nbsp; This may be related to the &lt;span&gt;nRF&amp;nbsp;&lt;/span&gt;Connect tool and I&amp;#39;ve I had limited success finding a solution on the web.&lt;/p&gt;
&lt;p&gt;When initiating a DFU with my device via nRF Connect (Windows 10 - &lt;span&gt;nRF&amp;nbsp;&lt;/span&gt;Connect version 2.4.0 &lt;span&gt;nRF&amp;nbsp;&lt;/span&gt;Engine 3.4.1)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nRF Connect connects fine to the device and I&amp;#39;m able to select a zip file to DFU.&amp;nbsp; After selecting start DFU&amp;nbsp;nRF Connect disconnects with the device (which may be normal.)&amp;nbsp; It then takes two minutes before the transfer begins, I believe initiated&amp;nbsp;by&amp;nbsp;nRF Connect.&amp;nbsp; Looking at the current draw during this two minutes I can assume the device is idle ans possibly waiting for&amp;nbsp;nRF Connect.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Once the transfer is complete the device works as expected.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My question is where is the two minute delay coming from - is it&amp;nbsp;nRF Connect or can I modify&amp;nbsp;my code to decrease the delay?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As a side note I&amp;#39;m starting out developing a raspberry&amp;nbsp;pi 4 application to perform this task, hoping to utilize existing code samples (TBD)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As always - thank you for your assistance!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Peter&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/260086?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 09:49:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61356c1d-a680-48e2-93a9-1a87493b6ccb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Thanks Peter.&amp;nbsp;&lt;br /&gt;The --no-backup is to not overwriting the backup area of the bootloader setting. This doesn&amp;#39;t take any effect if you are testing on a blank chip with no backup setting prior.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/259999?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 21:16:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47604926-231d-4b45-b9d6-a968238e991f</guid><dc:creator>PeterInStillwater</dc:creator><description>&lt;p&gt;Hung - I hope your vacation was pleasant.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m up to speed now being able to create the setting hex file and merge with the bootloader, softdevice and application.&amp;nbsp; Note that I had to setup the nrfutil&amp;nbsp;string to read:&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Consolas&amp;#39;;font-size:9.0pt;font-style:normal;font-weight:normal;text-decoration:none;"&gt;
&lt;pre&gt;&lt;strong&gt;nrfutil settings generate --family NRF52QFAB --application AppDFUTest.hex --start-address 0x0007F000 --no-backup --application-version 0 --bootloader-version 0 --bl-settings-version 2 setting.hex&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This works and is consistent.  I don&amp;#39;t exactly understand the need for the &lt;br /&gt;component: --no-backup &lt;strong&gt;&lt;em&gt;&lt;span style="text-decoration:underline;"&gt;(you may comment on this)&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;And I needed to add --start-address &lt;span&gt;0&lt;/span&gt;x0007F000  because the default boot start address&lt;br /&gt;was not correct.&lt;br /&gt;&lt;br /&gt;Next up is incorporating the &amp;quot;buttonless&amp;quot; components into my application.&lt;br /&gt;&lt;br /&gt;Stay Tuned!!!&lt;br /&gt;&lt;br /&gt;Thanks Again,&lt;br /&gt;Peter&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/259954?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 14:30:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1aab3891-692b-44c2-ba64-16752c3a9e1d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Thanks for the tip David. It&amp;#39;s actually very useful so we don&amp;#39;t have to modify the bootloader when in development.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/259761?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2020 20:09:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4526d094-4a04-4e32-b2d3-9b6faacbd8c2</guid><dc:creator>d2sc</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I am able to flash the application to the chip along with the bootloader in Segger. To do you you need to&lt;/p&gt;
&lt;p&gt;generate a valid settings.hex and download that as well.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I used this as a reference when setting up Segger. If you want I can share some screenshots as well.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34212/howto-flash-bootloader-settings-for-dfu-using-ses-at-debug-time"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/34212/howto-flash-bootloader-settings-for-dfu-using-ses-at-debug-time&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/259710?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2020 13:49:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28866ad7-0149-4d2d-a995-c250d9e3de42</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Peter,&amp;nbsp;&lt;br /&gt;I&amp;#39;m sorry for late reply I was on vacation last week.&amp;nbsp;&lt;br /&gt;If you have the bootloader in your flash, it&amp;#39;s not possible to use Segger IDE to flash your application directly to the chip. The reason is that on every boot the bootloader will check the application&amp;#39;s firmware and compare to the CRC that it&amp;#39;s stored. If the application changes, it will stay in bootloader mode. You can only update the application via DFU.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, it&amp;#39;s possible to modify the bootloader to avoid CRC check when booting. It&amp;#39;s useful when in development phase.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/258669?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 16:41:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b488272-1242-40aa-ab8d-29eb7f994834</guid><dc:creator>PeterInStillwater</dc:creator><description>&lt;p&gt;After much trial and error.&amp;nbsp; I eventually erased the entire flash using the SEGGER IDE and&lt;/p&gt;
&lt;p&gt;THEN...&amp;nbsp; my application would run and advertise.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I found that each subsequent attempt to perform a DFU also required that I erase the entire flash through the SES IDE.&lt;/p&gt;
&lt;p&gt;I tried:&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Consolas&amp;#39;;font-size:9.0pt;font-style:normal;font-weight:normal;text-decoration:none;"&gt;
&lt;pre&gt;&lt;span style="font-family:Consolas;"&gt;&lt;span style="font-size:9pt;"&gt;nrfjprog --erasepage 0x000000-0x8000&lt;br /&gt;&lt;br /&gt;(plus various other address combinations) this did not work.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Consolas;"&gt;&lt;span style="font-size:9pt;"&gt;I suspect RAM needs to be cleared as well, as I&amp;#39;m guessing &lt;/span&gt;&lt;/span&gt;the&lt;span style="font-family:Consolas;"&gt;&lt;span style="font-size:9pt;"&gt; SES IDE clears that out too.&lt;br /&gt;&lt;br /&gt;I once again went through the blog, this time concentrating on the Advanced Features section.&lt;br /&gt;&lt;br /&gt;Peter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/258382?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 15:10:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f925c3e8-7184-4bfa-bab3-0d97ff7ef19d</guid><dc:creator>PeterInStillwater</dc:creator><description>&lt;p&gt;Hi Hung -&lt;/p&gt;
&lt;p&gt;Yes, the app uses the softdevice:&amp;nbsp;s132_nrf52_7.0.1_softdevice.hex and I&amp;#39;m using BLE DFU.&lt;/p&gt;
&lt;p&gt;Your next question is a grey area for me...&lt;/p&gt;
&lt;p&gt;Using the Blinky example, I start the nrf52DK running the&amp;nbsp;secure_bootloader_ble_s132_pca10040_debug (using Segger IDe) and then using RF Connect I upload the Blinky App via DFU.&amp;nbsp; The app is what is generated as an output hex file from Segger IDE.&amp;nbsp; It is my understanding that the hex file does not have the softdevice merged with the Blinky app.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I perform the exact same operation only this time I upload my app via BLE DFU, via RF Connect - just like Blinky.&amp;nbsp; So, from my understanding the softdevice is not merged with my app.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Peter&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to Start Application after DFU - Blinky App repeatably loads fine</title><link>https://devzone.nordicsemi.com/thread/258329?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 13:07:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:375119ad-47c3-4684-b747-134a6f40e870</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Peter,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please give more information about your application and the DFU process. Does your app use softdevice ? Do you have the softdevice flashed ? Did you do BLE DFU or UART DFU ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;If your app requires the softdevice but you haven&amp;#39;t flashed the softdevice you won&amp;#39;t be able to run the app. You need to flash the softdevice when you flash the bootloader.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>