<?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>Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340</link><description>Hello. 
 This ticket was derived from another ticket . 
 I have a few questions about hardware-based downgrade protection. 
 
 About the Downgrade Protection of the Network Core Even with Downgrade Protection enabled, the Network Core is still downgradeable</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 May 2025 01:29:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340" /><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/534177?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 01:29:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3605c4b-33c7-4d85-9d22-991e5336d025</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Andreas,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/534076"]Monotonic counters should not work for network core appearently. It only supports for the first image, per&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;#39;s description[/quote]
&lt;p&gt;Understood. Thank you for your support.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will look into how to implement downgrade protection by referring to the resources.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&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: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/534076?ContentTypeID=1</link><pubDate>Tue, 06 May 2025 09:31:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:587e2817-8d96-4cf9-b146-4a5ab332d806</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Apologies for not following up.&lt;/p&gt;
&lt;p&gt;Monotonic counters should not work for network core appearently. It only supports for the first image, per&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;#39;s description&lt;/p&gt;
&lt;p&gt;However&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/120423/configuration-on-b0n-image-to-read-the-network-core-version-on-sdk-v2-9-0"&gt;Configuration on b0n image to read the Network Core version on SDK v2.9.0&lt;/a&gt;&amp;nbsp;&amp;nbsp;refers to&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/tfm/tfm_psa_template/README.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/tfm/tfm_psa_template/README.html&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.9.0/samples/tfm/tfm_psa_template/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf#L9"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.9.0/samples/tfm/tfm_psa_template/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf#L9&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.9.0/samples/tfm/tfm_psa_template/sysbuild/b0n/prj.conf#L31"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.9.0/samples/tfm/tfm_psa_template/sysbuild/b0n/prj.conf#L31&lt;/a&gt;&amp;nbsp;which does enable downgrade prevention for the netcore. It looks like I&amp;#39;ve missed this previously.&lt;/p&gt;
&lt;p&gt;Could you let me know if the latter resources are of any help?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/533704?ContentTypeID=1</link><pubDate>Fri, 02 May 2025 05:08:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eac4a891-a21d-4c40-b4d9-72e602787862</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Is there any follow-up?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/531262?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 05:43:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c8d8f74-b7e4-4928-8611-ecfc30bf9796</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Andreas,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have enabled&amp;nbsp;downgrade protection&amp;nbsp;&lt;/span&gt;&lt;span&gt;on the SMP Server Sample with PR2269 applied.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There were no changes in the logs. Net Core was not enabled.&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
E: Image in the secondary slot is not valid!
I: Image index: 1, Swap type: perm
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: 0x25f3c bytes
I: Bootloader chainload address offset: 0x10000
I: Jumping to the first image slot
*** Booting 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;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/530999"]Do you use the b0n_CONIIG_PCD_READ_NETCORE_APP_VERSION configuration?[/quote]
&lt;p&gt;&lt;span&gt;As written here.&lt;/span&gt;&lt;/p&gt;
[quote userid="138526" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/529195"]./sysbuild/b0n.conf[/quote]
&lt;p&gt;&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/530999"]Can you check if the two PRs are applied?[/quote]
&lt;p&gt;&lt;span&gt;PR20787 and PR402 were already applied when working on the originating ticket.&lt;/span&gt;&lt;/p&gt;
[quote userid="138526" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340"]This ticket was derived from &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/119582/how-to-use-hardware-based-downgrade-protection" rel="noopener noreferrer" target="_blank"&gt;another ticket&lt;/a&gt;.[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you tried the sample?&lt;/p&gt;
&lt;p&gt;What do you want me to confirm?&lt;/p&gt;
&lt;p&gt;Kind regards,&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: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/530999?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2025 10:02:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f1d8f69-6d96-4843-ac05-a7549ef6216a</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi a.da,&lt;br /&gt;&lt;br /&gt;While looking around for what could be wrong I found some PRs and suggestiosn&lt;/p&gt;
&lt;p&gt;Use&lt;/p&gt;
&lt;p&gt;PR &lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/20787"&gt;https://github.com/nrfconnect/sdk-nrf/pull/20787&lt;/a&gt; &lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/pull/402"&gt;https://github.com/nrfconnect/sdk-mcuboot/pull/402&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Together with &lt;a href="https://github.com/nrfconnect/sdk-zephyr/pull/2269/files"&gt;https://github.com/nrfconnect/sdk-zephyr/pull/2269/files&lt;/a&gt; and the configuration (which you already use) added to sysbuild.conf&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span&gt;#&amp;nbsp;Enable&amp;nbsp;Hardware-based&amp;nbsp;downgrade&amp;nbsp;protection&lt;br /&gt;&lt;/span&gt;&lt;span&gt;SB_CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION=y&lt;br /&gt;&lt;/span&gt;&lt;span&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS=24&lt;br /&gt;&lt;/span&gt;&lt;span&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE=1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and build with this command:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;west build -p -b nrf5340dk/nrf5340/cpuapp -- -DFILE_SUFFIX=nrf5340_bt -Dhci_ipc_CONFIG_FW_INFO_FIRMWARE_VERSION=2&amp;nbsp;&lt;br /&gt; -Db0n_CONFIG_PCD_READ_NETCORE_APP_VERSION=y&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Do you use the b0n_CONIIG_PCD_READ_NETCORE_APP_VERSION configuration?&lt;/p&gt;
&lt;p&gt;Can you check if the two PRs are applied?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/529875?ContentTypeID=1</link><pubDate>Mon, 31 Mar 2025 23:43:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82515b42-8eca-4109-9f6d-a0aff8f60bd2</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Andreas,&lt;/span&gt;&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/529712"]6: you enter the bootloader and load the image to secondary. It has index 0 and swap type perm. You get an error that states &amp;quot;the new image is not valid&amp;quot;, i.e something is detected and it should abort the update here. Nonetheless, it keeps on running and you update the image in the secondary slot to the primary slot in L 12. This is what you mean when you say the protection has failed for the netcore?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes, that&amp;#39;s correct. &lt;br /&gt;I understand that lines 7 to 8 indicate an error in the update of the App Core. &lt;br /&gt;On the other hand, lines 9 to 12 seem to indicate the successful update of the Net Core. &lt;br /&gt;Therefore, it seems that the protection for the App Core is enabled, while the protection for the Net Core is not.&lt;/p&gt;
&lt;p&gt;However, I do not know the correct log that would be output if both protections are enabled.&lt;br /&gt;I haven&amp;#39;t been able to find an example to reference.&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/529744"]Another question, what file are you using for the update? A multi-image update implies that you update both app and netcore simultaneous. Is the logs from your update with or without simultaneous update?[/quote]
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;dfu_application.zip&lt;/span&gt;&lt;br /&gt;It includes &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;quot;app.signed.bin&amp;quot;&lt;/span&gt;, &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;quot;ipc_radio.bin&amp;quot;&lt;/span&gt;, and &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;quot;manifest.json&amp;quot;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Kind regards,&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: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/529744?ContentTypeID=1</link><pubDate>Mon, 31 Mar 2025 10:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcb0ab24-7a52-4926-b44a-15731746ac06</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Another question, what file are you using for the update? A multi-image update implies that you update both app and netcore simultaneous. Is the logs from your update with or without simultaneous update?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/529712?ContentTypeID=1</link><pubDate>Mon, 31 Mar 2025 08:54:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc707333-d71e-406f-b232-e9e9edf120a5</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As a sanity check, could you go through the 19 lines in the device log and tell me if I see the same thing as you&lt;/p&gt;
&lt;p&gt;6: you enter the bootloader and load the image to secondary. It has index 0 and swap type perm. You get an error that states &amp;quot;the new image is not valid&amp;quot;, i.e something is detected and it should abort the update here. Nonetheless, it keeps on running and you update the image in the secondary slot to the primary slot in L 12. This is what you mean when you say the protection has failed for the netcore?&lt;/p&gt;
&lt;p&gt;If my understanding matches your observation I&amp;#39;ll escalate it as a bug.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/529659?ContentTypeID=1</link><pubDate>Sun, 30 Mar 2025 23:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98734df0-6480-477d-9552-e46ac911fd8e</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Andreas,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/529551"]Are you able to compile it and perform a DFU with hw protection?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It seems that hw protection was enabled for the App Core, but not for the Net Core.&lt;/p&gt;
&lt;p&gt;The result is the same as the one I posted earlier.&lt;/p&gt;
[quote userid="138526" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/529195"]&lt;p&gt;After upgrading to &amp;#39;2&amp;#39; via the nRF Device Manager App, I tried to downgrade to &amp;#39;1&amp;#39;.&lt;br /&gt;Net Core&amp;#39;s Downgrade Protection has failed.&lt;/p&gt;
&lt;p&gt;Result:&lt;/p&gt;[/quote]
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:37.332,916] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:00:59.952,514] &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
E: Image in the secondary slot is not valid!
I: Image index: 1, Swap type: perm
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;Kind regards,&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: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/529551?ContentTypeID=1</link><pubDate>Fri, 28 Mar 2025 14:00:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce36ade4-6bfe-4475-9d4d-a3ad8d36832e</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This&amp;nbsp;&lt;em&gt;looks&lt;/em&gt; to be correct according to the multi_image dfu guide, and is what I would&amp;#39;ve expected to see in my generated .config atleast. Are you able to compile it and perform a DFU with hw protection?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/529400?ContentTypeID=1</link><pubDate>Fri, 28 Mar 2025 00:04:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a9edcb9-ca82-4227-9c58-822168c191d0</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Andreas,&lt;/span&gt;&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/529237"]You also need to enable multi-image-update[/quote]
&lt;p&gt;The following files seem to indicate that multi-image-update is enabled. Is that correct?&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;./build/mcuboot/zephyr/include/generated/zephyr/autoconf.h&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;Excerpt:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define CONFIG_BOOT_UPGRADE_ONLY 1
#define CONFIG_BOOT_ENCRYPTION_SUPPORT 1
#define CONFIG_BOOT_MAX_IMG_SECTORS 256
#define CONFIG_BOOT_SHARE_BACKEND_DISABLED 1
#define CONFIG_BOOT_FIH_PROFILE_OFF 1
#define CONFIG_BOOT_USB_DFU_NO 1
#define CONFIG_MCUBOOT_LOG_LEVEL_DBG 1
#define CONFIG_MCUBOOT_LOG_LEVEL 4
#define CONFIG_MCUBOOT_LOG_THREAD_STACK_SIZE 768
#define CONFIG_UPDATEABLE_IMAGE_NUMBER 2
..
#define CONFIG_PCD_APP 1
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;Full:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3107.autoconf.h"&gt;devzone.nordicsemi.com/.../3107.autoconf.h&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;span&gt;./partitions.yml&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;span&gt;Full:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0xc200
  end_address: 0xf8000
  region: flash_primary
  size: 0xebe00
external_flash:
  address: 0x12c000
  end_address: 0x800000
  region: external_flash
  size: 0x6d4000
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    align:
      end: 0x1000
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  end_address: 0xc200
  placement:
    align:
      start: 0x4000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0xc000
  end_address: 0xf8000
  orig_span: &amp;amp;id001
  - mcuboot_pad
  - app
  region: flash_primary
  size: 0xec000
  span: *id001
mcuboot_primary_1:
  address: 0x0
  device: nordic_ram_flash_controller
  end_address: 0x40000
  region: ram_flash
  size: 0x40000
mcuboot_primary_app:
  address: 0xc200
  end_address: 0xf8000
  orig_span: &amp;amp;id002
  - app
  region: flash_primary
  size: 0xebe00
  span: *id002
mcuboot_secondary:
  address: 0x0
  device: DT_CHOSEN(nordic_pm_ext_flash)
  end_address: 0xec000
  placement:
    align:
      start: 0x4
  region: external_flash
  share_size:
  - mcuboot_primary
  size: 0xec000
mcuboot_secondary_1:
  address: 0xec000
  device: DT_CHOSEN(nordic_pm_ext_flash)
  end_address: 0x12c000
  region: external_flash
  size: 0x40000
otp:
  address: 0xff8380
  end_address: 0xff83fc
  region: otp
  size: 0x7c
pcd_sram:
  address: 0x20000000
  end_address: 0x20002000
  placement:
    after:
    - start
  region: sram_primary
  size: 0x2000
provision:
  address: 0xff8100
  end_address: 0xff8380
  region: otp
  size: 0x280
ram_flash:
  address: 0x40000
  end_address: 0x40000
  region: ram_flash
  size: 0x0
rpmsg_nrf53_sram:
  address: 0x20070000
  end_address: 0x20080000
  placement:
    before:
    - end
  region: sram_primary
  size: 0x10000
settings_storage:
  address: 0xf8000
  end_address: 0x100000
  placement:
    align:
      start: 0x4000
    before:
    - end
  region: flash_primary
  size: 0x8000
sram_primary:
  address: 0x20002000
  end_address: 0x20070000
  region: sram_primary
  size: 0x6e000&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Is there anything else that needs to be confirmed?&lt;/p&gt;
&lt;p&gt;Kind regards,&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: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/529237?ContentTypeID=1</link><pubDate>Thu, 27 Mar 2025 09:30:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:440925b4-79e7-4489-a2e1-cc83a15dc555</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi a.da,&lt;/p&gt;
&lt;p&gt;You also need to enable multi-image-update, i.e&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf53/simultaneous_multi_image_dfu_nrf5340.html"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf53/simultaneous_multi_image_dfu_nrf5340.html&lt;/a&gt;, so that&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/148712e7b4618aadbedd04e8d3ce5c3847d3be4f/boot/bootutil/src/loader.c#L1063"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/148712e7b4618aadbedd04e8d3ce5c3847d3be4f/boot/bootutil/src/loader.c#L1063&lt;/a&gt;&amp;nbsp;can recognize that it should compare the netcore image as well.&lt;/p&gt;
&lt;p&gt;If you still see that it doesn&amp;#39;t work when enabling this, then there might be a bug in the implementation. Let me know and I&amp;#39;ll file a report if that&amp;#39;s the case&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/529195?ContentTypeID=1</link><pubDate>Thu, 27 Mar 2025 06:19:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2faa1e25-8e8b-4475-8439-7854695157b9</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/529086"]Does this still resonate with your understanding?[/quote]
&lt;p&gt;Sorry, I&amp;rsquo;m a bit confused. Meaning, which two numbers should I make the same?&lt;/p&gt;
&lt;p&gt;This is configurations and result I tried.&lt;br /&gt;I made the values of &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&lt;/span&gt; and &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_FW_INFO_FIRMWARE_VERSION&lt;/span&gt; the same.&lt;br /&gt;After upgrading to &amp;#39;2&amp;#39; via the nRF Device Manager App, I tried to downgrade to &amp;#39;1&amp;#39;.&lt;br /&gt;Net Core&amp;#39;s Downgrade Protection has failed.&lt;/p&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:37.332,916] &amp;lt;inf&amp;gt; mcuboot_util: Image index: 0, Swap type: none
[00:00:59.952,514] &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
E: Image in the secondary slot is not valid!
I: Image index: 1, Swap type: perm
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 style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;/span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;./sysbuild.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;# STEP 2.1 Enable MCUboot
SB_CONFIG_BOOTLOADER_MCUBOOT=y

# STEP 6.3 - Configure project to use external flash for DFU
SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y

 # STEP 7.2 - Add b0n image
SB_CONFIG_SECURE_BOOT_NETCORE=y

# STEP 7.3 - Set up multiple partitions
SB_CONFIG_MCUBOOT_UPDATEABLE_IMAGES=2

# STEP 7.4 - Add support to netcore for DFU
SB_CONFIG_NETCORE_APP_UPDATE=y

# STEP 7.5 - Add support to mcuboot for updating
# two cores simultaneously
SB_CONFIG_MCUBOOT_NRF53_MULTI_IMAGE_UPDATE=y

# STEP 7.6 - Simultaneous FOTA does not support rollback
SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y

# Enable Hardware-based downgrade protection using MCUboot
SB_CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION=y
SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS=4
SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE=2&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;./prj.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NCS_SAMPLES_DEFAULTS=y

# Deferred logging helps improve LPN power consumption
# when friendship is established.
CONFIG_LOG_MODE_DEFERRED=y

# General configuration
CONFIG_NCS_APPLICATION_BOOT_BANNER_STRING=&amp;quot;Mesh Light Fixture&amp;quot;
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_NVS_LOOKUP_CACHE=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_NVS_NAME_CACHE=y
CONFIG_HWINFO=y
CONFIG_DK_LIBRARY=y
CONFIG_PWM=y
CONFIG_PM_SINGLE_IMAGE=y
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000
CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_DEVICE_NAME=&amp;quot;Mesh Light Fixture&amp;quot;
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
CONFIG_BT_PERIPHERAL=y

# Disable unused Bluetooth features
CONFIG_BT_CTLR_LE_ENC=n
CONFIG_BT_PHY_UPDATE=n
CONFIG_BT_CTLR_CHAN_SEL_2=n
CONFIG_BT_CTLR_MIN_USED_CHAN=n
CONFIG_BT_CTLR_PRIVACY=n

# Bluetooth Mesh configuration
CONFIG_BT_MESH=y
CONFIG_BT_MESH_RELAY=y
CONFIG_BT_MESH_FRIEND=y
CONFIG_BT_MESH_TX_SEG_MAX=10
CONFIG_BT_MESH_PB_GATT=y
CONFIG_BT_MESH_PROXY_USE_DEVICE_NAME=y
CONFIG_BT_MESH_GATT_PROXY=y
CONFIG_BT_MESH_ADV_EXT_GATT_SEPARATE=y
CONFIG_BT_MESH_DK_PROV=y
CONFIG_BT_MESH_NLC_PERF_CONF=y
CONFIG_BT_MESH_NLC_PERF_LIGHTNESS_CTRL=y
CONFIG_BT_MESH_MODEL_EXTENSIONS=y
CONFIG_BT_MESH_MODEL_EXTENSION_LIST_SIZE=18
# Enabling BT_MESH_NLC_PERF_CONF enables support for 3 application keys by
# default. Therefore, allow up to 3 application key bindings per model instance.
CONFIG_BT_MESH_MODEL_KEY_COUNT=3

# Bluetooth Mesh models
CONFIG_BT_MESH_LIGHT_CTRL_SRV=y
CONFIG_BT_MESH_LIGHT_CTRL_SRV_TIME_ON=3
CONFIG_BT_MESH_LIGHT_CTRL_SRV_TIME_PROLONG=3
CONFIG_BT_MESH_LIGHT_CTRL_SRV_RESUME_DELAY=30
CONFIG_BT_MESH_SCENE_SRV=y
CONFIG_BT_MESH_SENSOR_SRV=y

# STEP 2.2 - Enable FOTA over Bluetooth LE
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

# Enable updates for the network core
CONFIG_NRF53_UPGRADE_NETWORK_CORE=y&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;./sysbuild/mcuboot.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;# STEP 6.2 - MCUboot should use external flash
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_BOOT_MAX_IMG_SECTORS=256

# Enable PCD command to read network core application version
CONFIG_FW_INFO=y
CONFIG_PCD_READ_NETCORE_APP_VERSION=y

# Enable Debug Log
CONFIG_MCUBOOT_LOG_LEVEL_DBG=y&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;./sysbuild/b0n.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Enable PCD command to read network core application version
CONFIG_PCD_READ_NETCORE_APP_VERSION=y&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;./sysbuild/ipc_radio/prj.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

CONFIG_MBOX=y
CONFIG_IPC_SERVICE=y

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_MAX_CONN=16

# Copy controller configuration from prj.conf
CONFIG_BT_CTLR_LE_ENC=n
CONFIG_BT_CTLR_CHAN_SEL_2=n
CONFIG_BT_CTLR_MIN_USED_CHAN=n
CONFIG_BT_CTLR_PRIVACY=n

# Enables the extended advertising API support and the necessary amount of advertising sets
# in the Bluetooth controller on the network core required by the Bluetooth Mesh.
CONFIG_BT_EXT_ADV=y
CONFIG_BT_EXT_ADV_MAX_ADV_SET=5

CONFIG_IPC_RADIO_BT=y
CONFIG_IPC_RADIO_BT_HCI_IPC=y

# Step 9.2 - Enable logs in netcore so we can verify the update
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_LOG=y

# Enable version number of the firmware
CONFIG_FW_INFO_FIRMWARE_VERSION=2

# Enable logs in netcore
CONFIG_IPC_RADIO_LOG_LEVEL_WRN=y&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&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: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/529086?ContentTypeID=1</link><pubDate>Wed, 26 Mar 2025 14:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdc1158f-93c5-4f47-9308-e2ac03f3c4aa</guid><dc:creator>AHaug</dc:creator><description>[quote user="a.da"]Thank you for your detailed explanation. I also apologize for my inadequate explanation.[/quote][quote user="a.da"]Yes, I understand how to enable Software-based downgrade protection.[/quote]
&lt;p&gt;No worries, happy to discuss it further&lt;/p&gt;
[quote user="a.da"]&lt;p&gt;Do you mean to set it up as follows?&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;App Core ( ./sysbuild.conf )&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&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;/li&gt;
&lt;li&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;Net Core ( ./sysbuild/&amp;lt;netcore_name&amp;gt;/prj.conf&amp;nbsp;)&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;[/quote]
&lt;p&gt;I did a revisit to my investigation yesterday, and I think my conclusion has changed somewhat. I was under the impression that we supported individual app and netcore versioning and downgrade protection, but it looks to be as you said initially, i.e this:&lt;/p&gt;
[quote user="a.da"]By simply changing &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;#39;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&amp;#39;&lt;/span&gt;, can we enable Hardware-based downgrade protection on both App Core and Net Core?&lt;br /&gt;I believe that the combination of App Core and Net Core versions must always match.[/quote]
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/148712e7b4618aadbedd04e8d3ce5c3847d3be4f/boot/bootutil/src/loader.c#L1063"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/148712e7b4618aadbedd04e8d3ce5c3847d3be4f/boot/bootutil/src/loader.c#L1063&lt;/a&gt;&amp;nbsp;shows that downgrade protection for netcore is only valid in a multi image update for the nrf5340, i.e a simultaneous update.&lt;/p&gt;
&lt;p&gt;Conclusion:&lt;/p&gt;
&lt;p&gt;These configurations works for both cores and must be maintained similarly. App and netcore versions must match to enable downgrade protection on both cores since it requires simultaneous multi-image update to work.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Does this still resonate with your understanding?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Andreas&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/528967?ContentTypeID=1</link><pubDate>Wed, 26 Mar 2025 07:24:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4362fcc9-af07-4d76-98e5-1b827a88f344</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;Thank you for your detailed explanation. I also apologize for my inadequate explanation.&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/528821"]It implies it but it does not necessarily enable it as you can have firmware versions without enabling downgrade protection.[/quote]
&lt;p&gt;Yes, I understand how to enable Software-based downgrade protection.&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/528821"]To my understanding, this means you can have different counters for the different slots, and if you intend to only upgrade the app core you need to increment the counter for the image corresponding to the app core, and respectively the same for the counter for the netcore when you upgrade the firmware in the netcore.[/quote]
&lt;p&gt;Do you mean to set it up as follows?&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;App Core ( ./sysbuild.conf )&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&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;/li&gt;
&lt;li&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;Net Core ( ./sysbuild/&amp;lt;netcore_name&amp;gt;/prj.conf&amp;nbsp;)&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/528821"]I&amp;#39;ve not seen anything indicating that you need to do this, since you can have separate counters for both.[/quote]
&lt;p&gt;The term &amp;#39;version&amp;#39; was not appropriate.&lt;br /&gt;I understand that we need to prevent inconsistencies in the configuration (Project / Source Code) in which the software was built.&lt;/p&gt;
&lt;p&gt;Kind regards,&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: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/528821?ContentTypeID=1</link><pubDate>Tue, 25 Mar 2025 11:41:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:872687a8-6323-449a-a1e4-8e645bb89083</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="a.da"]I have already referred to that page.[/quote]
&lt;p&gt;Great!&lt;/p&gt;
[quote user="a.da"]The need to change &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;#39;CONFIG_FW_INFO_FIRMWARE_VERSION&amp;#39;&lt;/span&gt; means that Net Core has Software-based downgrade protection enabled, right?[/quote]
&lt;p&gt;It implies it but it does not necessarily enable it as you can have firmware versions without enabling downgrade protection.&lt;/p&gt;
&lt;p&gt;For software-based downgrade protection you need CONFIG_MCUBOOT_DOWNGRADE_PREVENTION enabled for the mcuboot image (i.e within sysbuild/mcuboot.conf or sysbuild/mcuboot/mcuboot.conf) and&amp;nbsp;SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y enabled in sysbuild.conf for &amp;quot;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/kconfig/index.html#CONFIG_MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY"&gt;CONFIG_MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY&lt;/a&gt;&amp;nbsp;(see&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/nrf/app_dev/config_and_build/sysbuild/sysbuild_forced_options.html"&gt;Sysbuild forced options&lt;/a&gt;)&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;MCUboot has been configured to just overwrite primary slot&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;MCUboot will take contents of secondary slot of an image and will overwrite primary slot with it. In this mode it is not possible to revert back to previous version as it is not stored in the secondary slot. This mode supports MCUBOOT_BOOTLOADER_NO_DOWNGRADE which means that the overwrite will not happen unless the version of secondary slot is higher than the version in primary slot.&amp;quot;&lt;/p&gt;
[quote user="a.da"]By simply changing &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;#39;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&amp;#39;&lt;/span&gt;, can we enable Hardware-based downgrade protection on both App Core and Net Core?[/quote]
&lt;p&gt;CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION enables&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/kconfig/index.html#CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION"&gt;Downgrade prevention using hardware security counters&lt;/a&gt;&amp;nbsp;meaning you can use the counter values from&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS, i.e&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/kconfig/index.html#CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS"&gt;CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_SLOTS&lt;/a&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE i.e&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.0/page/kconfig/index.html#CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE"&gt;CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&lt;/a&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To my understanding, this means you can have different counters for the different slots, and if you intend to only upgrade the app core you need to increment the counter for the image corresponding to the app core, and respectively the same for the counter for the netcore when you upgrade the firmware in the netcore.&lt;/p&gt;
&lt;p&gt;Furthermore in&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/148712e7b4618aadbedd04e8d3ce5c3847d3be4f/boot/bootutil/src/loader.c#L1063"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/148712e7b4618aadbedd04e8d3ce5c3847d3be4f/boot/bootutil/src/loader.c#L1063&lt;/a&gt;&amp;nbsp;you can see&amp;nbsp;pcd_version_cmp_net() which checks the netcore version in MCUboot, i.e MCUBoot checks the versioning for you and it checks it different than the application version number, i.e through&amp;nbsp;boot_version_cmp (L1066 and L:1068).&lt;/p&gt;
[quote user="a.da"]I believe that the combination of App Core and Net Core versions must always match.[/quote]
&lt;p&gt;I&amp;#39;ve not seen anything indicating that you need to do this, since you can have separate counters for both. I know that you can have different firmware versioning for appcore and netcore based on&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/148712e7b4618aadbedd04e8d3ce5c3847d3be4f/boot/bootutil/src/loader.c#L1063"&gt;https://github.com/nrfconnect/sdk-mcuboot/blob/148712e7b4618aadbedd04e8d3ce5c3847d3be4f/boot/bootutil/src/loader.c#L1063&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/528516?ContentTypeID=1</link><pubDate>Mon, 24 Mar 2025 00:53:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08c165e1-d8f3-4b85-8150-f761367aaaf8</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi Andreas, thanks for your reply.&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/528425"]I&amp;#39;ve picked up your case and will be looking into it early next week.[/quote]
&lt;p&gt;I appreciate your assistance.&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/120026/hardware-based-downgrade-protection-in-nrf5340/528425"]As a starter I was hoping you could have a look at&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/115530/config_mcuboot_hardware_downgrade_prevention-in-nrf5340-multi-update" data-contentid="fd4cca594b5b4d2095a731020ca777d5" data-contenttypeid="46448885d0e64133bbfbf0cd7b0fd6f7" class="ui-contentpeek internal-link"&gt;CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION in NRF5340 multi update&lt;/a&gt;&amp;nbsp;and see if the solution in this case and/or the case this one refers to is of any help in resolve the issues you&amp;#39;re observing with the netcore downgrade protection not being enabled?[/quote]
&lt;p&gt;I have already referred to that page. &lt;br /&gt;The need to change &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;#39;CONFIG_FW_INFO_FIRMWARE_VERSION&amp;#39;&lt;/span&gt; means that Net Core has Software-based downgrade protection enabled, right?&lt;br /&gt;By simply changing &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;#39;SB_CONFIG_MCUBOOT_HW_DOWNGRADE_PREVENTION_COUNTER_VALUE&amp;#39;&lt;/span&gt;, can we enable Hardware-based downgrade protection on both App Core and Net Core?&lt;br /&gt;I believe that the combination of App Core and Net Core versions must always match.&lt;br /&gt;Therefore, if we want to implement downgrade protection, I think it needs to be enabled on both App Core and Net Core.&lt;br /&gt;Also, it is preferable to have a single piece of information that manages the combination.&lt;/p&gt;
&lt;p&gt;Kind regards,&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: Hardware-based downgrade protection in nRF5340</title><link>https://devzone.nordicsemi.com/thread/528425?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2025 14:10:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b1dce3a-a70b-4d26-b666-90df9946d71f</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi a.da&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve picked up your case and will be looking into it early next week. As a starter I was hoping you could have a look at&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/115530/config_mcuboot_hardware_downgrade_prevention-in-nrf5340-multi-update"&gt;CONFIG_MCUBOOT_HARDWARE_DOWNGRADE_PREVENTION in NRF5340 multi update&lt;/a&gt;&amp;nbsp;and see if the solution in this case and/or the case this one refers to is of any help in resolve the issues you&amp;#39;re observing with the netcore downgrade protection not being enabled?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>