<?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: HardFault exception - configuring EEEPROM Functionality</title>
    <link>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2181451#M53291</link>
    <description>I have noticed that the issue occurs here:&lt;BR /&gt;/* Clear CCIF bit by writing a '1' to launch command */&lt;BR /&gt;IP_FTFC-&amp;gt;FSTAT |= FTFC_FSTAT_CCIF_MASK;&lt;BR /&gt;&lt;BR /&gt;I'm handling the command complete interrupt in ISR but I can not reach that part of code since the hardfault happens inmediatly after the command is launch.&lt;BR /&gt;Does anyone have any idea on how to solve it ?</description>
    <pubDate>Tue, 07 Oct 2025 19:25:38 GMT</pubDate>
    <dc:creator>Alberto_C</dc:creator>
    <dc:date>2025-10-07T19:25:38Z</dc:date>
    <item>
      <title>HardFault exception - configuring EEEPROM Functionality</title>
      <link>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2181350#M53286</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I'm currently working with S32K144 , I'm trying to configure EEEPROM Functionality with no SDK but during my SW execution I'm getting a hardfault exception.&lt;/P&gt;&lt;P&gt;here is my code configuration:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Clear RDCOLERR &amp;amp; ACCERR &amp;amp; FPVIOL &amp;amp; MGSTAT0 flag in flash status register. Write 1 to clear */&lt;BR /&gt;IP_FTFC-&amp;gt;FSTAT = (uint8_t)(FTFC_FSTAT_FPVIOL_MASK | FTFC_FSTAT_ACCERR_MASK | FTFC_FSTAT_RDCOLERR_MASK);&lt;BR /&gt;&lt;BR /&gt;/* The program partition command configures FlexRAM as EEPROM and FlexNVM as EEPROM backup region */&lt;BR /&gt;IP_FTFC-&amp;gt; FCCOB [3] = 0x80; /* FCCOB0: Selects the PGMPART command */&lt;BR /&gt;IP_FTFC-&amp;gt; FCCOB [2] = 0x00; /* FCCOB1: No CSEc operation */&lt;BR /&gt;IP_FTFC-&amp;gt; FCCOB [1] = 0x00; /* FCCOB2: No CSEc operation */&lt;BR /&gt;IP_FTFC-&amp;gt; FCCOB [0] = 0x00; /* FCCOB3: FlexRAM loaded with valid EEPROM during reset sequence */&lt;BR /&gt;IP_FTFC-&amp;gt; FCCOB [7] = 0x02; /* FCCOB4: EEPROM data set size code: EEESIZE = 2 (4 kB) */&lt;BR /&gt;IP_FTFC-&amp;gt; FCCOB [6] = 0x04; /* FCCOB5: FlexNVM Partition code: DEPART = 4 (Data flash: 0 kB, EEPROM backup: 64 kB) */&lt;BR /&gt;&lt;BR /&gt;/* Enable the command complete interrupt */&lt;BR /&gt;IP_FTFC-&amp;gt;FCNFG |= FTFC_FCNFG_CCIE_MASK;&lt;BR /&gt;/* Clear CCIF bit by writing a '1' to launch command */&lt;BR /&gt;IP_FTFC-&amp;gt;FSTAT |= FTFC_FSTAT_CCIF_MASK;&lt;BR /&gt;&lt;BR /&gt;/* Clear RDCOLERR &amp;amp; ACCERR &amp;amp; FPVIOL &amp;amp; MGSTAT0 flag in flash status register. Write 1 to clear */&lt;BR /&gt;IP_FTFC-&amp;gt;FSTAT = (uint8_t)(FTFC_FSTAT_FPVIOL_MASK | FTFC_FSTAT_ACCERR_MASK | FTFC_FSTAT_RDCOLERR_MASK);&lt;BR /&gt;&lt;BR /&gt;/* FlexRAM Function command changes the function of the FlexRAM */&lt;BR /&gt;IP_FTFC-&amp;gt; FCCOB [3] = 0x81; /* FCCOB0: Selects the SETRAM command */&lt;BR /&gt;IP_FTFC-&amp;gt; FCCOB [2] = 0x00; /* FCCOB1: Make FlexRAM available for emulated EEPROM */&lt;BR /&gt;&lt;BR /&gt;/* Enable the command complete interrupt */&lt;BR /&gt;IP_FTFC-&amp;gt;FCNFG |= FTFC_FCNFG_CCIE_MASK;&lt;BR /&gt;/* Clear CCIF bit by writing a '1' to launch command */&lt;BR /&gt;IP_FTFC-&amp;gt;FSTAT |= FTFC_FSTAT_CCIF_MASK;&lt;BR /&gt;&lt;BR /&gt;Also I have enable the FTFC interrupt in the NVIC and Interrupt Service Routine to handle the command completion event.&lt;BR /&gt;&lt;BR /&gt;Any idea on what the issue is ? should I configure in a separate functions the Program Partition command and set FlexRAM ?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Alberto&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2025 16:26:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2181350#M53286</guid>
      <dc:creator>Alberto_C</dc:creator>
      <dc:date>2025-10-07T16:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault exception - configuring EEEPROM Functionality</title>
      <link>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2181451#M53291</link>
      <description>I have noticed that the issue occurs here:&lt;BR /&gt;/* Clear CCIF bit by writing a '1' to launch command */&lt;BR /&gt;IP_FTFC-&amp;gt;FSTAT |= FTFC_FSTAT_CCIF_MASK;&lt;BR /&gt;&lt;BR /&gt;I'm handling the command complete interrupt in ISR but I can not reach that part of code since the hardfault happens inmediatly after the command is launch.&lt;BR /&gt;Does anyone have any idea on how to solve it ?</description>
      <pubDate>Tue, 07 Oct 2025 19:25:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2181451#M53291</guid>
      <dc:creator>Alberto_C</dc:creator>
      <dc:date>2025-10-07T19:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault exception - configuring EEEPROM Functionality</title>
      <link>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2181705#M53304</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/255593"&gt;@Alberto_C&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It must be partitioned from SRAM.&lt;/P&gt;
