<?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>How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119582/how-to-use-hardware-based-downgrade-protection</link><description>Hello. 
 I am trying to follow Downgrade protection using MCUboot to enable Hardware-based downgrade protection. However, an error occurred, and the software did not start. It is also from the initial flash, not after the update. 
 
 The &amp;quot;sysbuild.conf</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Mar 2025 07:21:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119582/how-to-use-hardware-based-downgrade-protection" /><item><title>RE: How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/thread/528320?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2025 07:21:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acba067a-e5df-465c-b4c2-21d0c3632a05</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;You&amp;#39;re right. I have written new questions &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;a.da&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/thread/528192?ContentTypeID=1</link><pubDate>Thu, 20 Mar 2025 11:21:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b10c5a37-f3d4-4976-95bb-3c9585e5b15c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Amanda is out of office.&lt;/p&gt;
[quote user="a.da"]Thanks to your help, I was able to successfully update the Network Core.&lt;br /&gt;The issue in the title has been resolved.[/quote]
&lt;p&gt;Great!&lt;/p&gt;
[quote user="a.da"]However, I still have a few questions:[/quote]
&lt;p&gt;Please open a new case for these new questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/thread/527500?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 04:41:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11addd93-333c-44e7-b7a4-5819b4aaa0a7</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Amanda,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks to your help, I was able to successfully update the Network Core.&lt;br /&gt;The issue in the title has been resolved.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, I still have a few questions:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;About the Downgrade Protection of the Network Core&lt;br /&gt;Even with Downgrade Protection enabled, the Network Core is still downgradeable.&lt;br /&gt;However, version mismatches between the App Core and the Network Core should be avoided.&lt;br /&gt;If you have any ideas on how to resolve this, please let me know.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;About the monotonic counter&lt;br /&gt;Is there a way to retrieve the current value?&lt;br /&gt;I am assuming it will be displayed on a PC serial terminal or a smartphone app.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;About Image Swap&lt;br /&gt;It seems that when the update count reaches the value of &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS&lt;/span&gt;, the Image Swap of the App Core is performed every time the software is rebooted.&lt;br /&gt;Is this the expected behavior?&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;The logs during the update and reboot are as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;monotonic counter &amp;lt;&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Update&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:18.749,969] &amp;lt;err&amp;gt; mcumgr_img_grp: Failed to open flash area ID 1: -2
[00:00:19.052,307] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:00:41.610,382] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 1, Swap type: none
*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
I: Starting bootloader
I: Image index: 0, Swap type: perm
I: Image index: 1, Swap type: perm
I: Image 0 upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Image 0 copying the secondary slot to the primary slot: 0x44784 bytes
D: writing magic; fa_id=4 off=0xebff0 (0xf7ff0)
D: erasing secondary header
D: erasing secondary trailer
I: Image 1 upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Image 1 copying the secondary slot to the primary slot: 0x2a3c0 bytes
D: writing magic; fa_id=1 off=0x3fff0 (0x3fff0)
D: erasing secondary header
D: erasing secondary trailer
I: Bootloader chainload address offset: 0xc000
*** Booting Mesh Light Fixture v2.9.0-d54b9798c66e ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Reboot&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
I: Starting bootloader
I: Image index: 0, Swap type: none
I: Image index: 1, Swap type: none
I: Bootloader chainload address offset: 0xc000
*** Booting Mesh Light Fixture v2.9.0-d54b9798c66e ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;monotonic counter =&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Update&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:30.237,457] &amp;lt;err&amp;gt; mcumgr_img_grp: Failed to open flash area ID 1: -2
[00:00:30.538,299] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:00:53.067,932] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 1, Swap type: none
*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
I: Starting bootloader
I: Image index: 0, Swap type: perm
I: Image index: 1, Swap type: perm
I: Image 0 upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Image 0 copying the secondary slot to the primary slot: 0x44784 bytes
D: writing magic; fa_id=4 off=0xebff0 (0xf7ff0)
E: Security counter update failed after image upgrade.
I: Image 1 upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Image 1 copying the secondary slot to the primary slot: 0x2a3c0 bytes
D: writing magic; fa_id=1 off=0x3fff0 (0x3fff0)
D: erasing secondary header
D: erasing secondary trailer
I: Bootloader chainload address offset: 0xc000
*** Booting Mesh Light Fixture v2.9.0-d54b9798c66e ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Reboot&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
I: Starting bootloader
I: Image index: 0, Swap type: perm
I: Image index: 1, Swap type: none
I: Image 0 upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Image 0 copying the secondary slot to the primary slot: 0x44784 bytes
D: writing magic; fa_id=4 off=0xebff0 (0xf7ff0)
E: Security counter update failed after image upgrade.
I: Bootloader chainload address offset: 0xc000
*** Booting Mesh Light Fixture v2.9.0-d54b9798c66e ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;a.da&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/thread/527368?ContentTypeID=1</link><pubDate>Fri, 14 Mar 2025 12:27:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dea5118-bbd5-4f4f-92e1-fc031bc15396</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;PR updated, should work now, please re-check.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/thread/526667?ContentTypeID=1</link><pubDate>Tue, 11 Mar 2025 02:14:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:175da68d-94e0-47ce-a226-d298fc6a2cf5</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Amanda,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;By applying the differences in &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;loader.c&lt;/span&gt;, the software has started successfully.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, there are still some questions.&lt;br /&gt;When I tried DFU, the Application Core ( Image 0 ) was updated, but the Network Core ( Image 1 ) was not.&lt;br /&gt;It seems the transfer to the Secondary Slot was successful, but the image was reported as invalid.&lt;br /&gt;The only change made to the transferred binary file was incrementing the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&lt;/span&gt; from 1 to 2.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:12:09.941,223] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:12:09.941,711] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 1, Swap type: none
[00:12:09.941,741] &amp;lt;err&amp;gt; mcumgr_img_grp: Failed to open flash area ID 1: -2
[00:12:10.242,584] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:12:33.432,373] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 1, Swap type: none
*** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
I: Starting bootloader
I: Image index: 0, Swap type: perm
I: Image index: 1, Swap type: perm
E: Image in the secondary slot is not valid!
I: Image 0 upgrade secondary slot -&amp;gt; primary slot
I: Erasing the primary slot
I: Image 0 copying the secondary slot to the primary slot: 0x44784 bytes
D: writing magic; fa_id=4 off=0xebff0 (0xf7ff0)
D: erasing secondary header
D: erasing secondary trailer
I: Bootloader chainload address offset: 0xc000
*** Booting Mesh Light Fixture v2.9.0-d54b9798c66e ***
*** Using nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is there anything I can do to help resolve this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;a.da&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/thread/526615?ContentTypeID=1</link><pubDate>Mon, 10 Mar 2025 16:05:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c81fe61-f6a3-4ec1-8bf4-682991af2974</guid><dc:creator>Amanda Hsieh</dc:creator><description>[quote user="a.da"]I overlooked this. &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/pull/402" rel="noopener noreferrer" target="_blank"&gt;This PR&lt;/a&gt; also needs to be reflected, right?[/quote]
&lt;p&gt;Yes.&lt;/p&gt;
[quote user="a.da"]Also, I have some doubts about the changes.&lt;br /&gt;It seems that dependencies necessary for enabling MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION have been added.&lt;br /&gt;Even after reflecting these changes, MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION remained enabled.&lt;br /&gt;What could be the problem?[/quote]
&lt;p&gt;You can check the .config file under&amp;nbsp;build\zephyr for the&amp;nbsp;dependent configs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/thread/526468?ContentTypeID=1</link><pubDate>Mon, 10 Mar 2025 04:51:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7a1f698-392a-4cb2-aa39-907100de919c</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi Amanda, thanks for your reply.&lt;/p&gt;
&lt;p&gt;Unfortunately, the issue has not changed.&lt;br /&gt;I have reflected the changes written in the PR into &lt;span&gt;nRF Connect SDK v2.9.0.&lt;br /&gt;&lt;/span&gt;Since overwriting directly with the files attached to the PR results in a Build Error, I only applied the differences.&lt;br /&gt;Do you know the steps to confirm that the issue has been fixed?&lt;/p&gt;
&lt;p&gt;Also, I have some doubts about the changes.&lt;br /&gt;It seems that dependencies necessary for enabling MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION have been added.&lt;br /&gt;Even after reflecting these changes, MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION remained enabled.&lt;br /&gt;What could be the problem?&lt;/p&gt;
&lt;p&gt;a.da&lt;/p&gt;
&lt;p&gt;Addendum:&lt;/p&gt;
&lt;p&gt;I overlooked this. &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/pull/402" rel="noopener noreferrer" target="_blank"&gt;This PR&lt;/a&gt; also needs to be reflected, right?&lt;br /&gt;I&amp;rsquo;ll check again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/thread/526379?ContentTypeID=1</link><pubDate>Fri, 07 Mar 2025 14:47:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9fe514e-eb46-4329-90dd-2aae40187fd1</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It should get fixed by this PR:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/20787"&gt;https://github.com/nrfconnect/sdk-nrf/pull/20787&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use Hardware-based downgrade protection</title><link>https://devzone.nordicsemi.com/thread/526268?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2025 23:35:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bda18256-095b-4d19-bc67-48e6e35ac650</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am working on your case and will update it when I collect enough information.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>