<?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>Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68368/write-firmware-to-bank-1-from-application</link><description>Hello. 
 I would like to know if its possible to preform a firmware update from the application itself like so: 
 1. Getting the firmware via UART in chunks of 2k (from a GSM modem). 
 2. Writing each chunk to Bank1. 
 3. Reset to DFU mode that will check</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Feb 2022 11:37:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68368/write-firmware-to-bank-1-from-application" /><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/354318?ContentTypeID=1</link><pubDate>Tue, 22 Feb 2022 11:37:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea633b61-e84d-4e8f-bf04-cd8098e04313</guid><dc:creator>KrzysztofS</dc:creator><description>&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;I decided to refresh the topic, as not all problems were solved.&lt;/p&gt;
&lt;p&gt;I have custom board with &lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;NRF52832 with SD132, &lt;/span&gt;&lt;/span&gt;use SDK-16. The bootloader is standard one with BLE transport. Bootloader in dual-bank mode. Everything works properly including DFU over BLE in bootloader.&lt;/p&gt;
&lt;p&gt;My objective is very simirar to Ofer&amp;#39;s:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download new firmware by application.&lt;/li&gt;
&lt;li&gt;Burn the new application in internel flash-bank1.&lt;/li&gt;
&lt;li&gt;persuade bootlader to accept new app in bank1.&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;Restart in DFU mode.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;Bootloader is expected to copy app from bank1 to bank0 and execute new app.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;I don&amp;#39;t want to add whole DFU-transport engine to my application. I&amp;#39;ve already got a custom transport in the application for other purposes. So it was natural to use it to transfer tne app image to the device.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;The problem lays in point 3. May I get detailed guidelines? What I did is:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_dfu_settings_init (true);
dst_addr = nrf_dfu_bank1_start_addr();
nrf_dfu_flash_erase (dst_addr, pages, NULL);
//nrf_dfu_flash_store(dst_addr...) whole image 
//  verify CRC of writem image
dfu_progress_reset();
s_dfu_settings.bank_1.image_size = app_size;
s_dfu_settings.bank_1.image_crc  = app_crc;
s_dfu_settings.bank_1.bank_code = NRF_DFU_BANK_VALID_APP ;
nrf_dfu_settings_write_and_backup(NULL);
&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;Here is the first problem, because the last one says: &amp;quot;Settings write aborted since it tries writing to forbidden settings&amp;quot;. Apparently direct modification of bank_1 is firbidden?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;Even after commenting out forbidden-parts-check, the bootloader doesn&amp;#39;t reconise new application in bank1. Something is missing. Can you explain?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;Vidar, you said: &amp;quot;... &lt;em&gt;store the init data (*.dat) to the BL settings page before you reset&lt;/em&gt;&amp;quot;. Very interesting.It would be quiet powerfull. Can you give mode details? I tried writing .dat file to s_dfu_settings.init_command, but with no result. Anything else needed in s_dfu_settings?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;Regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;Krzysztof&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;PS. There&amp;#39;s been quite a few discussions on the same topic, none with useful conclusions. The problem is very popular among the public :-)&amp;nbsp; If you could provide a simple example how to burn an image in bank1 &lt;em&gt;without&lt;/em&gt; bootloader-like transport? Just copy an app from external flash to bank1? Or write arbitrary data to bank1 and make bootloader use the data as valid app? Let &lt;a href="https://github.com/jimmywong2003/nrf5-external-spi-flash-bootloader.git"&gt;https://github.com/jimmywong2003/nrf5-external-spi-flash-bootloader.git&lt;/a&gt; be a template solution.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/282446?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 12:59:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a860d3b-9077-4097-9655-d24ac3cf943a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ofer,&lt;/p&gt;
&lt;p&gt;The Softdevice will trigger the INVALID MEMORY ACCESS assert if the application tries to access either memory or peripherals that are reserved to the Softdevice (&lt;span&gt;&lt;a title="System on Chip resource requirements" href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/sd_resource_reqs/sd_resource_reqs.html?cp=4_7_3_0_6"&gt;System on Chip resource requirements&lt;/a&gt;&lt;/span&gt;). As this is occuring when you try to do flash, I assume the problem is that you try to use the NVMC directly and not through the&lt;a href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/flash_mem_api/flash_mem_api.html"&gt; SD flash API&lt;/a&gt;.&amp;nbsp; Please make sure you have selected the &lt;span&gt;&lt;a title="SoftDevice backend" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_fstorage.html?cp=7_1_3_17_5_0#lib_fstorage_sd"&gt;SoftDevice backend&lt;/a&gt;&lt;/span&gt; for fstorage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/282339?ContentTypeID=1</link><pubDate>Sat, 28 Nov 2020 12:17:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f465ae0f-4884-43af-9978-373afb0bd16e</guid><dc:creator>oferAtom</dc:creator><description>&lt;p&gt;I&amp;#39;ve added:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="xml"&gt;  &amp;lt;MemorySegment name=&amp;quot;bootloader_settings_page&amp;quot; start=&amp;quot;0x000FF000&amp;quot; size=&amp;quot;0x1000&amp;quot;&amp;gt;
	&amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;No&amp;quot; name=&amp;quot;.bootloader_settings_page&amp;quot; address_symbol=&amp;quot;__start_bootloader_settings_page&amp;quot; end_symbol=&amp;quot;__stop_bootloader_settings_page&amp;quot; start = &amp;quot;0x000FF000&amp;quot; size=&amp;quot;0x1000&amp;quot; /&amp;gt;
  &amp;lt;/MemorySegment&amp;gt;
  &amp;lt;MemorySegment name=&amp;quot;mbr_params_page&amp;quot; start=&amp;quot;0x000FE000&amp;quot; size=&amp;quot;0x1000&amp;quot;&amp;gt;
	&amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;No&amp;quot; name=&amp;quot;.mbr_params_page&amp;quot; address_symbol=&amp;quot;__start_mbr_params_page&amp;quot; end_symbol=&amp;quot;__stop_mbr_params_page&amp;quot; start = &amp;quot;0x000FE000&amp;quot; size=&amp;quot;0x1000&amp;quot; /&amp;gt;
  &amp;lt;/MemorySegment&amp;gt;
  &amp;lt;MemorySegment name=&amp;quot;ot_flash_data&amp;quot; start=&amp;quot;0xdc000&amp;quot; size=&amp;quot;0x4000&amp;quot;&amp;gt;
	&amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.ot_flash_data&amp;quot; address_symbol=&amp;quot;__start_ot_flash_data&amp;quot; end_symbol=&amp;quot;__stop_ot_flash_data&amp;quot; start = &amp;quot;0xdc000&amp;quot; size=&amp;quot;0x4000&amp;quot; /&amp;gt;
  &amp;lt;/MemorySegment&amp;gt;
  &amp;lt;MemorySegment name=&amp;quot;uicr_bootloader_start_address&amp;quot; start=&amp;quot;0x00000FF8&amp;quot; size=&amp;quot;0x4&amp;quot;&amp;gt;
	&amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.uicr_bootloader_start_address&amp;quot; address_symbol=&amp;quot;__start_uicr_bootloader_start_address&amp;quot; end_symbol=&amp;quot;__stop_uicr_bootloader_start_address&amp;quot; start = &amp;quot;0x00000FF8&amp;quot; size=&amp;quot;0x4&amp;quot; /&amp;gt;
  &amp;lt;/MemorySegment&amp;gt;
  &amp;lt;MemorySegment name=&amp;quot;uicr_mbr_params_page&amp;quot; start=&amp;quot;0x00000FFC&amp;quot; size=&amp;quot;0x4&amp;quot;&amp;gt;
	&amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.uicr_mbr_params_page&amp;quot; address_symbol=&amp;quot;__start_uicr_mbr_params_page&amp;quot; end_symbol=&amp;quot;__stop_uicr_mbr_params_page&amp;quot; start = &amp;quot;0x00000FFC&amp;quot; size=&amp;quot;0x4&amp;quot; /&amp;gt;
  &amp;lt;/MemorySegment&amp;gt;
&amp;lt;/Root&amp;gt;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;To flash_placement.xml and and&amp;nbsp;bootloader_settings_page RX 0x000FF000 0x1000;uicr_mbr_params_page RX 0x00000FFC 0x4;mbr_params_page RX 0x000FE000 0x1000&lt;/p&gt;
&lt;p&gt;to the Memory segments.&lt;/p&gt;
&lt;p&gt;Now the bank1 address is&amp;nbsp;0x72000 but the error:&amp;nbsp;&amp;lt;error&amp;gt; app: SOFTDEVICE: INVALID MEMORY ACCESS still appears.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/282286?ContentTypeID=1</link><pubDate>Fri, 27 Nov 2020 14:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f712cf3-26b3-4051-b7aa-b7f8a7a453bf</guid><dc:creator>oferAtom</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m note sure I understand what you mean. I didn&amp;#39;t programmed the Bootloader setting page yet. I get bank1 address from:&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t nrf_dfu_bank1_start_addr(void)
{
    uint32_t bank0_addr = nrf_dfu_bank0_start_addr();
    return ALIGN_TO_PAGE(bank0_addr + s_dfu_settings.bank_0.image_size);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Doesn&amp;#39;t this already pointing to the start location of bank1?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/282283?ContentTypeID=1</link><pubDate>Fri, 27 Nov 2020 14:22:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19753864-6e06-44a4-9a98-77f319b846d7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ofer,&lt;/p&gt;
&lt;p&gt;Your current application is starting at address 0x26000 in flash (ie bank 0 start address), so Bank 1 should have been placed higher up in flash. &lt;span class="item"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Have you programmed the Bootloader settings page? The s_dfu_settings.bank_0.image_size field should contain the size of your app so nrf_dfu_bank1_start_addr() can correctly determine the bank 1 address.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/282277?ContentTypeID=1</link><pubDate>Fri, 27 Nov 2020 14:01:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a9131f7-5a3c-40b0-8a61-2f323bfe82ec</guid><dc:creator>oferAtom</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to write my .bin file to bank1 but I get an error.&lt;/p&gt;
&lt;p&gt;Here is what I did:&lt;/p&gt;
&lt;p&gt;Init:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_dfu_flash_init(true)
uint32_t bank1_addr_offset = nrf_dfu_bank1_start_addr();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Getting first 4096 bytes chunk:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_dfu_flash_erase(bank1_addr_offset, 1, NULL);
nrf_dfu_flash_store(bank1_addr_offset, chunk, chunk_len, NULL);
bank1_addr_offset += chunk_len;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;span&gt;nrf_dfu_flash_erase prints:&amp;nbsp;nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x00026000, len=1 pages), queue usage: 0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And the error happens in&amp;nbsp;nrf_dfu_flash_store:&amp;nbsp;&lt;strong&gt;&amp;lt;error&amp;gt; app: SOFTDEVICE: INVALID MEMORY ACCESS&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Can you please tell me what I&amp;#39;m doing wrong?&lt;/p&gt;
&lt;p&gt;My main goal is that once all the chunks are written to bank1 is to update the settings with the .dat file and reboot.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Ofer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/281740?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2020 09:34:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbad9430-ed21-44fc-9eda-7166c183d5a4</guid><dc:creator>oferAtom</dc:creator><description>&lt;p&gt;Thank you Vidar, I will try it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/281453?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 08:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25d0283c-83d4-4a97-be18-eeb8b4cf3947</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ofer,&lt;/p&gt;
&lt;p&gt;Yes, you can store the *.bin directly to bank 1 as well, but you will also need to store the init data (*.dat) to the BL settings page before you reset. This gives the bootloader the information it needs to activate the new app (Size of image, version number, etc - see &lt;span&gt;&lt;a title="Init packet" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_bootloader_dfu_validation.html?cp=7_1_3_5_1_1_0#lib_bootloader_dfu_init"&gt;Init packet&lt;/a&gt;&lt;/span&gt;).&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><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/280974?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 18:21:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:328938f3-9ad8-48d9-96b7-70d6c63d4f38</guid><dc:creator>oferAtom</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Can I simply put the files (or just the *.bin file) in Bank1 and reset?&lt;/p&gt;
&lt;p&gt;Will the bootloader see that it has data in Bank1, validate it and copy it to Bank0?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;All the best,&lt;br /&gt;Ofer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/280841?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 10:51:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79120069-9d56-4680-bae2-bbdbfe38e0d3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ofter,&lt;/p&gt;
&lt;p&gt;You should extract the zip before you send it. The *.dat file contains the init data, and the *.bin file is the FW image.&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><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/280837?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 10:43:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fabec2b9-30ff-42ef-9502-05cedf26b3c0</guid><dc:creator>oferAtom</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;We use SDK 15.3.0 (We are also working on moving to SDK 17).&lt;/p&gt;
&lt;p&gt;The reason I want to receive the file first is because I already have&amp;nbsp;a file download flow implemented. So it will be easier for me to get the ZIP file and then decode and validate it, rather then getting chunks of the ZIP file (I don&amp;#39;t know the order of the chunks so I don&amp;#39;t know how to set the init packet from the ZIP myself).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is it possible to write the ZIP file to Bank1 and then decode and validate it?&lt;/p&gt;
&lt;p&gt;Another option that I can use is to write the ZIP file to external flash if that helps to simplify the process?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;All the best,&lt;/p&gt;
&lt;p&gt;Ofer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/280830?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 10:31:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:609f4972-bf9d-4a73-a5d4-113fde541633</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Ofer,&lt;/p&gt;
&lt;p&gt;The steps you outlined are not wrong, but normally you will want to decode and validate the&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_bootloader_dfu_validation.html?cp=7_1_3_5_1_1_0#lib_bootloader_dfu_init"&gt; init packet&lt;/a&gt; before you start receiving the FW image. What I generally recommend is to import and reuse the same DFU modules as the bootloader, same as I did in the example I uploaded to the other thread. The &amp;quot;nrf dfu&amp;quot; modules will take care of validation and storing of the new image for you. The missing piece will then be to create a custom transport to retrieve data from the modem and forward it as DFU requests to the nrf_dfu_req_handler.&lt;/p&gt;
&lt;p&gt;You can find the requirements for a DFU transport layer described in the &amp;quot;&lt;span&gt;&lt;a title="DFU protocol" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_dfu_transport.html?cp=7_1_3_5_2"&gt;DFU protocol&amp;quot;&lt;/a&gt;&lt;/span&gt;&lt;span&gt;chapter of the Bootloader documentation. Also, not sure if you are on SDK v.15.3.0 or v15.0.0, but note that 15.3.0 includes some bug fixes related to background DFU.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/280578?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 11:35:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e77fddae-9c45-46eb-834c-51b0b4625ae1</guid><dc:creator>oferAtom</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thank you for the reply.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve read the thread you send and many others including&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/63399/dfu-over-cellular-internet/263908#263908"&gt;this one&lt;/a&gt;. Please let me know if I got this correctly:&lt;/p&gt;
&lt;p&gt;From my application:&lt;/p&gt;
&lt;p&gt;1. Get Bank1 address by calling&amp;nbsp;nrf_dfu_bank1_start_addr().&lt;/p&gt;
&lt;p&gt;2. Write the file I download to to that address (The file is the output of the nrfutil).&lt;/p&gt;
&lt;p&gt;3. Call&amp;nbsp;nrf_dfu_validation_init_cmd_execute(&amp;lt;Bank1 address&amp;gt;, &amp;lt;file size&amp;gt;).&lt;/p&gt;
&lt;p&gt;4. If the return value is&amp;nbsp;NRF_DFU_RES_CODE_SUCCESS, reset.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the bootloader: The&amp;nbsp;nrf_bootloader_init will call&amp;nbsp;nrf_bootloader_fw_activate and&amp;nbsp;app_activate() the new firmware?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;All the best,&lt;br /&gt;Ofer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write firmware to bank 1 from application</title><link>https://devzone.nordicsemi.com/thread/280380?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 13:46:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87442434-f818-4c72-9a85-b43ad457daad</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, it should be possible re-use our existing DFU and bootloader libraries for this. Please take a look at this thread : &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46994/background-dfu-application-source-code"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/46994/background-dfu-application-source-code&lt;/a&gt; and see if helps answer your questions. Requirements were mostly the same except this customer was planning to receive the image from a Wifi module.&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>