<?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>NRF52 S132 and application with custom address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80816/nrf52-s132-and-application-with-custom-address</link><description>Hi Nordic 
 I have some questions regarding switch to Application on custom address. 
 The memory layout in flash is like this: 
 0x00000000 - MBR 0x00000000 - softdevice (s132_nrf52_7.2.0) 0x00026000 - Custom bootloader 0x0002B000 - Application 1 0x00050800</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Oct 2021 18:45:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80816/nrf52-s132-and-application-with-custom-address" /><item><title>RE: NRF52 S132 and application with custom address</title><link>https://devzone.nordicsemi.com/thread/334948?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 18:45:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de119e06-6514-444c-9992-ea9c27b27ec8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The answer to both questions is &lt;em&gt;yes&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The method used to start the application from the bootloader in recent nRF5 SDK versions (&amp;gt;= 15.0.0) does not involve specifying an address, as the bootloader just branches to the SoftDevice, which in turn starts the application which must then be located immediately after. You can see how this is implemented in &amp;lt;nRF5 SDK&amp;gt;\components\libraries\bootloader\nrf_bootloader_app_start.c where the start address is always 0x1000.&lt;/p&gt;
&lt;p&gt;However, it is possible to do this differently, using any application start address, and this approach was used up to nRF5 SDK version 14.2. If you refer to the implementation of &amp;lt;nRF5 SDK 14.2&amp;gt;\components\libraries\bootloader\nrf_bootloader_app_start.c you can see that nrf_bootloader_app_start() here takes any application start address and the way it configures the MBR and SoftDevice is different. So in short you should use the approach used in SDK 14.2, which can also be used with later SDK versions.&lt;/p&gt;
&lt;p&gt;To be more specific, In SDK &amp;gt;= 15.0.0, the boot process consists of forwarding interrupts to the SoftDevice using SD_MBR_COMMAND_IRQ_FORWARD_ADDRESS_SET (nrf_dfu_mbr_irq_forward_address_set()), and then always jumping to address 0x1000 (SoftDevice start) instead of the application start address. The old approach is to use the SD_MBR_COMMAND_INIT_SD and SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET command, and start the application at a specific address. This is what you should use for a dual boot scenario when the application is not always immediately after the SoftDevice.&lt;/p&gt;
&lt;p&gt;You can compare components\libraries\bootloader\nrf_bootloader_app_start.c in SDK 14.2 and a newer SDK to see both approaches.&lt;/p&gt;
&lt;p&gt;TLDR: You need to use the approach&amp;nbsp;from components\libraries\bootloader\nrf_bootloader_app_start.c&amp;nbsp;in&amp;nbsp;SDK 14.2. With that, the application start can be anything (it does not have to start on the first page after the SoftDevice).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>