<?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: Issue with SecOC related crypto operations during ongoing FEE/FLS Operation in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Issue-with-SecOC-related-crypto-operations-during-ongoing-FEE/m-p/2342982#M57638</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/230743"&gt;@KanthReddy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A suitable way to coordinate Fee/Fls operations with other timing‑sensitive software (such as cryptographic routines) is not directly defined by the AUTOSAR specifications. Even though the underlying flash module on the device supports a flash‑erase suspend mechanism at hardware level, this functionality is not exposed through AUTOSAR Fls or Fee drivers. AUTOSAR does not provide any API or configuration option to pause or temporarily interrupt an ongoing flash erase or program sequence. As a result, AUTOSAR leaves this coordination problem entirely to system integration. Given these limitations, the approach described below is probably the only practical and AUTOSAR‑compliant method for interleaving Fee operations with other tasks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A typical Fee job runs in small incremental steps. Each step is triggered by calling the periodic main functions:&lt;/P&gt;
&lt;P&gt;do&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fee_MainFunction();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fls_MainFunction();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = Fee_GetStatus();&lt;/P&gt;
&lt;P&gt;} while (status != MEMIF_IDLE);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Every time these main functions are called, the Fee driver advances its internal state machine and may request Fls to perform exactly one atomic flash operation (for example, a small program or erase action). When that atomic action completes, Fls becomes idle again and waits for the next main‑function call to begin another step. Fee continues this sequence until the entire high‑level Fee job is complete, at which point Fee_GetStatus() transitions to MEMIF_IDLE.&lt;/P&gt;
&lt;P&gt;It is important to understand that Fee_GetStatus() reports only whether the full Fee job is finished, not whether the current atomic flash step is done. During a multi‑step write or maintenance sequence, Fee_GetStatus() will remain BUSY or BUSY_INTERNAL for the entire duration.&lt;/P&gt;
&lt;P&gt;If timing coordination with other software is needed (for example, to run routines that must avoid overlapping with flash programming), the correct AUTOSAR‑compliant way to detect when an atomic flash step has finished is to use Fls_GetStatus(). Fls is the module that actually executes and tracks each atomic flash operation. When Fls_GetStatus() returns FLS_IDLE, the previous flash step is fully complete and the driver is waiting for the next main‑function call. That idle moment is the safe window in which other timing‑sensitive tasks can run.&lt;/P&gt;
&lt;P&gt;After these tasks complete, calling Fee_MainFunction() again will allow Fee to proceed with its next atomic step. This method remains fully compliant with AUTOSAR design rules, requires no direct hardware access, and preserves the integrity of Fee’s internal scheduling.&lt;/P&gt;
&lt;P&gt;In summary:&lt;/P&gt;
&lt;P&gt;Fee jobs consist of multiple atomic flash steps executed one by one.&lt;/P&gt;
&lt;P&gt;Fee_GetStatus() becomes MEMIF_IDLE only when the entire Fee job is finished.&lt;/P&gt;
&lt;P&gt;Fls_GetStatus() provides the fine‑grained information needed to detect when each individual atomic flash step has completed.&lt;/P&gt;
&lt;P&gt;By running other software tasks only when Fls reports idle, and by controlling when Fee_MainFunction() is invoked, the application can safely interleave its own operations with Fee’s multi‑step flash activity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2026 10:55:39 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2026-03-31T10:55:39Z</dc:date>
    <item>
      <title>Issue with SecOC related crypto operations during ongoing FEE/FLS Operation</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-SecOC-related-crypto-operations-during-ongoing-FEE/m-p/2342240#M57616</link>
      <description>&lt;P&gt;Dear NXP Support Team,&lt;/P&gt;&lt;P&gt;We are currently facing challenges with SecOC message related crypto operations in our system due to ongoing FEE/FLS operations and would like to seek your guidance on possible solutions.&lt;/P&gt;&lt;P&gt;Specifically, we observe that CSEC operations cannot be executed when FTFC is busy due to ongoing FLS/FEE operations (FTFC status = 0).&lt;/P&gt;&lt;P&gt;During FEE sector switching, the FTFC remains occupied due to physical sector erase operations, which take approximately 13–130 ms per one physical sector. (And Fee logical sector is 32KB)&amp;nbsp;&lt;/P&gt;&lt;P&gt;As each logical sector consists of 8 physical sectors, this results in a significant blocking duration as FLS operation is atomic after CMD gets issued.&lt;/P&gt;&lt;P&gt;At the same time, our SecOC communication has the following timing constraints:&lt;/P&gt;&lt;P&gt;* Cyclic SecOC messages with a period of 10 ms&lt;BR /&gt;* Event-based SecOC messages with a minimum inter-arrival time of 20 ms&lt;/P&gt;&lt;P&gt;Due to the FTFC busy condition, we are unable to meet the required SecOC timing deadlines, leading to communication issues.&lt;/P&gt;&lt;P&gt;We would appreciate your input on the following points:&lt;/P&gt;&lt;P&gt;1. Is there a recommended approach to handle SecOC processing while FLS physical sector erase is ongoing? (or it could be a FLS multipstep write operation in general)&lt;BR /&gt;2. Are there any mechanisms or best practices to utilize the time between erasing two physical sectors for CSEC operations?&lt;BR /&gt;3. Is there any configuration or workaround available to mitigate this issue without requiring changes to the MCAL layer?&lt;/P&gt;&lt;P&gt;Any guidance, recommended design patterns, or reference implementations would be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Info: Prioritized arbitration (i.e. SECOC_CRYPTO PRIO &amp;gt; FEE/FLS operations) seems only possible in theory as implications of suspending/cancelling FEE/Fls multistep and Garbage collection may have negative implications or side effects.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your support.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Lakshmi Kanth &lt;LI-PRODUCT title="S32K148-T-BOX" id="S32K148-T-BOX"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;LI-MESSAGE title="S32K148: HW CONTENTION at FTFC (leads to racing among FLS vs SecOC vs SHE Key Management CDD)" uid="2249235" url="https://community.nxp.com/t5/S32K/S32K148-HW-CONTENTION-at-FTFC-leads-to-racing-among-FLS-vs-SecOC/m-p/2249235#U2249235" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2026 14:19:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-SecOC-related-crypto-operations-during-ongoing-FEE/m-p/2342240#M57616</guid>
      <dc:creator>KanthReddy</dc:creator>
      <dc:date>2026-03-30T14:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with SecOC related crypto operations during ongoing FEE/FLS Operation</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-SecOC-related-crypto-operations-during-ongoing-FEE/m-p/2342982#M57638</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/230743"&gt;@KanthReddy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A suitable way to coordinate Fee/Fls operations with other timing‑sensitive software (such as cryptographic routines) is not directly defined by the AUTOSAR specifications. Even though the underlying flash module on the device supports a flash‑erase suspend mechanism at hardware level, this functionality is not exposed through AUTOSAR Fls or Fee drivers. AUTOSAR does not provide any API or configuration option to pause or temporarily interrupt an ongoing flash erase or program sequence. As a result, AUTOSAR leaves this coordination problem entirely to system integration. Given these limitations, the approach described below is probably the only practical and AUTOSAR‑compliant method for interleaving Fee operations with other tasks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A typical Fee job runs in small incremental steps. Each step is triggered by calling the periodic main functions:&lt;/P&gt;
