<?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のトピックS32K311 UTest Programming: RWE Error and Crash During Programming</title>
    <link>https://community.nxp.com/t5/S32K/S32K311-UTest-Programming-RWE-Error-and-Crash-During-Programming/m-p/2351536#M57977</link>
    <description>&lt;P&gt;I am working on UTest programming on the S32K311 Microcontroller, and I am encountering a Read-While-Write Error (RWE) along with a controller crash during flash programming.&lt;/P&gt;&lt;P&gt;Issue:&lt;BR /&gt;After triggering the UTest programming sequence:&lt;/P&gt;&lt;P&gt;The controller jumps to the default handler (crash)&lt;BR /&gt;The RWE (Read While Write Error) flag is set&lt;/P&gt;&lt;P&gt;Context:&lt;BR /&gt;Application is executing from PFlash @ 0x00480000&lt;BR /&gt;UTest programming is initiated while running from PFlash&lt;BR /&gt;The actual trigger function (EHV set + polling) is executed from RAM&lt;/P&gt;&lt;P&gt;Implementation Flow:&lt;BR /&gt;1. Initialization &amp;amp; Preparation (FLASH_gSetPublicKey_Prepare)&lt;BR /&gt;Unlock UTest sector: PFLASH.PFCBLKU_SPELOCK[0].R &amp;amp;= ~(1U &amp;lt;&amp;lt; 0);&lt;BR /&gt;Reset operation mode bits:EHV = 0,PGM = 0,ERS = 0&lt;BR /&gt;Clear status flags&lt;BR /&gt;Load target address: PFLASH.PFCPGM_PEADR_L.R = 0x1B000100U;&lt;BR /&gt;Load data into flash registers:&lt;BR /&gt;for (i = 0U; i &amp;lt; FLASH_lNumOfWords; i++)&lt;BR /&gt;{&lt;BR /&gt;FLASH.DATA[i].R = FLASH_pSrc[i];&lt;BR /&gt;}&lt;BR /&gt;Enable program mode: FLASH.MCR.B.PGM = 1U;&lt;/P&gt;&lt;P&gt;2. Programming Execution (from RAM) (FLASH_gSetPublicKey_Trigger)&lt;BR /&gt;Start programming: FLASH.MCR.B.EHV = 1U;&lt;BR /&gt;Poll until completion: Wait for DONE = 1&lt;BR /&gt;Stop programming:&lt;BR /&gt;FLASH.MCR.B.EHV = 0U;&lt;BR /&gt;FLASH.MCR.B.PGM = 0U;&lt;BR /&gt;Re-lock UTest sector&lt;/P&gt;&lt;P&gt;Observations:&lt;BR /&gt;Even though the trigger function runs from RAM, the system still:&lt;BR /&gt;Encounters RWE error &amp;amp; Jumps to default handler&lt;/P&gt;&lt;P&gt;Based on the above flow, I would appreciate if you could help identify the exact cause of the RWE fault and suggest the necessary corrections to ensure reliable UTest programming.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Apr 2026 11:40:12 GMT</pubDate>
    <dc:creator>Enoch_D</dc:creator>
    <dc:date>2026-04-15T11:40:12Z</dc:date>
    <item>
      <title>S32K311 UTest Programming: RWE Error and Crash During Programming</title>
      <link>https://community.nxp.com/t5/S32K/S32K311-UTest-Programming-RWE-Error-and-Crash-During-Programming/m-p/2351536#M57977</link>
      <description>&lt;P&gt;I am working on UTest programming on the S32K311 Microcontroller, and I am encountering a Read-While-Write Error (RWE) along with a controller crash during flash programming.&lt;/P&gt;&lt;P&gt;Issue:&lt;BR /&gt;After triggering the UTest programming sequence:&lt;/P&gt;&lt;P&gt;The controller jumps to the default handler (crash)&lt;BR /&gt;The RWE (Read While Write Error) flag is set&lt;/P&gt;&lt;P&gt;Context:&lt;BR /&gt;Application is executing from PFlash @ 0x00480000&lt;BR /&gt;UTest programming is initiated while running from PFlash&lt;BR /&gt;The actual trigger function (EHV set + polling) is executed from RAM&lt;/P&gt;&lt;P&gt;Implementation Flow:&lt;BR /&gt;1. Initialization &amp;amp; Preparation (FLASH_gSetPublicKey_Prepare)&lt;BR /&gt;Unlock UTest sector: PFLASH.PFCBLKU_SPELOCK[0].R &amp;amp;= ~(1U &amp;lt;&amp;lt; 0);&lt;BR /&gt;Reset operation mode bits:EHV = 0,PGM = 0,ERS = 0&lt;BR /&gt;Clear status flags&lt;BR /&gt;Load target address: PFLASH.PFCPGM_PEADR_L.R = 0x1B000100U;&lt;BR /&gt;Load data into flash registers:&lt;BR /&gt;for (i = 0U; i &amp;lt; FLASH_lNumOfWords; i++)&lt;BR /&gt;{&lt;BR /&gt;FLASH.DATA[i].R = FLASH_pSrc[i];&lt;BR /&gt;}&lt;BR /&gt;Enable program mode: FLASH.MCR.B.PGM = 1U;&lt;/P&gt;&lt;P&gt;2. Programming Execution (from RAM) (FLASH_gSetPublicKey_Trigger)&lt;BR /&gt;Start programming: FLASH.MCR.B.EHV = 1U;&lt;BR /&gt;Poll until completion: Wait for DONE = 1&lt;BR /&gt;Stop programming:&lt;BR /&gt;FLASH.MCR.B.EHV = 0U;&lt;BR /&gt;FLASH.MCR.B.PGM = 0U;&lt;BR /&gt;Re-lock UTest sector&lt;/P&gt;&lt;P&gt;Observations:&lt;BR /&gt;Even though the trigger function runs from RAM, the system still:&lt;BR /&gt;Encounters RWE error &amp;amp; Jumps to default handler&lt;/P&gt;&lt;P&gt;Based on the above flow, I would appreciate if you could help identify the exact cause of the RWE fault and suggest the necessary corrections to ensure reliable UTest programming.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 11:40:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K311-UTest-Programming-RWE-Error-and-Crash-During-Programming/m-p/2351536#M57977</guid>
      <dc:creator>Enoch_D</dc:creator>
      <dc:date>2026-04-15T11:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: S32K311 UTest Programming: RWE Error and Crash During Programming</title>
      <link>https://community.nxp.com/t5/S32K/S32K311-UTest-Programming-RWE-Error-and-Crash-During-Programming/m-p/2352917#M58030</link>
      <description>&lt;P&gt;Do you have disabled interrupts? Also flash prefetching and cache needs to be disabled as speculative or prefetch access to flash block 0 can occur what is same block as UTEST.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 10:24:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K311-UTest-Programming-RWE-Error-and-Crash-During-Programming/m-p/2352917#M58030</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2026-04-17T10:24:13Z</dc:date>
    </item>
  </channel>
</rss>