&lt;P&gt;This code must be in SRAM:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;FTFC-&amp;gt;FSTAT = FTFC_FSTAT_CCIF_MASK; // launch command
while((FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) == 0); // wait until complete&lt;/LI-CODE&gt;
&lt;P&gt;Place the code into a function and the function place in SRAM:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;__attribute__ ((section(".code_ram"))) // place the function below into .code_ram
uint8_t partition(void);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use the FTFC interrupt, the core must not read any data or execute any code from the Flash.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 11:18:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2181705#M53304</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-10-09T11:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault exception - configuring EEEPROM Functionality</title>
      <link>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2182003#M53326</link>
      <description>Hi Daniel, thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;I have create a function and put it into the SRAM but I'm still getting the Hardfault exception.&lt;BR /&gt;&lt;BR /&gt;here is my code:&lt;BR /&gt;__attribute__((section (".code_ram")))&lt;BR /&gt;void execute_command(void);&lt;BR /&gt;&lt;BR /&gt;void execute_command(void)&lt;BR /&gt;{&lt;BR /&gt;IP_FTFC-&amp;gt;FSTAT |= FTFC_FSTAT_CCIF_MASK;&lt;BR /&gt;while ((IP_FTFC-&amp;gt;FSTAT &amp;amp; FTFC_FSTAT_CCIF_MASK) == 0);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Note: I disabled the FTFC interrupt.&lt;BR /&gt;&lt;BR /&gt;While debugging I noticed that there is warning icon in the function saying " value may be incorrect : runtime code areas(RAM) not yet initialized"&lt;BR /&gt;Am I missing something ?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Alberto</description>
      <pubDate>Wed, 08 Oct 2025 17:00:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2182003#M53326</guid>
      <dc:creator>Alberto_C</dc:creator>
      <dc:date>2025-10-08T17:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault exception - configuring EEEPROM Functionality</title>
      <link>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2182335#M53333</link>
      <description>&lt;P&gt;Hi Daniel, quick update on this topic.&lt;BR /&gt;&lt;BR /&gt;I have enabled the FTFC interrupt and&amp;nbsp;&lt;SPAN&gt;put it into the SRAM but I'm still getting the Hardfault exception. ( see the image below)&lt;BR /&gt;The HardFault happens when the &lt;STRONG&gt;execute_command&lt;/STRONG&gt; function is being executed (&amp;nbsp;&lt;/SPAN&gt;HardFault exception at 0x1FFF8424)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alberto_C_0-1759963584535.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/359957i0371A06F48BF0197/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alberto_C_0-1759963584535.png" alt="Alberto_C_0-1759963584535.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is my linker configuration:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Flash&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alberto_C_1-1759963913884.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/359959i03026AC4FEA6035F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alberto_C_1-1759963913884.png" alt="Alberto_C_1-1759963913884.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alberto_C_2-1759964029933.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/359960iFFBEA8150CC3B4B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alberto_C_2-1759964029933.png" alt="Alberto_C_2-1759964029933.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RAM:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alberto_C_3-1759964089153.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/359961i7C67316B1717A235/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alberto_C_3-1759964089153.png" alt="Alberto_C_3-1759964089153.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alberto_C_4-1759964153410.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/359962i594EA3ADB6CE7F20/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alberto_C_4-1759964153410.png" alt="Alberto_C_4-1759964153410.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Am I missing something in the linker configuration ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it mandatory to enable the FTFC interrupt ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;BR /&gt;Alberto&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2025 22:59:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2182335#M53333</guid>
      <dc:creator>Alberto_C</dc:creator>
      <dc:date>2025-10-08T22:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault exception - configuring EEEPROM Functionality</title>
      <link>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2182979#M53360</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/255593"&gt;@Alberto_C&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Regarding the interrupt, please disregard my previous response.&lt;BR /&gt;The issue here is that during the command operation, the core must not execute any code from flash memory. This limitation makes it impractical to use interrupt mode for partitioning. Instead, polling mode should be used. Partitioning should be done only once during the device’s lifetime anyway.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2025 11:17:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2182979#M53360</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-10-09T11:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: HardFault exception - configuring EEEPROM Functionality</title>
      <link>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2183087#M53366</link>
      <description>Hi Daniel, thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;Using the polling mode and execute the command from SRAM , I'm still getting the hardfault,&lt;BR /&gt;Strangely this does not happen, when I step through the program line by line (debugging the sw execution). Then the configuration for FlexRAM as EEPROM and FlexNVM as EEPROM backupp gets programmed correctly.&lt;BR /&gt;any missing configuration ?&lt;BR /&gt;&lt;BR /&gt;How can the partition be reverted ? - I'm testing my code , but with the hardfault I can not perform any write testing.&lt;BR /&gt;&lt;BR /&gt;Thanks for your support.&lt;BR /&gt;Alberto</description>
      <pubDate>Thu, 09 Oct 2025 14:27:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/HardFault-exception-configuring-EEEPROM-Functionality/m-p/2183087#M53366</guid>
      <dc:creator>Alberto_C</dc:creator>
      <dc:date>2025-10-09T14:27:03Z</dc:date>
    </item>
  </channel>
</rss>

