<?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>Bootloader misinterpets gpregret bit fields</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62674/bootloader-misinterpets-gpregret-bit-fields</link><description>This has been noted a couple of times but your treatment of bit fields is just wrong in the bootloader. It not only disagrees with the documentation but it&amp;#39;s so flawed that it interferes with valid gpregret operations and consistent upgrade techniques</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jun 2020 14:50:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62674/bootloader-misinterpets-gpregret-bit-fields" /><item><title>RE: Bootloader misinterpets gpregret bit fields</title><link>https://devzone.nordicsemi.com/thread/256749?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2020 14:50:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:764635b1-fe11-4307-93a1-0853a3fad6df</guid><dc:creator>testy</dc:creator><description>[quote userid="15146" url="~/f/nordic-q-a/62674/bootloader-misinterpets-gpregret-bit-fields/256515"]I will report that to the developers.[/quote]
&lt;p&gt;Thanks for looking, but issue still persists (although reported several times) and SDK 17.0.0 is out uncorrected.&lt;/p&gt;
&lt;p&gt;With above mentioned rectifications my &lt;span style="text-decoration:underline;"&gt;bootloader runs&lt;/span&gt;, when GPREGRET = 0xB1, &lt;strong&gt;or 0xB3 or 0xB5 or 0xB7&lt;/strong&gt; (application sees then LSbit cleared, i.e. 0xB0, 0xB2, 0xB4, 0xB6), &lt;span style="text-decoration:underline;"&gt;doesn&amp;#39;t run&lt;/span&gt;, when GPREGRET = 0xB9, 0xBB, 0xBD, 0xBF.&lt;/p&gt;
&lt;p&gt;But bootloader doesn&amp;#39;t hang forever (contrary to SDK 15-17), when GPREGRET != 0xB1 (fortunately).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader misinterpets gpregret bit fields</title><link>https://devzone.nordicsemi.com/thread/256515?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2020 14:40:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9f0bc55-4e46-4d5d-95e7-e9424424da53</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for&amp;nbsp;reporting this.&lt;/p&gt;
[quote userid="90822" url="~/f/nordic-q-a/62674/bootloader-misinterpets-gpregret-bit-fields"]think you could argue the first two, although not convincingly. The third is just wrong - it&amp;#39;s not checking the bit fields correctly.[/quote]
&lt;p&gt;BOOTLOADER_DFU_START and&amp;nbsp;BOOTLOADER_DFU_SKIP_CRC is defined like this,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define BOOTLOADER_DFU_START    (BOOTLOADER_DFU_GPREGRET | BOOTLOADER_DFU_START_BIT_MASK)      /**&amp;lt; Magic number to signal that bootloader should enter DFU mode because of signal from Buttonless DFU in main app.*/
#define BOOTLOADER_DFU_SKIP_CRC (BOOTLOADER_DFU_GPREGRET2 | BOOTLOADER_DFU_SKIP_CRC_BIT_MASK)  /**&amp;lt; Magic number to signal that CRC can be skipped due to low power modes.*/&lt;/pre&gt;so&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_power_gpregret2_set(nrf_power_gpregret2_get() &amp;amp; ~BOOTLOADER_DFU_SKIP_CRC);

nrf_power_gpregret_set(nrf_power_gpregret_get() &amp;amp; ~BOOTLOADER_DFU_START);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;should be correct.&lt;/p&gt;
&lt;p&gt;But I agree with you that the third one looks wrong. I will report that to the developers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>