&lt;P&gt;do&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fee_MainFunction();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fls_MainFunction();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = Fee_GetStatus();&lt;/P&gt;
&lt;P&gt;} while (status != MEMIF_IDLE);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Every time these main functions are called, the Fee driver advances its internal state machine and may request Fls to perform exactly one atomic flash operation (for example, a small program or erase action). When that atomic action completes, Fls becomes idle again and waits for the next main‑function call to begin another step. Fee continues this sequence until the entire high‑level Fee job is complete, at which point Fee_GetStatus() transitions to MEMIF_IDLE.&lt;/P&gt;
&lt;P&gt;It is important to understand that Fee_GetStatus() reports only whether the full Fee job is finished, not whether the current atomic flash step is done. During a multi‑step write or maintenance sequence, Fee_GetStatus() will remain BUSY or BUSY_INTERNAL for the entire duration.&lt;/P&gt;
&lt;P&gt;If timing coordination with other software is needed (for example, to run routines that must avoid overlapping with flash programming), the correct AUTOSAR‑compliant way to detect when an atomic flash step has finished is to use Fls_GetStatus(). Fls is the module that actually executes and tracks each atomic flash operation. When Fls_GetStatus() returns FLS_IDLE, the previous flash step is fully complete and the driver is waiting for the next main‑function call. That idle moment is the safe window in which other timing‑sensitive tasks can run.&lt;/P&gt;
&lt;P&gt;After these tasks complete, calling Fee_MainFunction() again will allow Fee to proceed with its next atomic step. This method remains fully compliant with AUTOSAR design rules, requires no direct hardware access, and preserves the integrity of Fee’s internal scheduling.&lt;/P&gt;
&lt;P&gt;In summary:&lt;/P&gt;
&lt;P&gt;Fee jobs consist of multiple atomic flash steps executed one by one.&lt;/P&gt;
&lt;P&gt;Fee_GetStatus() becomes MEMIF_IDLE only when the entire Fee job is finished.&lt;/P&gt;
&lt;P&gt;Fls_GetStatus() provides the fine‑grained information needed to detect when each individual atomic flash step has completed.&lt;/P&gt;
&lt;P&gt;By running other software tasks only when Fls reports idle, and by controlling when Fee_MainFunction() is invoked, the application can safely interleave its own operations with Fee’s multi‑step flash activity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2026 10:55:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-SecOC-related-crypto-operations-during-ongoing-FEE/m-p/2342982#M57638</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2026-03-31T10:55:39Z</dc:date>
    </item>
  </channel>
</rss>

