<?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>DFU from SD 1.0.0-3 to 4.0.2</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22092/dfu-from-sd-1-0-0-3-to-4-0-2</link><description>Hi, 
 We started out developing an application using the SoftDevice 1.0.0-3 (from SDK 0.9.2). We now need to upgrade to SoftDevice 4.0.2 (included in SDK 13.0.0). 
 We already have products with SoftDevice 1.0.0-3 that have been released to customers</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Jun 2017 12:18:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22092/dfu-from-sd-1-0-0-3-to-4-0-2" /><item><title>RE: DFU from SD 1.0.0-3 to 4.0.2</title><link>https://devzone.nordicsemi.com/thread/86812?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 12:18:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e83b2ee-7c34-4287-ab40-17521ebeb1d7</guid><dc:creator>grahn</dc:creator><description>&lt;p&gt;We figured it out. The SYSTICK was still enabled during ERASEPAGE. After disabling the SYSTICK, we managed to successfully perform the intended upgrade of our devices. Thank for your support!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU from SD 1.0.0-3 to 4.0.2</title><link>https://devzone.nordicsemi.com/thread/86811?ContentTypeID=1</link><pubDate>Tue, 23 May 2017 06:38:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bba2dfa0-c050-4ccc-a9a4-0c66f3b1ba01</guid><dc:creator>grahn</dc:creator><description>&lt;p&gt;Thanks. That&amp;#39;s basically what I tried but then got an exception when doing ERASEPAGE @0x0000. I will try this again and investigate a little bit more. I will come back with the results and some more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU from SD 1.0.0-3 to 4.0.2</title><link>https://devzone.nordicsemi.com/thread/86810?ContentTypeID=1</link><pubDate>Fri, 19 May 2017 11:39:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:409a2a88-51cd-41ca-a34a-7b26b4af4d81</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Ok, if you&amp;#39;re willing to take that risk then erasing the MBR should be straight-forward, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//Enable Erase mode
NRF_NVMC-&amp;gt;CONFIG = 0x02;
while(!NRF_NVMC-&amp;gt;READY){}

// Erase the flash pages from 0x0000 to 0x3000
NRF_NVMC-&amp;gt;ERASEPAGE = 0x00000000;
while(!NRF_NVMC-&amp;gt;READY){}
NRF_NVMC-&amp;gt;ERASEPAGE = 0x00001000;
while(!NRF_NVMC-&amp;gt;READY){}
NRF_NVMC-&amp;gt;ERASEPAGE = 0x00002000;
while(!NRF_NVMC-&amp;gt;READY){}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU from SD 1.0.0-3 to 4.0.2</title><link>https://devzone.nordicsemi.com/thread/86809?ContentTypeID=1</link><pubDate>Fri, 19 May 2017 06:37:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f73ddc25-e5b1-4d5e-a995-2604e103f233</guid><dc:creator>grahn</dc:creator><description>&lt;p&gt;Hi Björn,&lt;/p&gt;
&lt;p&gt;Thanks a lot for the reply!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is not possible to change the MBR, i.e. erase the old and replace it with a new MBR,
without risking bricking the device. If you get a power failure during the flash
operation that overwrites the old MBR with the new, then the device is bricked.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q3: I understand. But for this scenario we can actually take that risk since it is still possible (but not easy) for us to get physical access to our released products. Then, understanding that a power failure leads to a bricked device, what would be the sequence to upgrade the MBR? As I mentioned, we tried to do this from the bootloader, but ended up in a signal handler (0xfffffffe according to gdb backtrace) when trying to erase the first block. We used the NVMC registers directly since the SoftDevice is disabled at this point.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I assume that you&amp;#39;re doing a combined Bootloader and SoftDevice update in order to keep
them compatible with eachother. Are you using the SD_MBR_COMMAND_COPY_BL command to
perform the Bootloader swap?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes we are doing a combined upgrade of the Bootloader and the SoftDevice. However, in our case I think that there is no dependency between the Bootloader and the SoftDevice since we don&amp;#39;t use the SoftDevice from our Bootloader (other than the MBR API which seems to be unchanged in the SoftDevice). Maybe I&amp;#39;m missing something here? The reason we upgrade the Bootloader is actually to fix a bug in our startup code and not to stay compatible with the SoftDevice.&lt;/p&gt;
&lt;p&gt;Anyway, the OTA transfer of the new software (including the Bootloader) is done by our application. In this case we are storing the new Bootloader in an unused part of the flash. When the new Bootloader is successfully stored, we change the UICR registers to point to the new bootloader. We do not use the SD_MBR_COMMAND_COPY_BL.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU from SD 1.0.0-3 to 4.0.2</title><link>https://devzone.nordicsemi.com/thread/86808?ContentTypeID=1</link><pubDate>Thu, 18 May 2017 14:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3aecfd6c-d913-4895-a459-f2769a881aaa</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Grahn,&lt;/p&gt;
&lt;p&gt;The S132 v1.0.0-3.alpha was never intended as a production-ready SoftDevice, hence the Alpha designation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1:&lt;/strong&gt; Do we HAVE to switch to the MBR included in SoftDevice 4.0.2?
&lt;strong&gt;A1:&lt;/strong&gt; Yes, since the MBR in S132 v1.0.0-3.alpha is 12kB, it expects the SoftDevice to start from this address. You cannot place the S132 v4.0.2 at 0x3000, since this has been compiled to start at 0x1000.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q2:&lt;/strong&gt; If we have to change the MBR, then how can we do this without using JTAG?
&lt;strong&gt;A2:&lt;/strong&gt; It is not possible to change the MBR, i.e. erase the old and replace it with a new MBR, without risking bricking the device. If you get a power failure during the flash operation that overwrites the old MBR with the new, then the device is bricked.&lt;/p&gt;
&lt;p&gt;I assume that you&amp;#39;re doing a combined Bootloader and SoftDevice update in order to keep them compatible with eachother. Are you using the SD_MBR_COMMAND_COPY_BL command to perform the Bootloader swap?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>