<?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>S32 SDK中的主题 Re: CSEC on S32K118 csec_flash part example</title>
    <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1427772#M2444</link>
    <description>&lt;P&gt;Yes, that's correct.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Mon, 14 Mar 2022 13:52:56 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2022-03-14T13:52:56Z</dc:date>
    <item>
      <title>CSEC on S32K118 csec_flash part example</title>
      <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1426126#M2434</link>
      <description>&lt;P&gt;I am working on S32K118. I am trying to run aes encryption using csec module.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Followed by manual and this post :&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32-SDK/STATUS-ERROR-on-CSEC-DRV-LoadPlainKey/td-p/1075577" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/S32-SDK/STATUS-ERROR-on-CSEC-DRV-LoadPlainKey/td-p/1075577&lt;/A&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;I am trying to run&amp;nbsp;csec_flash part example to run flash for csec.&lt;/P&gt;&lt;P&gt;But I got ACCERR(access error) from&amp;nbsp;FLASH_DRV_EraseAllBlock.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my flash config and code snippet. :&amp;nbsp;&lt;/P&gt;&lt;P&gt;static const flash_user_config_t flash1_InitConfig0= {&lt;BR /&gt;.PFlashBase = 0x00000000U,&lt;BR /&gt;.PFlashSize = 0x00180000U,&lt;BR /&gt;.DFlashBase = 0x10000000U,&lt;BR /&gt;.EERAMBase = 0x14000000U,&lt;BR /&gt;.CallBack = NULL_CALLBACK&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;flash_ssd_config_t flashSSDConfig;&lt;/P&gt;&lt;P&gt;FLASH_DRV_Init(&amp;amp;flash1_InitConfig0, &amp;amp;flashSSDConfig);&lt;/P&gt;&lt;P&gt;FLASH_DRV_EraseAllBlock(&amp;amp;flashSSDConfig);&amp;nbsp; &amp;nbsp; // &amp;lt;-- ACCERR&lt;/P&gt;&lt;P&gt;Because of this problem I am unable to run csec module means calling :&amp;nbsp;&lt;/P&gt;&lt;P&gt;FLASH_DRV_Program and&amp;nbsp;FLASH_DRV_DEFlashPartition functions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts where the problem is? The flash config is wrong? What is the purpose of block erasing?&lt;/P&gt;&lt;P&gt;And the second question:&lt;/P&gt;&lt;P&gt;From manual :&amp;nbsp;&lt;/P&gt;&lt;P&gt;"After clearing CCIF to launch the Erase All Blocks command, the FTFC erases all&lt;BR /&gt;program flash memory, data flash memory, data flash IFR space, emulated EEPROM&lt;BR /&gt;backup memory, and FlexRAM, then verifies that all are erased."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How I should understand erasing all program and data flash memory in runtime of my application?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Piotr&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:05:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1426126#M2434</guid>
      <dc:creator>piotrhawrylo</dc:creator>
      <dc:date>2022-03-10T13:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: CSEC on S32K118 csec_flash part example</title>
      <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1426855#M2439</link>
      <description>&lt;P&gt;Hi Piotr,&lt;/P&gt;
