<?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: Debug S32K144 CSEc  example issues</title>
    <link>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1678474#M24558</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213999"&gt;@feiyiniu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;that's weird behavior, this should not happen. Did you execute this project from RAM memory? Do you remember what was returned by configure_part_CSEc() first time? Could you check what is the content of FCFG1 register in SIM module?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2023 07:28:17 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2023-06-29T07:28:17Z</dc:date>
    <item>
      <title>Debug S32K144 CSEc  example issues</title>
      <link>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1678171#M24543</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I used the official S32K144 CSEc example to debug.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;software:Configure_part_and_Load_keys&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;chip:FS32K144HAMLL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, while executing the following statement&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="feiyiniu_0-1688000017757.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/229919iFB1433075F9DC48D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="feiyiniu_0-1688000017757.png" alt="feiyiniu_0-1688000017757.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;The default interrupt is entered,as follow&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="feiyiniu_3-1688000538116.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/229921i82DD4AB9FFDFA203/image-size/medium?v=v2&amp;amp;px=400" role="button" title="feiyiniu_3-1688000538116.png" alt="feiyiniu_3-1688000538116.png" /&gt;&lt;/span&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;What is the reason for this?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;Thanks!&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 01:03:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1678171#M24543</guid>
      <dc:creator>feiyiniu</dc:creator>
      <dc:date>2023-06-29T01:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Debug S32K144 CSEc  example issues</title>
      <link>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1678474#M24558</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/213999"&gt;@feiyiniu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;that's weird behavior, this should not happen. Did you execute this project from RAM memory? Do you remember what was returned by configure_part_CSEc() first time? Could you check what is the content of FCFG1 register in SIM module?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 07:28:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1678474#M24558</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2023-06-29T07:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Debug S32K144 CSEc  example issues</title>
      <link>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1678788#M24580</link>
      <description>&lt;P&gt;execute this project from flash memory;&lt;/P&gt;&lt;P&gt;configure_part_CSEc() return 160;&lt;/P&gt;&lt;P&gt;FCFG1 register as follow:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="feiyiniu_1-1688048277456.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/230088i2B7B6FC02770D6C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="feiyiniu_1-1688048277456.png" alt="feiyiniu_1-1688048277456.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 14:18:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1678788#M24580</guid>
      <dc:creator>feiyiniu</dc:creator>
      <dc:date>2023-06-29T14:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Debug S32K144 CSEc  example issues</title>
      <link>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1678875#M24586</link>
      <description>&lt;P&gt;First thing is that the project needs to be executed from RAM memory:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1688058247844.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/230098iE16ECC8B77BA1E58/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1688058247844.png" alt="lukaszadrapa_0-1688058247844.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Second thing is that the device was already partitioned in the past because the values in FCFG1 do not correspond to configuration used in this example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now it depends if CSEc was enabled or not.&lt;/P&gt;
&lt;P&gt;If CSEc was not enabled, you can just run mass erase command and then everything should work as expected. To run mass erase, create new empty project in S32DS and add this code:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) != FTFC_FSTAT_CCIF_MASK); /* Wait until any ongoing flash operation is completed */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTFC-&amp;gt;FSTAT = (FTFC_FSTAT_FPVIOL_MASK | FTFC_FSTAT_ACCERR_MASK);&amp;nbsp; /* Write 1 to clear error flags */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTFC-&amp;gt;FCCOB[3] = 0x49; /* FCCOB0 = 0x49, Erase All Blocks Unsecure command */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTFC-&amp;gt;FSTAT = FTFC_FSTAT_CCIF_MASK; /* Start command execution by writing 1 to clear CCIF bit */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while((FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) != FTFC_FSTAT_CCIF_MASK); /* Wait until ongoing flash operation is completed */&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's important to run this project from RAM memory. Then reset the device and check content of FCFG1 again. If DEPART value is changed to 0xF, it's good result. You can start over using 1_Configure_part_and_Load_keys example and it should work now. But as mentioned above, execute the project from RAM. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If CSEc was enabled in the past, you need to know the MASTER_ECU_KEY. Without this key, it is not possible to destroy the partition and then to run mass erase command. The only way to recover is to run CMD_DBG_CHAL and CMD_DBG_AUTH commands with knowledge of MASTER_ECU_KEY. If you don't know the key, I recommend to use new MCU.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 17:12:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1678875#M24586</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2023-06-29T17:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Debug S32K144 CSEc  example issues</title>
      <link>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1681123#M24731</link>
      <description>&lt;P&gt;Is there a flag to read whether CSEc enabled?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 09:15:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1681123#M24731</guid>
      <dc:creator>feiyiniu</dc:creator>
      <dc:date>2023-07-04T09:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Debug S32K144 CSEc  example issues</title>
      <link>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1681389#M24750</link>
      <description>&lt;P&gt;There's no such flag. If the device is partitioned (you can see this in FCFG1 register), you can check the end of Emulated EERPOM. As mentioned in the AN5401:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1688489340154.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/230743i0D081AFFD62DDCB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1688489340154.png" alt="lukaszadrapa_0-1688489340154.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If CSEc is enabled, this part of EEE is used as a secure storage NVM, so it's removed from memory map and it's not visible for user at all.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If CSEc is disabled, this area is still accessible.&lt;/P&gt;
&lt;P&gt;So, this indirect method can be used.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 16:51:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1681389#M24750</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2023-07-04T16:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Debug S32K144 CSEc  example issues</title>
      <link>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1682837#M24830</link>
      <description>&lt;P&gt;I got it, Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 06:56:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Debug-S32K144-CSEc-example-issues/m-p/1682837#M24830</guid>
      <dc:creator>feiyiniu</dc:creator>
      <dc:date>2023-07-06T06:56:12Z</dc:date>
    </item>
  </channel>
</rss>

