<?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 Update fails second time updating from SDK15 to SDK16 firmware (BL, SD, App)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63644/dfu-update-fails-second-time-updating-from-sdk15-to-sdk16-firmware-bl-sd-app</link><description>We are upgrading our product from SDK15 to SDK16 using DFU over USB. When we perform a DFU update (BL, SD, and App) form SDK15 to SDK16, it works fine. Then if we perform a DFU update back to SDK15 it works fine (BL, SD, App). Then if we try to go back</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Jul 2020 23:11:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63644/dfu-update-fails-second-time-updating-from-sdk15-to-sdk16-firmware-bl-sd-app" /><item><title>RE: DFU Update fails second time updating from SDK15 to SDK16 firmware (BL, SD, App)</title><link>https://devzone.nordicsemi.com/thread/262075?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2020 23:11:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99393cb3-c24c-4ac8-9390-ef7b7148e38a</guid><dc:creator>Bycman</dc:creator><description>&lt;p&gt;OK, I am erasing the settings page when I go backward. now it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU Update fails second time updating from SDK15 to SDK16 firmware (BL, SD, App)</title><link>https://devzone.nordicsemi.com/thread/260388?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 13:30:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11966d5e-47d8-4711-8a35-213746551a88</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Bycman,&amp;nbsp;&lt;br /&gt;In our current implementation we don&amp;#39;t have a feature to clean the bootloader setting. You may need to implement that in the bootloader code. Maybe to clear the bootloader setting when there is a SD+BL update (but not when only a BL update).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest to test DFU with the debug version of the bootloaders. It&amp;#39;s easier to debug with these versions.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU Update fails second time updating from SDK15 to SDK16 firmware (BL, SD, App)</title><link>https://devzone.nordicsemi.com/thread/259981?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 18:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74ba1ac3-3a62-4685-9e91-a623d1ee1d16</guid><dc:creator>Bycman</dc:creator><description>&lt;p&gt;Yes, I used the same exact zip file on first and second&amp;nbsp;attempt to go&amp;nbsp;to SDK16 package. When I say stuck in DFU mode, it seems like it is running the SDK16 bootloader. I say that because I dumped the entire flash after first SDK16 update and second SDK16 update and they are the same with the exception of those few bytes. I also tried to attached a J-Link Debugger&amp;nbsp;after the failure of the second SDK16 attempt&amp;nbsp;and I was able to step through with my SDK16 Bootloader&amp;nbsp; project, but not the SDK15 Bootloader project.&lt;/p&gt;
&lt;p&gt;That sounds like a great idea to erase the bootloader settings and clear the CRC validation and validation type. I assume to do this I need to modify the Bootloader source code. Or is there a way to accomplish this&amp;nbsp;via the nrfutil package creation utility that would cause the Bootloader to erase that region?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU Update fails second time updating from SDK15 to SDK16 firmware (BL, SD, App)</title><link>https://devzone.nordicsemi.com/thread/259861?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 09:36:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d92b6b7f-a3af-44f4-8926-cc7220c3d4ba</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Bycman,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I assume you were testing using SDK v15.0 and SDK v16.0 based on the paths you provided.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is a fundamental change in SDK v15.3 and continued in newer version of the SDK is the bootloader validation. You can read more about that here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_secure_boot.html?cp=7_5_0_3_5_0_8"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_secure_boot.html?cp=7_5_0_3_5_0_8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can see the difference between SDK v15 and SDK v16 in the code by having a look at&amp;nbsp;nrf_dfu_settings_t struct in nrf_dfu_types.h&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The 6 bytes difference you located actually pointed to the boot_validation_crc.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not 100% sure what exactly happened but my&amp;nbsp;hypothesis is that on the first DFU update to SDK v16 the bootloader setting at address &lt;span&gt;0xFE25C&amp;nbsp;was blank and the bootloader in SDK v16 (designed to be backward compatible) will detect that&amp;nbsp;it&amp;#39;s been updated from older version. It will continue and update the CRC to match with its CRC.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;On the second update, for some reason the CRC value is not the same any more and it&amp;#39;s also not blank (0xFFFFFFFF) , then we will have a CRC fail.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you update DFU to SDK v16 on the 2nd time, did you use the exact same .zip file as the first time or it&amp;#39;s a different one ?&amp;nbsp;&lt;br /&gt;When you mentioned that &amp;quot;T&lt;span&gt;hen if we try to go back to SDK16, it is stuck in DFU mode&amp;nbsp;&amp;quot; it&amp;#39;s stuck in the bootloader of version 15 or it&amp;#39;s the bootloader of version 16 ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;My suggestion is that when you move from SDK v16 back down to SDK15 , the bootloader setting page has to be erased completely. And the CRC validation and validation type in the bootloader setting should be cleaned.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>