<?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>S32KのトピックRe: FS32K116LAT0MFMT CSEc</title>
    <link>https://community.nxp.com/t5/S32K/FS32K116LAT0MFMT-CSEc/m-p/1820505#M32423</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213197"&gt;@Embedded_novice&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me share a screenshot from AN12130:&lt;BR /&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN12130.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/application-note/AN12130.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1709551097314.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/266279iDB62546F10770A67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1709551097314.png" alt="lukaszadrapa_0-1709551097314.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, this could be one problem. &lt;BR /&gt;Another problem is that J-Link uses mass erase (Erase All Blocks command) when loading new project. But if CSEc is enable, mass erase cannot be used. From the reference manual:&lt;/P&gt;
&lt;P&gt;"NOTE&lt;BR /&gt;For CSEc enabled parts, once Flash Keys are allocated&lt;BR /&gt;(regardless of being initialized or not), the Erase All Blocks&lt;BR /&gt;Unsecure command is blocked from executing. Refer to the&lt;BR /&gt;commands CMD_DBG_CHAL and CMD_DBG_AUTH for the&lt;BR /&gt;procedures to pass a challenge/authentication process which&lt;BR /&gt;will first remove the keys, then (assuming successful execution)&lt;BR /&gt;allow this command to be executed."&lt;/P&gt;
&lt;P&gt;The only way to disable CSEc is to run mentioned CMD_DBG_CHAL and CMD_DBG_AUTH with knowledge of MASTER_ECU_KEY. That's the only option, it can't be just simply erased.&lt;/P&gt;
&lt;P&gt;For example, Pemicro debugger does not use mass erase, it erases the flash block by block, so it works even if CSEc is enabled.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2024 11:18:32 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2024-03-04T11:18:32Z</dc:date>
    <item>
      <title>FS32K116LAT0MFMT CSEc</title>
      <link>https://community.nxp.com/t5/S32K/FS32K116LAT0MFMT-CSEc/m-p/1817399#M32247</link>
      <description>&lt;P&gt;The chip I am using is FS32K116LAT0MFMT. As far as I know, this chip comes with a CSEc module. When I erase the chip, if I erase DFlash (using J-FLASH and default configuration), it will cause FLASH to lock (JLINK cannot connect, cannot simulate, and the RESET pin is a rectangular wave) and cannot be restored (using the unlock command is invalid). I have learned that CSEc's flash key is stored in DFlash. Does this mean that erasing it without any command verification will result in FLASH protection (I learned in the S32K-RM manual that there is a corresponding command to authenticate).&lt;BR /&gt;My question is:&lt;BR /&gt;1. Is there any way for me to recover after erasing DFLASH and possible FLASH keys through abnormal operations?&lt;BR /&gt;2. Can I disable the CSEc function in any way?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 10:05:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FS32K116LAT0MFMT-CSEc/m-p/1817399#M32247</guid>
      <dc:creator>Embedded_novice</dc:creator>
      <dc:date>2024-02-28T10:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: FS32K116LAT0MFMT CSEc</title>
      <link>https://community.nxp.com/t5/S32K/FS32K116LAT0MFMT-CSEc/m-p/1820505#M32423</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213197"&gt;@Embedded_novice&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me share a screenshot from AN12130:&lt;BR /&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN12130.pdf" target="_blank"&gt;https://www.nxp.com/docs/en/application-note/AN12130.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1709551097314.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/266279iDB62546F10770A67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1709551097314.png" alt="lukaszadrapa_0-1709551097314.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, this could be one problem. &lt;BR /&gt;Another problem is that J-Link uses mass erase (Erase All Blocks command) when loading new project. But if CSEc is enable, mass erase cannot be used. From the reference manual:&lt;/P&gt;
&lt;P&gt;"NOTE&lt;BR /&gt;For CSEc enabled parts, once Flash Keys are allocated&lt;BR /&gt;(regardless of being initialized or not), the Erase All Blocks&lt;BR /&gt;Unsecure command is blocked from executing. Refer to the&lt;BR /&gt;commands CMD_DBG_CHAL and CMD_DBG_AUTH for the&lt;BR /&gt;procedures to pass a challenge/authentication process which&lt;BR /&gt;will first remove the keys, then (assuming successful execution)&lt;BR /&gt;allow this command to be executed."&lt;/P&gt;
&lt;P&gt;The only way to disable CSEc is to run mentioned CMD_DBG_CHAL and CMD_DBG_AUTH with knowledge of MASTER_ECU_KEY. That's the only option, it can't be just simply erased.&lt;/P&gt;
&lt;P&gt;For example, Pemicro debugger does not use mass erase, it erases the flash block by block, so it works even if CSEc is enabled.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 11:18:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FS32K116LAT0MFMT-CSEc/m-p/1820505#M32423</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2024-03-04T11:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: FS32K116LAT0MFMT CSEc</title>
      <link>https://community.nxp.com/t5/S32K/FS32K116LAT0MFMT-CSEc/m-p/1820990#M32461</link>
      <description>&lt;P&gt;Hi.&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 saw in the reference manual that CSEc is a feature that requires you to configure an empt EEPROM in DFLASH to enable it, I am not currently configuring EEPROM, which should mean that I am not enabling the CSEc module. At the same time, I also checked the FSEC register in my FTFC register, where the read value shows that batch erase is allowed and it is in insecure mode, which should be the effect of the configuration word that needs to be configured for the address segment 0x400-0x40F you mentioned in the screenshot. However, after I do the chip erase, my chip will lock up and give me some exception at the address 0x400-0x40F, forgive me for not knowing much about this error, but it means that I can't recover it and the chip is completely dead. Have you ever been in this situation? Or do you have any thoughts on how this situation arose&lt;/P&gt;&lt;P&gt;P.S.If I use J-FLASH to erase the chip and only manipulate the PFLASH fields, this problem does not occur. Even though the flash is protected, I can unlock it with the unlock command.So I think it's possible that the CSEc key in DFLASH was erased（My conjecture）&lt;BR /&gt;Because of the poor contact of the SWD debugging pin, the problem of locking will occur after the J-FLASH indicates that the erase is successful and the SWD pin is disconnected immediately.&lt;/P&gt;&lt;P&gt;Thank you very much for your answer to the CSEc module. I hope you can provide some ideas for the subsequent questions. Regardless of whether can solve this problem, all thank you very much for your help.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2024-03-05_09-54-31.png" style="width: 413px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/266406iF92638D8CC2DEBFA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2024-03-05_09-54-31.png" alt="Snipaste_2024-03-05_09-54-31.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snipaste_2024-03-05_09-59-47.png" style="width: 868px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/266407iBA3C2A4396627094/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2024-03-05_09-59-47.png" alt="Snipaste_2024-03-05_09-59-47.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 02:19:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FS32K116LAT0MFMT-CSEc/m-p/1820990#M32461</guid>
      <dc:creator>Embedded_novice</dc:creator>
      <dc:date>2024-03-05T02:19:19Z</dc:date>
    </item>
  </channel>
</rss>

