<?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: s32k144 CSEC_DRV_Init SDK function question in S32K</title>
    <link>https://community.nxp.com/t5/S32K/s32k144-CSEC-DRV-Init-SDK-function-question/m-p/1324711#M11712</link>
    <description>&lt;P&gt;Hi Phillip,&lt;/P&gt;
&lt;P&gt;the problem is that CSEC_DRV_Init() starts the OSIF / Systick. Erase operation takes relatively a lot of time, so OSIF / Systick interrupt is triggered during the erase. If you run the code from RAM, it is not problem. If you run the code from flash, it leads to read-while-write error because it is not possible to access the program flash during erase operation.&lt;/P&gt;
&lt;P&gt;Solution is to disable interrupts by PRIMASK during the erase or disable OSIF / Systick.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Tue, 17 Aug 2021 11:37:47 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2021-08-17T11:37:47Z</dc:date>
    <item>
      <title>s32k144 CSEC_DRV_Init SDK function question</title>
      <link>https://community.nxp.com/t5/S32K/s32k144-CSEC-DRV-Init-SDK-function-question/m-p/1324316#M11708</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found after CSEC_DRV_Init() function called, Flash Drv functions don't work.&lt;/P&gt;&lt;P&gt;I tried csec_keyconfig_s32k144 example project.&lt;/P&gt;&lt;P&gt;And I add some flash drv code for test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kmh48301_1-1629174933781.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153069i4DDA20C0C41948B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kmh48301_1-1629174933781.png" alt="kmh48301_1-1629174933781.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;kmh48301_1-1629174933781.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I run this project in Debug_Flash mode.&lt;/P&gt;&lt;P&gt;when I run 'Flash_DRV_EraseSector()', this exception is occurred.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kmh48301_2-1629175084671.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153070i25976AC7126D8DAA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kmh48301_2-1629175084671.png" alt="kmh48301_2-1629175084671.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;kmh48301_2-1629175084671.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when I run this project in Debug_RAM mode, it just works normally.&lt;/P&gt;&lt;P&gt;Plus when I don't excecute 'CSEC_DRV_Init', it also works normally.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already tried 'CSEC_DRV_Deinit'. But same exception was occurred.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;** Secure Boot is activated on my board. **&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Phillip&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 04:43:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k144-CSEC-DRV-Init-SDK-function-question/m-p/1324316#M11708</guid>
      <dc:creator>kmh48301</dc:creator>
      <dc:date>2021-08-17T04:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: s32k144 CSEC_DRV_Init SDK function question</title>
      <link>https://community.nxp.com/t5/S32K/s32k144-CSEC-DRV-Init-SDK-function-question/m-p/1324711#M11712</link>
      <description>&lt;P&gt;Hi Phillip,&lt;/P&gt;
&lt;P&gt;the problem is that CSEC_DRV_Init() starts the OSIF / Systick. Erase operation takes relatively a lot of time, so OSIF / Systick interrupt is triggered during the erase. If you run the code from RAM, it is not problem. If you run the code from flash, it leads to read-while-write error because it is not possible to access the program flash during erase operation.&lt;/P&gt;
&lt;P&gt;Solution is to disable interrupts by PRIMASK during the erase or disable OSIF / Systick.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 11:37:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k144-CSEC-DRV-Init-SDK-function-question/m-p/1324711#M11712</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-08-17T11:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: s32k144 CSEC_DRV_Init SDK function question</title>
      <link>https://community.nxp.com/t5/S32K/s32k144-CSEC-DRV-Init-SDK-function-question/m-p/1324999#M11713</link>
      <description>&lt;P&gt;Hi Lukas.&lt;/P&gt;&lt;P&gt;Thank you so much for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two more questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Does CSEC use OSIF? Why?&lt;/P&gt;&lt;P&gt;When I delete the "OSIF_TimeDelay(0U);" in "CSEC_DRV_Init", Flashing works well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Can you please let me know how to&amp;nbsp;&lt;SPAN&gt;disable interrupts by PRIMASK during the erase &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; or disable OSIF / Systick?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Phillip&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 23:17:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k144-CSEC-DRV-Init-SDK-function-question/m-p/1324999#M11713</guid>
      <dc:creator>kmh48301</dc:creator>
      <dc:date>2021-08-17T23:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: s32k144 CSEC_DRV_Init SDK function question</title>
      <link>https://community.nxp.com/t5/S32K/s32k144-CSEC-DRV-Init-SDK-function-question/m-p/1325600#M11720</link>
      <description>&lt;P&gt;Hi Phillip,&lt;/P&gt;
&lt;P&gt;the CSEc driver uses OSIF for timeouts. You can check the source code.&lt;/P&gt;
&lt;P&gt;To disable Systick, you can use:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;S32_SysTick-&amp;gt;CSR = S32_SysTick_CSR_ENABLE(0u) | S32_SysTick_CSR_TICKINT(0u);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To disable/enable interrupts, you can use:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ENABLE_INTERRUPTS();&amp;nbsp;&amp;nbsp; // &amp;nbsp;or __asm("cpsie i");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DISABLE_INTERRUPTS();&amp;nbsp; // &amp;nbsp;or __asm("cpsid i");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Lukas&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 16:32:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k144-CSEC-DRV-Init-SDK-function-question/m-p/1325600#M11720</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-08-18T16:32:49Z</dc:date>
    </item>
  </channel>
</rss>

