<?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>OTA DFU Bootloader SDK6.1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13338/ota-dfu-bootloader-sdk6-1</link><description>We&amp;#39;ve got devices that are out in the field which were built on SDK6.1 w/ 110 SoftDevice 7.1.0 on an nRF51822. 
 Went with the dual-banked solution as that was what was available at the time of development, but we&amp;#39;ve run up against the allowed codespace</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 May 2016 08:34:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13338/ota-dfu-bootloader-sdk6-1" /><item><title>RE: OTA DFU Bootloader SDK6.1</title><link>https://devzone.nordicsemi.com/thread/50853?ContentTypeID=1</link><pubDate>Mon, 09 May 2016 08:34:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ec76997-56b8-4857-9b7d-b71677088b53</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I think the github example is a good starting point if you are using SDK 6.x.x. The other alternative is to use one of the bootloader examples from SDK 7.x.x or later.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/bledfu_transport_bleprofile.html?cp=4_0_0_4_3_1_4_0_1_6#ota_profile_pkt_rcpt_notif"&gt;&lt;strong&gt;Packet receipt notification&lt;/strong&gt;&lt;/a&gt; reports the number of received packet to the DFU controller. Problem is that the old bootloader example only had an uin16_t variable to hold the number of bytes, hence overflowing after &amp;gt;65535 received bytes. Fix is to declare the &amp;quot;m_num_of_firmware_bytes_rcvd&amp;quot; variable in dfu_transport_ble.c as a uin32_t.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA DFU Bootloader SDK6.1</title><link>https://devzone.nordicsemi.com/thread/50852?ContentTypeID=1</link><pubDate>Fri, 29 Apr 2016 17:16:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9bef194-d191-4c9a-8ae1-90de78ef30a1</guid><dc:creator>Tim Clark</dc:creator><description>&lt;p&gt;Other than the Single Bank Bootloader on GitHub (&lt;a href="https://github.com/NordicSemiconductor/nrf51-dfu-single-bank-ble)"&gt;github.com/.../nrf51-dfu-single-bank-ble)&lt;/a&gt; -- are there any other examples that I could use as a starting point?&lt;/p&gt;
&lt;p&gt;It also seems the latest update to the iOS nRF ToolBox has rendered that Single Bank bootloader on GitHub non-operational -- at least for me.  It now returns an error code after it gets past 65760 bytes and says that only 224 bytes were received (seems oddly close to &amp;gt;65535?).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA DFU Bootloader SDK6.1</title><link>https://devzone.nordicsemi.com/thread/50851?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2016 07:30:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c113c43-27b4-4946-8e4a-e1535742429c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unfortunately, the example bootloader is not able to change its start address. So the start address in new and old bootloader should be the same. The reason we don not support is that  it would be harder if possible to make it as fail-safe as it is with the current implementation.&lt;/p&gt;
&lt;p&gt;Would it be possible to reduce the size of your single bank bootloader so it can start at 0x3C000 in your case? That would be the preferred option. Otherwise it may be possible to work around it by using the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.sds/dita/softdevices/s130/mbr_bootloader/mbr_sd_reset_behavior.html?cp=2_6_2_0_11_2"&gt;&lt;strong&gt;SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET&lt;/strong&gt;&lt;/a&gt; to change the interrupt forwarding address so the MBR does not forward program execution to the old address in UICR.BOOTLOADERADDR. Note that UICR registers cannot be updated at runtime since a full chip erase is required to erase them (NVMC.ERASEALL).&lt;/p&gt;
&lt;p&gt;Also note that the new bootloader does not foresee the change in the bootloader memory map when going from dual bank to single bank, which causes the  the &amp;quot;bootloader update complete&amp;quot; verification to fail.&lt;/p&gt;
&lt;p&gt;Normal program flow when doing bootloader update:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When doing DFU of new bootloader the
old bootloader loads the new image to
swap and sets&lt;br /&gt;
p_bootloader_settings-&amp;gt;bank_1 ==&lt;br /&gt;
BANK_VALID_BOOT followed by a system
reset&lt;/li&gt;
&lt;li&gt;Bootloader starts and&lt;br /&gt;
bootloader_dfu_sd_in_progress()&lt;br /&gt;
returns &amp;#39;true&amp;#39; since BANK_VALID_BOOT
is set in bootloader settings.&lt;/li&gt;
&lt;li&gt;in
bootloader_dfu_sd_update_continue()
the bootloader compares its own image
with the one in swap. If they are
different the old bootloader will
assume that the one in swap is a new
one. In this case it will be
different&lt;/li&gt;
&lt;li&gt;The comparison will return false so
the bootlaoder runs the
dfu_bl_image_swap() call to replace
itself with the new one (swap is
handled in the MBR).&lt;/li&gt;
&lt;li&gt;The MBR will start the new bootlaoder
once the copying is complete.&lt;/li&gt;
&lt;li&gt;BANK_VALID_BOOT will still be set
when the new bootloader starts, but
this time the comparison in
bootloader_dfu_sd_update_continue()
will return success so the bootlaoder
will proceed to
bootloader_dfu_sd_update_finalize()
call and clear the BANK_VALID_BOOT
flag.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, in your case you will likely see that the bootloader runs the verification starting from BANK_0 instead of the old BANK_1 address, hence causing the bootlaoder to replace itself with an empty image from BANK_0. The workaround is to perform comparison on both new and old address in the new bootloader and check if either returns true. If one of them is true it means that the bootloader should proceed to bootloader_dfu_sd_update_finalize(). Answered a similar case &lt;a href="https://devzone.nordicsemi.com/question/70161/dualbank-to-singlebank-via-ble-dfu/"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/bledfu_example_init.html?cp=4_0_0_4_3_1_1_3"&gt;init packet requirement&lt;/a&gt; was added in SDK 7.0.0, and this is the format that nrfutil follows.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OTA DFU Bootloader SDK6.1</title><link>https://devzone.nordicsemi.com/thread/50850?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2016 01:51:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f00a2e8-d698-42ad-8ad6-964c6d1cbdbf</guid><dc:creator>Tim Clark</dc:creator><description>&lt;p&gt;On further testing -- it seems like the bootloader.hex file can indeed be loaded with nRF Toolbox -- however, the fact that the Single Bank Bootloader wants to start at 0x3A000 instead of 0x3C000 seems to be causing issues.  I&amp;#39;m able to update the bootloader to the existing Dual Bank bootloader, and it works fine, but not when I load the Single Bank hex file.&lt;/p&gt;
&lt;p&gt;Is there something I&amp;#39;m missing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>