<?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>Application doesn&amp;#39;t work after update with DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56793/application-doesn-t-work-after-update-with-dfu</link><description>Hi! 
 SDK 16.0 
 I use secure bootloader from SDK with button. 
 1. Single app written from Segger Studio work fine. 
 2. Firmware (bootloader with app) written from script below work fine. 
 However App package (app_dfu_package.zip) updated from nrfConnect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Jan 2020 07:35:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56793/application-doesn-t-work-after-update-with-dfu" /><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/231303?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 07:35:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3881304a-acf1-4ace-b70c-8123b0180ccc</guid><dc:creator>isdv</dc:creator><description>&lt;pre&gt;&lt;code class="hljs dts"&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code class="hljs dts"&gt;&lt;span class="hljs-meta"&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="hljs dts"&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span class="hljs-meta"&gt;#&lt;span class="hljs-meta-keyword"&gt;define&lt;/span&gt; NRF_DFU_APP_DATA_AREA_SIZE 196608, solved a problem.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="hljs dts"&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code class="hljs dts"&gt;&lt;span class="hljs-meta"&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="hljs dts"&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thank you very much for your help.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;PS.&lt;/p&gt;
&lt;pre&gt;&lt;code class="hljs dts"&gt;&lt;span class="hljs-meta"&gt;NRF_DFU_APP_DATA_AREA_SIZE&lt;/span&gt;&lt;/code&gt; 0 -- Will delete all application data?&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/231233?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 16:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19347b33-1d2c-43b7-81da-c424b5f0118b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The error indicates that the flash page allocated to FDS pages have become corrupted (ie overwritten). Please make sure you have reserved the entire FDS region in your bootloader (see DFU_APP_DATA_RESERVED define - it should correspond to the number of FDS pages used by the app).&lt;/p&gt;
&lt;p&gt;&lt;a title="Memory layout" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_bootloader.html?cp=7_1_3_5_0_7#lib_bootloader_memory"&gt;Memory layout&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230982?ContentTypeID=1</link><pubDate>Sat, 25 Jan 2020 18:52:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3893df8-193e-4d0e-abcc-5a6ce4b4d5b7</guid><dc:creator>isdv</dc:creator><description>&lt;p&gt;The peer_manager application stops with an error:&lt;/p&gt;
&lt;p&gt;&amp;lt;error&amp;gt; peer_manager_pds: Could not initialize flash storage. fds_init() returned 0x860A.&lt;br /&gt;&amp;lt;error&amp;gt; peer_manager: pm_init failed because pds_init() returned NRF_ERROR_STORAGE_FULL.&lt;br /&gt;&amp;lt;error&amp;gt; app: Fatal error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230527?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 09:49:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bb299a4-8c23-47f4-9866-64d2969d49e1</guid><dc:creator>isdv</dc:creator><description>&lt;p&gt;I remove from own app code that used FDS and disable peer_manager, then app started after upload DFU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230526?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 09:47:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d2f5e87-0f83-4d02-8f03-0b547f7e83fe</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;So the simple application boots fine on first run, it was just the logging that didn&amp;#39;t work.&amp;nbsp; Can you repeat this with your actual application?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230520?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 09:27:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f044ed4b-d58b-4fd1-8677-22a6db8b604d</guid><dc:creator>isdv</dc:creator><description>&lt;p&gt;Modify example/peripheral/blinky and example/peripheral_ble/ble_app_blinky&lt;/p&gt;
&lt;p&gt;nrf_gpio_cfg_output(0);&lt;br /&gt;int on=1;&lt;br /&gt;for (;;){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on=!on;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_gpio_pin_write(0,on);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_delay_ms(500);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;This work fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230476?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2020 07:20:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cf3c24d-55a5-4ad7-b886-43c6870e298a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Are you only using logging to check if the &amp;#39;simple&amp;#39; app is running fine? The reason I ask is that RTT clients will usually fail to retrieve log messages after the transition from bootloader to application because the RTT RAM buffer holding the log data gets moved around (client must scan RAM again to find out where the buffer is located). Can you try using a LED or the UART logger backend for indication instead?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230281?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 09:49:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9561efcb-73c2-4b73-be04-81fc6b85752e</guid><dc:creator>isdv</dc:creator><description>&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp; Run fail&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: Inside main&lt;br /&gt;&amp;lt;debug&amp;gt; app: In nrf_bootloader_init&lt;br /&gt;...&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; app: Running nrf_bootloader_app_start with address: 0x00001000&lt;br /&gt;&amp;lt;debug&amp;gt; app: Disabling interrupts. NVIC-&amp;gt;ICER[0]: 0x0&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. Run fine&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: Load.&lt;br /&gt;&amp;lt;info&amp;gt; app: --&lt;br /&gt;&amp;lt;info&amp;gt; app: --&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When app run fine bootloader&amp;nbsp; don`t write log output.&lt;/p&gt;
&lt;p&gt;I don`t understand why bootloader starts without button pressed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230276?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 09:36:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac92661b-f93a-4e0c-a2a2-41b1d3c70244</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I can&amp;#39;t be the same problem if you&amp;#39;re not enabling the Softdevice. Does this simple program also fail on the first run, but run fine on the next?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230269?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 09:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:833e3273-e772-4d2d-903e-f5fe85f75dc7</guid><dc:creator>isdv</dc:creator><description>&lt;p&gt;Simple program have same problem:&lt;/p&gt;
&lt;p&gt;log_init();&lt;br /&gt;NRF_LOG_INFO(&amp;quot;Load.&amp;quot;);&lt;br /&gt;NRF_LOG_FLUSH();&lt;br /&gt;while (true) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_LOG_INFO(&amp;quot;--&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NRF_LOG_FLUSH();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrf_delay_ms(2000);&lt;br /&gt;};&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230267?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 09:23:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85e62f50-b29f-47af-ad73-03fd06829a6c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks. So the error indicates that the application is trying to access a&amp;nbsp;memory region reserved to the Softdevice (NVMC, POWER, CLOCK, RADIO,..). Can you think of anything that the application does differently on the first boot after DFU?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230239?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 08:20:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d09ddd74-bb6b-4321-84f7-69609e8e0001</guid><dc:creator>isdv</dc:creator><description>&lt;p&gt;addr2line -e fw_aac_52832_s132.elf&amp;nbsp; 0x0002656C&lt;br /&gt;./components/libraries/util/app_error_weak.c:100 (discriminator 1)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Once view error:&lt;/p&gt;
&lt;p&gt;&amp;lt;error&amp;gt; app: SOFTDEVICE: INVALID MEMORY ACCESS&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230236?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 08:03:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eff92abd-fe73-45ff-8430-d62e004c6719</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;PC:&amp;nbsp;&amp;nbsp; 0x0002656C is inside the application region, so the app did start in this case. Could you post the entire readout from &amp;quot;readregs&amp;quot;, and also if you are able to check what your application is doing at this address (with addr2line, from *.map file, or disassembly view in IDE)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230227?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 07:38:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ceb120a9-1da9-4a42-966e-872ecad50669</guid><dc:creator>isdv</dc:creator><description>&lt;p&gt;&amp;lt;info&amp;gt; app: Inside main&lt;br /&gt;&amp;lt;debug&amp;gt; app: In nrf_bootloader_init&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Using settings page.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Copying forbidden parts from backup page.&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Old settings page detected. Upgrading info.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x0007F000&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x0007F000, len=1 pages), queue usage: 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x0007F000, pending 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x0007F000, src=0x2000934C, len=896 bytes), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x0007F000, pending 0&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0x7E000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Writing settings...&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Erasing old settings at: 0x0007E000&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x0007E000, len=1 pages), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash erase success: addr=0x0007E000, pending 0&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: nrf_fstorage_write(addr=0x0007E000, src=0x200096CC, len=896 bytes), queue usage: 1&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_flash: Flash write success: addr=0x0007E000, pending 0&lt;br /&gt;&amp;lt;debug&amp;gt; app: Enter nrf_bootloader_fw_activate&lt;br /&gt;&amp;lt;info&amp;gt; app: No firmware to activate.&lt;br /&gt;&amp;lt;debug&amp;gt; app: App is valid&lt;br /&gt;&amp;lt;info&amp;gt; nrf_dfu_settings: Backing up settings page to address 0x7E000.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Running nrf_bootloader_app_start with address: 0x00001000&lt;br /&gt;&amp;lt;debug&amp;gt; app: Disabling interrupts. NVIC-&amp;gt;ICER[0]: 0x0&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;/opt/nrfjprog/nrfjprog --readregs&lt;/p&gt;
&lt;p&gt;PC:&amp;nbsp;&amp;nbsp; 0x0002656C&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Next problem founded:&lt;/p&gt;
&lt;p&gt;After writing firmware with DFU and first reset i got (&amp;lt;debug&amp;gt; app: Running nrf_bootloader_app_start with address: 0x00001000) and application does not running.&lt;/p&gt;
&lt;p&gt;After second reset all correct:&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: Load.&lt;br /&gt;&amp;lt;info&amp;gt; app: Load main_config.&lt;br /&gt;&amp;lt;debug&amp;gt; app: Main FDS Event: 0 received&lt;br /&gt;&amp;lt;info&amp;gt; app: FDS initialized&lt;/p&gt;
&lt;p&gt;Every&amp;nbsp; second reset not run app, but start bootloader with halt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230128?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2020 15:30:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e80df961-bd04-4631-858c-f2fdc7fb7037</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming. Have you tried to debug the application after DFU? The first thing I would check is if the program reaches main() after reset, and if not, check if the program counter (PC) register appears to get stuck at a particular address. &lt;/p&gt;
&lt;p&gt;You can run &amp;#39;nrfjprog --readregs&amp;#39; from the command line to read out the CPU registers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230117?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2020 15:07:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e856a2ea-c467-4467-89ff-f28ec3c71bfa</guid><dc:creator>isdv</dc:creator><description>&lt;p&gt;Transfer comes to an end successfully.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;sdk_config.h&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;#ifndef NRF_DFU_APP_ACCEPT_SAME_VERSION&lt;br /&gt;#define NRF_DFU_APP_ACCEPT_SAME_VERSION 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application doesn't work after update with DFU</title><link>https://devzone.nordicsemi.com/thread/230063?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2020 12:35:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec6bb624-c5e7-42b4-9597-8ef2f34fcc76</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Does the the application update fail at the beginning of the transfer (around 0%)? That would indicate the the pre-validation check is failing (version and signature checks). I suggest you try to bump $(APP_VERSION) when you create the package as &amp;quot;downgrade prevention&amp;quot; is enabled by default. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>