<?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>App-based DFU, changing bank#1 address?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104653/app-based-dfu-changing-bank-1-address</link><description>nRF52840, nRFSDK v17.0.2, SD140 v7.2.0 
 I asked and learned that the ` NRF_BL_DFU_ALLOW_UPDATE_FROM_APP` configuration flag enables bootloader code to look at bank1 in the settings page, and update from there. 
 
 Now I&amp;#39;m curious: what is the best way</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Oct 2023 13:19:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104653/app-based-dfu-changing-bank-1-address" /><item><title>RE: App-based DFU, changing bank#1 address?</title><link>https://devzone.nordicsemi.com/thread/450317?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2023 13:19:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce09a1a7-7879-4eb9-a10d-9105ea15ef44</guid><dc:creator>charles_fi</dc:creator><description>&lt;p&gt;Thanks Vidar for the quick and helpful answer!&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Charles&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App-based DFU, changing bank#1 address?</title><link>https://devzone.nordicsemi.com/thread/450259?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2023 10:43:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf9543b2-9b0b-4547-af74-ef95db8abe47</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello &lt;span&gt;Charles&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;The address for bank 1 is not fixed. Instead, it adjusts automatically based on the size of the current Softdevice and application. You can use the nrf_dfu_bank1_start_addr() function found in nrf_dfu_utils.c to retrieve the address.&lt;/p&gt;
[quote user=""]But, we see that the bootloader protects the settings page.[/quote]
&lt;p&gt;The settings page is only partially protected when you build the bootloader with `NRF_BL_DFU_ALLOW_UPDATE_FROM_APP`. The application will have write access to the following elements of the settings structure:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1697192873851v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And the application must store the init command (i.e. the *.dat file) to .init_command. The bootloader will use the init command stored here to finalize the update.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>