&lt;P&gt;cse_flash_part example must be executed from RAM memory as mentioned in the user manual. The goal of this example is to reset the flash back to default state and run partition command to enable Emulated EEPROM and CSEc.&lt;/P&gt;
&lt;P&gt;Once the partition command is executed (and CSE is enabled by this command), it's not possible to run the Erase All Blocks command again until the partition is destroyed by CMD_DBG_CHAL and CMD_DBG_AUTH commands:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1646997363564.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/173223i2109785E669C69F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1646997363564.png" alt="lukaszadrapa_0-1646997363564.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most likely, this is the source of problem you have. I guess that you have the cse_flash_part already executed.&lt;/P&gt;
&lt;P&gt;To continue with CSE, you do not need to erase the flash again. Just go ahead and use example csec_keyconfig.&lt;/P&gt;
&lt;P&gt;If you want to destroy the partition as I mentioned above, run csec_keyconfig again but change ERASE_ALL_KEYS to 1:&lt;/P&gt;
&lt;P&gt;#define ERASE_ALL_KEYS 1&lt;/P&gt;
&lt;P&gt;You can find this in main.c file.&lt;/P&gt;
&lt;P&gt;If the device was already partitioned by someone else, it's necessary to know MASTER_ECU_KEY, otherwise you won't be able to destroy the partition.&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>Fri, 11 Mar 2022 11:21:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1426855#M2439</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2022-03-11T11:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: CSEC on S32K118 csec_flash part example</title>
      <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1427691#M2443</link>
      <description>&lt;P&gt;Hi Lukas,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one more question. My understanding is that on manufactory, we need to run csec_flash_part code before loading firmware to flash memory. Otherwise it will be erased on the first run.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am correct?&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Piotr&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 10:49:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1427691#M2443</guid>
      <dc:creator>piotrhawrylo</dc:creator>
      <dc:date>2022-03-14T10:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: CSEC on S32K118 csec_flash part example</title>
      <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1427772#M2444</link>
      <description>&lt;P&gt;Yes, that's correct.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 13:52:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1427772#M2444</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2022-03-14T13:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: CSEC on S32K118 csec_flash part example</title>
      <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1434673#M2468</link>
      <description>&lt;P&gt;I ran&amp;nbsp;&lt;SPAN&gt;cse_flash_part example from RAM. Now I have locked flash config registers. :&amp;nbsp;"Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set". This address quite confuses me, I expect that other area of flash will be locked.&amp;nbsp;&amp;nbsp;0x400 - 0x40F are flash config registers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have above info from debugger, and now I cannot load any program on the device, also only to the RAM memory.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;This is expected situation?&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I disabled erase before download option, because as I know, I cannot erase flash after partition command.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am wondering how to go further with configuring csec if I cannot load or connect with device using debugger. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PH&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 09:28:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1434673#M2468</guid>
      <dc:creator>piotrhawrylo</dc:creator>
      <dc:date>2022-03-28T09:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: CSEC on S32K118 csec_flash part example</title>
      <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1434778#M2473</link>
      <description>&lt;P&gt;I ran&amp;nbsp;&lt;SPAN&gt;cse_flash_part example from RAM. Now I have locked flash config registers. :&amp;nbsp;"Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set". This address quite confuses me, I expect that other area of flash will be locked.&amp;nbsp;&amp;nbsp;0x400 - 0x40F are flash config registers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have above info from debugger, and now I cannot load any program on the device, also only to the RAM memory.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;This is expected situation?&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I disabled erase before download option, because as I know, I cannot erase flash after partition command.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am wondering how to go further with configuring csec if I cannot load or connect with device using debugger.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PH&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 10:57:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1434778#M2473</guid>
      <dc:creator>piotrhawrylo</dc:creator>
      <dc:date>2022-03-28T10:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: CSEC on S32K118 csec_flash part example</title>
      <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1435242#M2474</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;"I have above info from debugger, and now I cannot load any program on the device, also only to the RAM memory. "&lt;/P&gt;
&lt;P&gt;I'm not sure if I can understand this question - are you able to load a program to the RAM memory or not?&lt;/P&gt;
&lt;P&gt;If the partition is set (CSE is enabled) AND if flash configuration field is somehow corrupted AND if you can't establish JTAG/SWD connection ever, I'm afraid that there's no way to recover.&lt;/P&gt;
&lt;P&gt;If you are able to load a program to the RAM, run csec_keyconfig project with ERASE_ALL_KEYS set to 1.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 06:20:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1435242#M2474</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2022-03-29T06:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: CSEC on S32K118 csec_flash part example</title>
      <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1435267#M2475</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I can't load program to the RAM also.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So from your answer I understand that this is not expected situation that flash config fields are locked?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any thoughts why after running&amp;nbsp;&lt;SPAN&gt;cse_flash_part example from RAM device is corrupted?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is possibility to run csec using simulator of device?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BR,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Piotr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 07:31:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1435267#M2475</guid>
      <dc:creator>piotrhawrylo</dc:creator>
      <dc:date>2022-03-29T07:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: CSEC on S32K118 csec_flash part example</title>
      <link>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1435341#M2476</link>
      <description>&lt;P&gt;No, this is not expected situation. I did a lot of tests with these projects, testing all possible situations and combinations, also using different debuggers and it was always working as expected. Not sure what happened on your side.&lt;/P&gt;
&lt;P&gt;There's no simulator for this device.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 08:00:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/CSEC-on-S32K118-csec-flash-part-example/m-p/1435341#M2476</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2022-03-29T08:00:06Z</dc:date>
    </item>
  </channel>
</rss>

