<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HSE S32K312 SHE based secure boot in S32K</title>
    <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1843776#M33994</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for providing me with test code. I will try this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shravani&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2024 08:19:38 GMT</pubDate>
    <dc:creator>shravani</dc:creator>
    <dc:date>2024-04-10T08:19:38Z</dc:date>
    <item>
      <title>HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1841187#M33852</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to achieve SHE based secure boot using S32K312 microcontroller. My aim is to load the keys to secure NVM of HSE. For loading the keys, I am generating M1, M2 and M3 messages using Miyaguchi-Preneel Compression protocol and AES encryption. I am getting&amp;nbsp;HSE_SRV_RSP_INVALID_PARAM as a response from HSE.&amp;nbsp;&lt;BR /&gt;Please check below details.&lt;BR /&gt;1) Microcontroller : S32K312_100MQFP&lt;/P&gt;&lt;P&gt;2) IDE: S32DS 3.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;3) SDK Version:&amp;nbsp;PlatformSDK_S32K3_2022_03&lt;/P&gt;&lt;P&gt;Steps I am following :&lt;/P&gt;&lt;P&gt;1) Key Catalogue Formatting -&amp;gt; Getting&amp;nbsp; HSE_SRV_RSP_OK&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Load She keys to Secure NVM&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.1. Loading ECU_MASTER_KEY&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2.1.1&amp;nbsp;Miyaguchi-Preneel Compression&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;API :&amp;nbsp;Crypto_Exts_MPCompression(constArr, (uint32)(AES_BLOCK_SIZE * 2), K1, ConstOutLen)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Parameters:&amp;nbsp;constArr -&amp;gt;&amp;nbsp;const uint8_t *constArr This is input data&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;(uint32)(AES_BLOCK_SIZE * 2) -&amp;gt; Size of input data which is 32 bytes.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;K1 -&amp;gt;&amp;nbsp; const uint8_t K1[AES_BLOCK_SIZE * 2]; -&amp;gt; output&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ConstOutLen -&amp;gt;&amp;nbsp;const uint32_t *ConstOutLen -&amp;gt; length of the output&lt;/P&gt;&lt;P&gt;Any help on this topic is highly recommended.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 09:35:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1841187#M33852</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-05T09:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1843612#M33984</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227526"&gt;@shravani&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I got attached test code which shows how to generate M1-M3 values using Crypto layer. There's a function Crypto_CalculatedM1M2M3().&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 06:04:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1843612#M33984</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2024-04-10T06:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1843776#M33994</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for providing me with test code. I will try this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shravani&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 08:19:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1843776#M33994</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-10T08:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1844760#M34030</link>
      <description>Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I got HSE_SRV_RSP_OK for Crypto_CalculatedM1M2M3(). but while calling Crypto_KeyElementSet(ECU_MASTER_KEY_ID, SHE_KEY_MATERIAL_ELEMENT_ID, KeyPram, SHE_M1M2M3_SIZE) I am getting HSE_SRV_RSP_KEY_INVALID.&lt;BR /&gt;ECU_MASTER_KEY_ID = 0&lt;BR /&gt;SHE_KEY_MATERIAL_ELEMENT_ID = 1&lt;BR /&gt;I have set HSE flag as VERIFY.&lt;BR /&gt;What could be the reason? Can you please guide me?</description>
      <pubDate>Thu, 11 Apr 2024 04:19:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1844760#M34030</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-11T04:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1844940#M34043</link>
      <description>&lt;P&gt;ECU_MASTER_KEY_ID is defined as 1 in the SHE spec. Isn't this the problem?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 07:55:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1844940#M34043</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2024-04-11T07:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1844998#M34046</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I tried with 1 as well but no change in results. Please check below configuration.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shravani_0-1712824534149.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273112iEAA68B077B3031F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shravani_0-1712824534149.png" alt="shravani_0-1712824534149.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shravani_1-1712824600203.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273113iF946DAA546AD7C50/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shravani_1-1712824600203.png" alt="shravani_1-1712824600203.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 08:36:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1844998#M34046</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-11T08:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1845348#M34069</link>
      <description>&lt;P&gt;I'm not sure about this, I'm checking with SW team. It may take some time. &lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 16:27:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1845348#M34069</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2024-04-11T16:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1845737#M34093</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;Okay. Please let me know if you got anything on this topic. It's a bit urgent.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 03:51:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1845737#M34093</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-12T03:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1845855#M34107</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What attributes should we set while loading SHE key to secure NVM. In the RM758221-HSE-B Firmware Reference Manual - V2.1(2.1).pdf it is mentioned as below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shravani_0-1712904659148.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273377i57BDC9FF6A5EA43F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shravani_0-1712904659148.png" alt="shravani_0-1712904659148.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;However, In the configurator I cannot see the WILDCARD and KEY_USAGE flag.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shravani_1-1712904774091.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273379i653B398C9D8CB53C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shravani_1-1712904774091.png" alt="shravani_1-1712904774091.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please guide me on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 06:53:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1845855#M34107</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-12T06:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1846735#M34180</link>
      <description>&lt;P&gt;You can set required flags when calculating M1-M3 values. The function is:&lt;/P&gt;
