<?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: S32DS for ARM 2.2 - Flash erase &amp; program problem</title>
    <link>https://community.nxp.com/t5/S32-SDK/S32DS-for-ARM-2-2-Flash-erase-program-problem/m-p/1044879#M1618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Matthew, &lt;/P&gt;&lt;P&gt;Could you please create a new thread?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Aug 2020 08:35:09 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2020-08-20T08:35:09Z</dc:date>
    <item>
      <title>S32DS for ARM 2.2 - Flash erase &amp; program problem</title>
      <link>https://community.nxp.com/t5/S32-SDK/S32DS-for-ARM-2-2-Flash-erase-program-problem/m-p/1044876#M1615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use S32K148 with S32DS driver SDK3.0.2 to implement the application erasing and reprogramming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. when I use the following functions:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FLASH_DRV_EraseSector(&amp;amp;flashSSDConfig, 0x10000, 4096);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FLASH_DRV_Program(&amp;amp;flashSSDConfig, 0x10000, 4096, data_ptr);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt;&amp;gt; It stucks and triggers lockup reset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I realize that interrupts SHOULD be disabled first:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;INT_SYS_DisableIRQGlobal();&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;FLASH_DRV_EraseSector(&amp;amp;flashSSDConfig,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;0x10000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;4096&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;FLASH_DRV_Program(&amp;amp;flashSSDConfig,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;0x10000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;4096&lt;/SPAN&gt;&lt;SPAN&gt;, data_ptr);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;INT_SYS_EnableIRQGlobal();&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt;&amp;gt; It works fine and it takes around 30ms to finish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. However, it comes up the problem in time critical system.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;We use also Flexcan to communicate with client and heart-beat message should be sent periodically in every 4ms maximum. It's implemented using interrupts (both rx and tx).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;After disabling all interrupts for 30ms, all functions which use interrupt would be delayed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some wrong the way I use the S32DS driver?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please give some suggestion if any.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BRs,&lt;/P&gt;&lt;P&gt;Matthew Xu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 01:33:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/S32DS-for-ARM-2-2-Flash-erase-program-problem/m-p/1044876#M1615</guid>
      <dc:creator>xu_wenming</dc:creator>
      <dc:date>2020-08-19T01:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: S32DS for ARM 2.2 - Flash erase &amp; program problem</title>
      <link>https://community.nxp.com/t5/S32-SDK/S32DS-for-ARM-2-2-Flash-erase-program-problem/m-p/1044877#M1616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Matthew,&lt;/P&gt;&lt;P&gt;You could disable the interrupt just before a FTFC command is launched in the FLASH_DRV_CommandSequence() function (CCIF = 1). But the commands can take more than 4ms anyway, please find the execution time of the FTFC commands in the datasheet:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/115803iC38202514426A5E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The interrupts do not have to be disabled, but the flash block (or partition) that is being programmed by the FTFC module, must not be accessed by the application.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/115854i3E776C515361610C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The S32K148 part has 3 PFlash blocks.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/115811i3E33275201211B2C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If the interrupts cause this issue, then, either the vector table or the ISR routines (or its resources) are in the same flash block. If it was in SRAM or in any other flash block, you would not need to disable the interrupts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 12:50:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/S32DS-for-ARM-2-2-Flash-erase-program-problem/m-p/1044877#M1616</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-08-19T12:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: S32DS for ARM 2.2 - Flash erase &amp; program problem</title>
      <link>https://community.nxp.com/t5/S32-SDK/S32DS-for-ARM-2-2-Flash-erase-program-problem/m-p/1044878#M1617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for explanation, I put the application at 0x80000, it works fine now.&lt;/P&gt;&lt;P&gt;I still have some confusions:&lt;/P&gt;&lt;P&gt;1. No matter where I locate the bootloader, bootloader would take the whole block,&amp;nbsp;otherwise any application&amp;nbsp;in same block cannot be reprogrammed via Flexcan with UDS (Vehicle&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 13px;"&gt;Unified Diagnostic Services&lt;/SPAN&gt;) protocol;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; How can I reprogram bootloader itself? S32K148 does not have swap feature, if the donwloading progress&amp;nbsp;is interrupted by any reason, bootloader would be damaged&amp;nbsp;permanently.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BRs,&lt;/P&gt;&lt;P&gt;Matthew Xu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2020 04:25:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/S32DS-for-ARM-2-2-Flash-erase-program-problem/m-p/1044878#M1617</guid>
      <dc:creator>xu_wenming</dc:creator>
      <dc:date>2020-08-20T04:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: S32DS for ARM 2.2 - Flash erase &amp; program problem</title>
      <link>https://community.nxp.com/t5/S32-SDK/S32DS-for-ARM-2-2-Flash-erase-program-problem/m-p/1044879#M1618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Matthew, &lt;/P&gt;&lt;P&gt;Could you please create a new thread?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2020 08:35:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-SDK/S32DS-for-ARM-2-2-Flash-erase-program-problem/m-p/1044879#M1618</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-08-20T08:35:09Z</dc:date>
    </item>
  </channel>
</rss>

