<?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: [S32K3xx] - Program a byte in UTEST sector</title>
    <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760904#M28828</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206920"&gt;@atranzillo93&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned, the UTEST Sector is an OTP (One Time Programmable). So, if you already write data in an address, you cannot&amp;nbsp;&lt;SPAN&gt;append new data or configuration.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the first time the data was written successfully, if you run the code, it causes a hard fault because that address is no longer accessible for writing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Nov 2023 15:45:20 GMT</pubDate>
    <dc:creator>VaneB</dc:creator>
    <dc:date>2023-11-21T15:45:20Z</dc:date>
    <item>
      <title>[S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1758514#M28704</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to write a byte in UTEST sector in this block:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="atranzillo93_0-1700150357982.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/250267i7D69426B01BC175E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="atranzillo93_0-1700150357982.png" alt="atranzillo93_0-1700150357982.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NB&lt;/STRONG&gt;: API is called at init with interrupts disabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;HostFlash_Program((uint32_t )0x1B000780U, (uint8_t* )hseFwFeatureFlagEnabledValue, (uint32_t)8U);&lt;/P&gt;&lt;P&gt;eel_status_t HostFlash_Program( uint32_t Address, uint8_t* SourceAddress, uint32_t Length)&lt;BR /&gt;{&lt;BR /&gt;uint32_t ErrorFlags;&lt;BR /&gt;C40_Ip_StatusType C40_Ip_Status = STATUS_C40_IP_ERROR ;&lt;BR /&gt;const uint8_t *DataPtr8 = SourceAddress;&lt;BR /&gt;volatile uint32_t DataTemp32; /* Prevent compiler optimization when working with unaligned addresses */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Disable HV to finalize/abort the operation */&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;MCR &amp;amp;= ~FLASH_MCR_EHV_MASK;&lt;BR /&gt;/*Clear ERS and PGM bits */&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;MCR &amp;amp;= ~(FLASH_MCR_PGM_MASK|FLASH_MCR_ESS_MASK|FLASH_MCR_ERS_MASK);&lt;BR /&gt;/* Disable watchdog interrupt */&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;MCR &amp;amp;= ~FLASH_MCR_WDIE_MASK;&lt;BR /&gt;/* No interrupt request will be generated when the DONE flag is set */&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;MCR &amp;amp;= ~FLASH_MCR_PECIE_MASK;&lt;BR /&gt;/* Clear all error flags for main interface */&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;MCRS &amp;amp;= FLASH_MCRS_EER_MASK | \&lt;BR /&gt;FLASH_MCRS_SBC_MASK | \&lt;BR /&gt;FLASH_MCRS_AEE_MASK | \&lt;BR /&gt;FLASH_MCRS_EEE_MASK | \&lt;BR /&gt;FLASH_MCRS_RVE_MASK | \&lt;BR /&gt;FLASH_MCRS_RRE_MASK | \&lt;BR /&gt;FLASH_MCRS_RWE_MASK | \&lt;BR /&gt;FLASH_MCRS_PES_MASK | \&lt;BR /&gt;FLASH_MCRS_PEP_MASK;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Sector is in Utest */&lt;BR /&gt;Fsld_PFlashInstance-&amp;gt;PFCBLKU_SPELOCK[0u] &amp;amp;= FSLD_MASK_UNLOCK_UTEST_SECTOR;&lt;/P&gt;&lt;P&gt;/* Write the address to be programmed */&lt;BR /&gt;Fsld_PFlashInstance-&amp;gt;PFCPGM_PEADR_L = Address;&lt;/P&gt;&lt;P&gt;DataTemp32 = (uint32_t)DataPtr8[0U] &amp;lt;&amp;lt; 0U;&lt;BR /&gt;DataTemp32 |= (uint32_t)DataPtr8[1U] &amp;lt;&amp;lt; 8U;&lt;BR /&gt;DataTemp32 |= (uint32_t)DataPtr8[2U] &amp;lt;&amp;lt; 16U;&lt;BR /&gt;DataTemp32 |= (uint32_t)DataPtr8[3U] &amp;lt;&amp;lt; 24U;&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;DATA[0U] = DataTemp32;&lt;/P&gt;&lt;P&gt;DataTemp32 = (uint32_t)DataPtr8[4U] &amp;lt;&amp;lt; 0U;&lt;BR /&gt;DataTemp32 |= (uint32_t)DataPtr8[5U] &amp;lt;&amp;lt; 8U;&lt;BR /&gt;DataTemp32 |= (uint32_t)DataPtr8[6U] &amp;lt;&amp;lt; 16U;&lt;BR /&gt;DataTemp32 |= (uint32_t)DataPtr8[7U] &amp;lt;&amp;lt; 24U;&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;DATA[1U] = DataTemp32;&lt;/P&gt;&lt;P&gt;/* Setup program operation */&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;MCR |= FLASH_MCR_PGM_MASK;&lt;BR /&gt;/* Start internal erase/program sequence */&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;MCR |= FLASH_MCR_EHV_MASK;&lt;/P&gt;&lt;P&gt;while (0U == ((Fsld_FlashInstance-&amp;gt;MCRS &amp;amp; FLASH_MCRS_DONE_MASK) &amp;gt;&amp;gt; FLASH_MCRS_DONE_SHIFT))&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;ErrorFlags = Fsld_FlashInstance-&amp;gt;MCRS &amp;amp; (FLASH_MCRS_PEG_MASK | FLASH_MCRS_PEP_MASK | FLASH_MCRS_PES_MASK);&lt;BR /&gt;/* Program/Erase Good: only PEG = 1; both PEP and PES should be 0 */&lt;BR /&gt;if (FLASH_MCRS_PEG_MASK == ErrorFlags)&lt;BR /&gt;{&lt;BR /&gt;C40_Ip_Status = STATUS_C40_IP_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;C40_Ip_Status = STATUS_C40_IP_ERROR;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* terminate program operation */&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;MCR &amp;amp;= ~FLASH_MCR_EHV_MASK;&lt;BR /&gt;/* Terminate program operation */&lt;BR /&gt;Fsld_FlashInstance-&amp;gt;MCR &amp;amp;= ~FLASH_MCR_PGM_MASK;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* The write job has finished or the end of the sector was reached. Time to lock the sector */&lt;BR /&gt;Fsld_PFlashInstance-&amp;gt;PFCBLKU_SPELOCK[0u] |= FSLD_MASK_LOCK_UTEST_SECTOR;&lt;/P&gt;&lt;P&gt;if( STATUS_C40_IP_SUCCESS == C40_Ip_Status )&lt;BR /&gt;{&lt;BR /&gt;return EEL_OK ;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;return EEL_ERR_PARAMETER ;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;#case1&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If I don't place the function in RAM, it writes the byte but, just after the write uC generates a &lt;STRONG&gt;hard fault&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="atranzillo93_1-1700150470064.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/250268iF383B650A1D0AD57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="atranzillo93_1-1700150470064.png" alt="atranzillo93_1-1700150470064.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#case 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If I place the function in RAM, no hard fault occurs, but &lt;STRONG&gt;write operation fails. &lt;/STRONG&gt;Byte is not written in UTEST sector.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="atranzillo93_2-1700150752156.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/250269iD89405B8A1F48111/image-size/medium?v=v2&amp;amp;px=400" role="button" title="atranzillo93_2-1700150752156.png" alt="atranzillo93_2-1700150752156.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 16:10:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1758514#M28704</guid>
      <dc:creator>atranzillo93</dc:creator>
      <dc:date>2023-11-16T16:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1758518#M28705</link>
      <description>&lt;P&gt;The hard fault generates here:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="atranzillo93_0-1700151260382.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/250271i1375EF472424A68C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="atranzillo93_0-1700151260382.png" alt="atranzillo93_0-1700151260382.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 16:14:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1758518#M28705</guid>
      <dc:creator>atranzillo93</dc:creator>
      <dc:date>2023-11-16T16:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1758643#M28708</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206920"&gt;@atranzillo93&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The UTEST Sector is an OTP (One Time Programmable). This causes the erase operations not to be allowed. You only going to be able to append new data or configuration and read data.&lt;/P&gt;
&lt;P&gt;Writing the desired data in the UTEST Sector is the same process used to program data in other blocks.&lt;/P&gt;
&lt;P&gt;Please check the following post. Is from other topics but explains how to write data in a UTEST sector.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K-Knowledge-Base/S32K3-Restrict-the-debug-access-with-a-password-when-HSE-is-not/ta-p/1735073" target="_blank" rel="noopener"&gt;[S32K3] Restrict the debug access with a password when HSE is not used&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B.R.&lt;/P&gt;
&lt;P&gt;VaneB&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 22:49:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1758643#M28708</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-11-16T22:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1758993#M28729</link>
      <description>&lt;P&gt;Hi vanessa,&lt;/P&gt;&lt;P&gt;I have tried your same code, the write in UTEST is correctly performed but just after the write &lt;STRONG&gt;uC goes in hard fault&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;eel_status_t &lt;STRONG&gt;HostFlash1_Program&lt;/STRONG&gt;(void)&lt;BR /&gt;{&lt;BR /&gt;C40_Ip_StatusType flashStatus;&lt;BR /&gt;uint32_t DcfRecord[2] = {0x00000100, 0x00100004};&lt;BR /&gt;/* If the target address is un-programmed state, start the programming process. */&lt;BR /&gt;if( (*(uint32_t *)0x1B000770 == 0xFFFFFFFF) &amp;amp;&amp;amp; (*(uint32_t *)(0x1B000770+4) == 0xFFFFFFFF) )&lt;BR /&gt;{&lt;BR /&gt;/* Must unlock the UTEST Flash area before programming. */&lt;BR /&gt;Fsld_PFlashInstance-&amp;gt;PFCBLKU_SPELOCK[0u] &amp;amp;= 0xFFFFFFF0U;&lt;/P&gt;&lt;P&gt;/* Write the new DCF records into UTEST Flash. */&lt;BR /&gt;flashStatus = C40_Ip_MainInterfaceWrite(0x1B000770, 8, (uint8_t *)(&amp;amp;DcfRecord[0]));&lt;BR /&gt;/* Cache_Ip_CleanByAddr(CACHE_IP_DATA, TRUE, TargetAddress, 8); */&lt;/P&gt;&lt;P&gt;/* Poll the Flash status until the programming sequence is done. */&lt;BR /&gt;do {&lt;BR /&gt;flashStatus = C40_Ip_MainInterfaceWriteStatus();&lt;BR /&gt;}while(STATUS_C40_IP_SUCCESS != flashStatus);&lt;/P&gt;&lt;P&gt;/* Must lock the UTEST Flash area after programming. */&lt;BR /&gt;Fsld_PFlashInstance-&amp;gt;PFCBLKU_SPELOCK[0u] |= 0x0000000FU;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if( STATUS_C40_IP_SUCCESS == flashStatus )&lt;BR /&gt;{&lt;BR /&gt;return EEL_OK ;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;return EEL_ERR_PARAMETER ;&lt;BR /&gt;}&lt;BR /&gt;}&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="atranzillo93_0-1700215264747.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/250412i93F0E12B246608FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="atranzillo93_0-1700215264747.png" alt="atranzillo93_0-1700215264747.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you explain me why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regarsds, Anna&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 10:01:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1758993#M28729</guid>
      <dc:creator>atranzillo93</dc:creator>
      <dc:date>2023-11-17T10:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1759157#M28738</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206920"&gt;@atranzillo93&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does the&amp;nbsp;MCU go to Hard Fault when you&amp;nbsp;lock the UTEST sector? Or does this happen when the MCU terminates the&amp;nbsp;ostFlash1_Program(void)?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 17:17:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1759157#M28738</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-11-17T17:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760714#M28817</link>
      <description>&lt;P&gt;Hi vanessa,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the MCU goes in hard fault when calls the API:&lt;/P&gt;&lt;P&gt;flashStatus = &lt;STRONG&gt;C40_Ip_MainInterfaceWriteStatus();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 11:35:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760714#M28817</guid>
      <dc:creator>atranzillo93</dc:creator>
      <dc:date>2023-11-21T11:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760904#M28828</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206920"&gt;@atranzillo93&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned, the UTEST Sector is an OTP (One Time Programmable). So, if you already write data in an address, you cannot&amp;nbsp;&lt;SPAN&gt;append new data or configuration.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the first time the data was written successfully, if you run the code, it causes a hard fault because that address is no longer accessible for writing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 15:45:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760904#M28828</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-11-21T15:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760907#M28829</link>
      <description>&lt;P&gt;Hi Vanessa&lt;/P&gt;&lt;P&gt;address where I try to write is empty, so I CAN write.&lt;/P&gt;&lt;P&gt;The data are effectively written but during the read of Write status (DONE bit) an hard fault occurs.&lt;/P&gt;&lt;P&gt;I hope to be clear now.&lt;/P&gt;&lt;P&gt;See the images that I have attached to issue, please.&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 15:49:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760907#M28829</guid>
      <dc:creator>atranzillo93</dc:creator>
      <dc:date>2023-11-21T15:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760922#M28831</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206920"&gt;@atranzillo93&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please verify if this behavior also presents with the&amp;nbsp;C40_Ip_Example?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 16:05:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760922#M28831</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2023-11-21T16:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760923#M28832</link>
      <description>&lt;P&gt;Ok ,I will verity it.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 16:07:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1760923#M28832</guid>
      <dc:creator>atranzillo93</dc:creator>
      <dc:date>2023-11-21T16:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1771524#M29457</link>
      <description>&lt;P&gt;I faced same issue. controller was going to hard fault for both RAM and Flash region execution.&lt;/P&gt;&lt;P&gt;I tried adding 5ms delay inside "C40_Ip_MainInterfaceWrite" function. please refer from below.&lt;/P&gt;&lt;P&gt;if (TRUE == C40_Ip_bAsync)&lt;BR /&gt;{&lt;BR /&gt;/* Start flash access */&lt;BR /&gt;C40_Ip_FlashAccessCalloutStart();&lt;BR /&gt;HAL_DelayMs(5);&lt;BR /&gt;/* Start internal erase/program sequence */&lt;BR /&gt;C40_Ip_pFlashBaseAddress-&amp;gt;MCR |= FLASH_MCR_EHV_MASK;&lt;BR /&gt;HAL_DelayMs(5);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;its working for me, executing from flash region.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 11:35:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1771524#M29457</guid>
      <dc:creator>BhushanM</dc:creator>
      <dc:date>2023-12-08T11:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1785210#M30430</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;delay doens't solve the hard fault in my application.&lt;/P&gt;&lt;P&gt;Do you have any suggests?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Anita&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 10:26:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1785210#M30430</guid>
      <dc:creator>atranzillo93</dc:creator>
      <dc:date>2024-01-09T10:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1787341#M30551</link>
      <description>&lt;P&gt;SOLUTION:&lt;/P&gt;&lt;P&gt;I have separated the setting of PGM and EHV bits in two differents API.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 15:51:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/1787341#M30551</guid>
      <dc:creator>atranzillo93</dc:creator>
      <dc:date>2024-01-11T15:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/2250816#M54901</link>
      <description>&lt;P&gt;#Hello&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/226337"&gt;@BhushanM&lt;/a&gt;&amp;nbsp;did u get&amp;nbsp; the solution for problem ?If yes please help us with this .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 05:54:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/2250816#M54901</guid>
      <dc:creator>Sanjana_k</dc:creator>
      <dc:date>2025-11-28T05:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K3xx] - Program a byte in UTEST sector</title>
      <link>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/2317869#M56807</link>
      <description>Hi&lt;BR /&gt;can we write data into Utest memory using the "C40_Ip_MainInterfaceWrite" API?? I have created the API using the andC40_Ip_MainInterfaceWrite write the Data at "0x1B001BF8 but getting the hardfault error.FLS_STATUS FLS_WriteMemoryRange(uint32_t SectorID, uint32_t WriteAddress, \&lt;BR /&gt;uint8_t *WriteData, uint32_t WriteSize)&lt;BR /&gt;{&lt;BR /&gt;FLS_STATUS RetSts = FLS_STATUS_ERROR;&lt;BR /&gt;C40_Ip_StatusType SectorStatus = C40_IP_STATUS_SECTOR_PROTECTED;&lt;BR /&gt;C40_Ip_StatusType ReturnCode = C40_IP_STATUS_SUCCESS;&lt;BR /&gt;&lt;BR /&gt;/* Unlock the sector if locked */&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SectorStatus = C40_Ip_GetLock(SectorID);&lt;BR /&gt;if (C40_IP_STATUS_SECTOR_PROTECTED == SectorStatus) {&lt;BR /&gt;/* Unlock the sector */&lt;BR /&gt;ReturnCode = C40_Ip_ClearLock(SectorID, GET_CPU_CORE_ID);&lt;BR /&gt;} else {&lt;BR /&gt;ReturnCode = C40_IP_STATUS_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* Proceed with the write if the sector is unlocked */&lt;BR /&gt;if (C40_IP_STATUS_SUCCESS == ReturnCode) {&lt;BR /&gt;/* Write data to the given address */&lt;BR /&gt;ReturnCode = C40_Ip_MainInterfaceWrite(WriteAddress, WriteSize, WriteData, GET_CPU_CORE_ID);&lt;BR /&gt;if (C40_IP_STATUS_SUCCESS == ReturnCode) {&lt;BR /&gt;/* Wait until write completes */&lt;BR /&gt;while (C40_IP_STATUS_BUSY == (ReturnCode= C40_Ip_MainInterfaceWriteStatus()));&lt;BR /&gt;&lt;BR /&gt;if (C40_IP_STATUS_SUCCESS != ReturnCode) {&lt;BR /&gt;PASLOG(ZONE_ERR, __func__, "Sector ID: %d, Address: 0x%X, Size: %d, Write status: %d", \&lt;BR /&gt;SectorID, WriteAddress, WriteSize, ReturnCode);&lt;BR /&gt;} else {&lt;BR /&gt;RetSts = FLS_STATUS_OK;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/* Lock the sector if it was previously locked */&lt;BR /&gt;if (C40_IP_STATUS_SECTOR_PROTECTED == SectorStatus) {&lt;BR /&gt;/* Lock the sector */&lt;BR /&gt;ReturnCode = C40_Ip_SetLock(SectorID, GET_CPU_CORE_ID);&lt;BR /&gt;if (C40_IP_STATUS_SUCCESS == ReturnCode) {&lt;BR /&gt;RetSts = FLS_STATUS_OK;&lt;BR /&gt;} else {&lt;BR /&gt;PASLOG(ZONE_ERR, __func__, "Sector ID: %d, Set lock request status: %d", SectorID, ReturnCode);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;} else {&lt;BR /&gt;PASLOG(ZONE_ERR, __func__, "Sector ID: %d, Address: 0x%X, Size: %d, Write request status: %d", \&lt;BR /&gt;SectorID, WriteAddress, WriteSize, ReturnCode);&lt;BR /&gt;}&lt;BR /&gt;} else {&lt;BR /&gt;PASLOG(ZONE_ERR, __func__, "Sector ID: %d, Clear lock request status: %d", SectorID, ReturnCode);&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;return (RetSts);&lt;BR /&gt;}</description>
      <pubDate>Fri, 13 Feb 2026 13:21:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K3xx-Program-a-byte-in-UTEST-sector/m-p/2317869#M56807</guid>
      <dc:creator>Haritha466</dc:creator>
      <dc:date>2026-02-13T13:21:43Z</dc:date>
    </item>
  </channel>
</rss>