&lt;P&gt;void Crypto_CalculatedM1M2M3(CONST(uint8, AUTOMATIC) authKey[16], uint8 authKeyId, uint8 keyId, CONST(uint8, AUTOMATIC) key[16], uint32 counter, CONST(uint8, AUTOMATIC) uid[15], uint8 flags, VAR(uint8, AUTOMATIC) KeyPram[64])&lt;/P&gt;
&lt;P&gt;Parameter 'uint8 flags' should be used. The order of bits is:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1713159539711.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273645i15FFA33A07B667AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1713159539711.png" alt="lukaszadrapa_0-1713159539711.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For example, if you want to set VERIFY_ONLY, the 'flags' should be 0x01.&lt;/P&gt;
&lt;P&gt;There are no general rules which flags should be set, it depends on your requirements and on your application.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;P&gt;PS. Still waiting for response from SW team...&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 05:41:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1846735#M34180</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2024-04-15T05:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1846757#M34184</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;,&lt;BR /&gt;Thank you for the clarification.&lt;BR /&gt;I am getting HSE_SRV_RSP_KEY_INVALID&amp;nbsp;while caling RetVal = Crypto_KeyElementSet(ECU_MASTER_KEY_ID, SHE_KEY_MATERIAL_ELEMENT_ID, KeyPram, 64)&lt;/P&gt;&lt;P&gt;for this error it says in SHE, the key ID provided is either invalid or non-usable due to some flag restrictions. */&lt;/P&gt;&lt;P&gt;I am following example which you shared&amp;nbsp;&lt;SPAN&gt;Crypto_CalculatedM1M2M3 and giving the flag value as 0 and configured the value as VERIFY ONLY from the configurator for the key. I tried by changing these 0 values to 1 for but still error is same.&lt;BR /&gt;&lt;BR /&gt;P.S. I am able to load the key in plain format. But when encryption is applied, error is coming.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 06:05:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1846757#M34184</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-15T06:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1848003#M34258</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you got any update?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 09:54:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1848003#M34258</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-16T09:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1849036#M34316</link>
      <description>&lt;P&gt;Still waiting... I'm also checking if there's an option to provide direct support from local FAE team.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 12:33:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1849036#M34316</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2024-04-17T12:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1849103#M34318</link>
      <description>&lt;P&gt;Some update: provided code was intended mainly for S32K1 and its CSEc. So, make sure that "CSEC" is not defined because EmptyKey needs to be all '0' for HSE:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;#ifdef CSEC&lt;BR /&gt;static uint8 au8EmptyKey[SHE_KEY_SIZE] =&lt;BR /&gt;{&lt;BR /&gt;0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,&lt;BR /&gt;0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff&lt;BR /&gt;};&lt;BR /&gt;#else&lt;BR /&gt;/* Array to be passed to Crypto driver during various operations as output buffer */&lt;BR /&gt;static uint8 au8EmptyKey[SHE_KEY_SIZE] =&lt;BR /&gt;{&lt;BR /&gt;0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00&lt;BR /&gt;};&lt;BR /&gt;#endif&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;And next thing - CSEc on S32K1 has either 5 or 6 attribute key flags. SHE define 5 flags and there could be one more flag enabled (VERIFY_ONLY). HSE always expects 6 flags. But I can see that the code expects 5 flags only:&lt;/P&gt;
&lt;P&gt;aM2Plain[3] |= (flags &amp;amp; 0x1e) &amp;gt;&amp;gt; 1U;&lt;BR /&gt;aM2Plain[4] |= (flags &amp;amp; 0x01) &amp;lt;&amp;lt; 7U;&lt;/P&gt;
&lt;P&gt;You can update it to this:&lt;BR /&gt;aM2Plain[3] |= (flags &amp;amp; 0x3c) &amp;gt;&amp;gt; 2U;&lt;BR /&gt;aM2Plain[4] |= (flags &amp;amp; 0x03) &amp;lt;&amp;lt; 6U;&lt;/P&gt;
&lt;P&gt;To understand where it goes - there's 28bit counter in M2 value and then the flags...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1713363015197.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/274299i52387F29B139D4F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1713363015197.png" alt="lukaszadrapa_0-1713363015197.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But if you used flags=0, I don't think this will make a difference.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 14:12:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1849103#M34318</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2024-04-17T14:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1849527#M34333</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share configuration file (.mex) for the SHE memory update protocol? So that I could check what I am doing wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 06:02:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1849527#M34333</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-18T06:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: HSE S32K312 SHE based secure boot</title>
      <link>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1853363#M34595</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to load keys to secure NVM by adding key data in non-cacheable memory.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 10:09:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HSE-S32K312-SHE-based-secure-boot/m-p/1853363#M34595</guid>
      <dc:creator>shravani</dc:creator>
      <dc:date>2024-04-24T10:09:16Z</dc:date>
    </item>
  </channel>
</rss>

