<?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 Cannot program flash over JTAG in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2313290#M56637</link>
    <description>&lt;P&gt;The details about this question is as follows:&lt;/P&gt;&lt;P&gt;MCU: S32K148 in 144 pin backage on a custom designed board.&lt;/P&gt;&lt;P&gt;JTAG: JLink Plus in 10 pin configuration&lt;/P&gt;&lt;P&gt;IDE: S32DS 3.6.2 On Windows 11&lt;/P&gt;&lt;P&gt;Embedded OS: Bare metal with RTD 3.0.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The board in question is a copy-paste design of a previously working version. However, I cannot write to flash over the JTAG; the readback is all 0xFF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The JTAG pinout is as shown below:&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="durga_choudhury_0-1770336172776.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/375765i41E12CA54AB29991/image-size/medium?v=v2&amp;amp;px=400" role="button" title="durga_choudhury_0-1770336172776.png" alt="durga_choudhury_0-1770336172776.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And on the MCU, they are routed as follows:&lt;/P&gt;&lt;P&gt;TMS (JTAG pin 2) is connected to MCU pin 142 (JTAG_TMS)&lt;/P&gt;&lt;P&gt;TCK (JTAG pin 4) is connected to MCU pin 140 (JTAG_TCLK)&lt;/P&gt;&lt;P&gt;nRESET (JTAG pin 10) is connected to MCU pin 141 (reset_b)&lt;/P&gt;&lt;P&gt;TDO (JTAG pin 6) is connected to MCU pin 136 (JTAG_TDO)&lt;/P&gt;&lt;P&gt;TDI (JTAG pin 6) is connected to MCU pin 139 (JTAG_TDI)&lt;/P&gt;&lt;P&gt;Vref (JTAG pin 1) is connected to 3.3V) (as evidenced by the LED on the JLINK turning green at the start of a code download and staying orange'ish (i.e. both red and green on) at connection, also Jlink confirms that the target voltage is 3.3V)&lt;/P&gt;&lt;P&gt;The pull up/down values are as per the schematic above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this, I am not able to write to the flash. After code download, the memory regions just written as read back as 0xFF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output from Jlink is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J-Link&amp;gt;showhwstatus&lt;BR /&gt;VTref=3.341V&lt;BR /&gt;ITarget=0mA&lt;BR /&gt;TCK=1 TDI=0 TDO=1 TMS=0 TRES=1 TRST=1&lt;BR /&gt;Supported target interface speeds:&lt;BR /&gt;- 180 MHz/n, (n&amp;gt;=12). =&amp;gt; 15000kHz, 13846kHz, 12857kHz, ...&lt;BR /&gt;- Adaptive clocking&lt;BR /&gt;J-Link&amp;gt;connect&lt;BR /&gt;Device "S32K148" selected.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Connecting to target via JTAG&lt;BR /&gt;ConfigTargetSettings() start&lt;BR /&gt;ConfigTargetSettings() end - Took 4us&lt;BR /&gt;InitTarget() start&lt;BR /&gt;JTAG selected. Identifying JTAG Chain...&lt;BR /&gt;TotalIRLen = 4, IRPrint = 0x01&lt;BR /&gt;JTAG chain detection found 1 devices:&lt;BR /&gt;#0 Id: 0x0995001D, IRLen: 04, JTAG-DP&lt;BR /&gt;JTAG Chain Identified. Connecting to DAP TAP...&lt;BR /&gt;Successfully connected to selected DAP TAP.&lt;BR /&gt;InitTarget() end - Took 55.4ms&lt;BR /&gt;TotalIRLen = 4, IRPrint = 0x01&lt;BR /&gt;JTAG chain detection found 1 devices:&lt;BR /&gt;#0 Id: 0x0995001D, IRLen: 04, JTAG-DP&lt;BR /&gt;DPv0 detected&lt;BR /&gt;AP map detection skipped. Manually configured AP map found.&lt;BR /&gt;AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000)&lt;BR /&gt;AP[0]: Core found&lt;BR /&gt;AP[0]: AHB-AP ROM base: 0xE00FF000&lt;BR /&gt;CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)&lt;BR /&gt;Found Cortex-M4 r0p1, Little endian.&lt;BR /&gt;FPUnit: 6 code (BP) slots and 2 literal slots&lt;BR /&gt;CoreSight components:&lt;BR /&gt;ROMTbl[0] @ E00FF000&lt;BR /&gt;[0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7&lt;BR /&gt;[0][1]: E0001000 CID B105E00D PID 003BB002 DWT&lt;BR /&gt;[0][2]: E0002000 CID B105E00D PID 002BB003 FPB&lt;BR /&gt;[0][3]: E0000000 CID B105E00D PID 003BB001 ITM&lt;BR /&gt;[0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU&lt;BR /&gt;[0][5]: E0041000 CID B105900D PID 000BB925 ETM&lt;BR /&gt;Memory zones:&lt;BR /&gt;Zone: "Default" Description: Default access mode&lt;BR /&gt;Cortex-M4 identified.&lt;BR /&gt;J-Link&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What could be going wrong?&lt;/P&gt;</description>
    <pubDate>Fri, 06 Feb 2026 00:40:28 GMT</pubDate>
    <dc:creator>durga_choudhury</dc:creator>
    <dc:date>2026-02-06T00:40:28Z</dc:date>
    <item>
      <title>Cannot program flash over JTAG</title>
      <link>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2313290#M56637</link>
      <description>&lt;P&gt;The details about this question is as follows:&lt;/P&gt;&lt;P&gt;MCU: S32K148 in 144 pin backage on a custom designed board.&lt;/P&gt;&lt;P&gt;JTAG: JLink Plus in 10 pin configuration&lt;/P&gt;&lt;P&gt;IDE: S32DS 3.6.2 On Windows 11&lt;/P&gt;&lt;P&gt;Embedded OS: Bare metal with RTD 3.0.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The board in question is a copy-paste design of a previously working version. However, I cannot write to flash over the JTAG; the readback is all 0xFF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The JTAG pinout is as shown below:&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="durga_choudhury_0-1770336172776.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/375765i41E12CA54AB29991/image-size/medium?v=v2&amp;amp;px=400" role="button" title="durga_choudhury_0-1770336172776.png" alt="durga_choudhury_0-1770336172776.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And on the MCU, they are routed as follows:&lt;/P&gt;&lt;P&gt;TMS (JTAG pin 2) is connected to MCU pin 142 (JTAG_TMS)&lt;/P&gt;&lt;P&gt;TCK (JTAG pin 4) is connected to MCU pin 140 (JTAG_TCLK)&lt;/P&gt;&lt;P&gt;nRESET (JTAG pin 10) is connected to MCU pin 141 (reset_b)&lt;/P&gt;&lt;P&gt;TDO (JTAG pin 6) is connected to MCU pin 136 (JTAG_TDO)&lt;/P&gt;&lt;P&gt;TDI (JTAG pin 6) is connected to MCU pin 139 (JTAG_TDI)&lt;/P&gt;&lt;P&gt;Vref (JTAG pin 1) is connected to 3.3V) (as evidenced by the LED on the JLINK turning green at the start of a code download and staying orange'ish (i.e. both red and green on) at connection, also Jlink confirms that the target voltage is 3.3V)&lt;/P&gt;&lt;P&gt;The pull up/down values are as per the schematic above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this, I am not able to write to the flash. After code download, the memory regions just written as read back as 0xFF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output from Jlink is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J-Link&amp;gt;showhwstatus&lt;BR /&gt;VTref=3.341V&lt;BR /&gt;ITarget=0mA&lt;BR /&gt;TCK=1 TDI=0 TDO=1 TMS=0 TRES=1 TRST=1&lt;BR /&gt;Supported target interface speeds:&lt;BR /&gt;- 180 MHz/n, (n&amp;gt;=12). =&amp;gt; 15000kHz, 13846kHz, 12857kHz, ...&lt;BR /&gt;- Adaptive clocking&lt;BR /&gt;J-Link&amp;gt;connect&lt;BR /&gt;Device "S32K148" selected.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Connecting to target via JTAG&lt;BR /&gt;ConfigTargetSettings() start&lt;BR /&gt;ConfigTargetSettings() end - Took 4us&lt;BR /&gt;InitTarget() start&lt;BR /&gt;JTAG selected. Identifying JTAG Chain...&lt;BR /&gt;TotalIRLen = 4, IRPrint = 0x01&lt;BR /&gt;JTAG chain detection found 1 devices:&lt;BR /&gt;#0 Id: 0x0995001D, IRLen: 04, JTAG-DP&lt;BR /&gt;JTAG Chain Identified. Connecting to DAP TAP...&lt;BR /&gt;Successfully connected to selected DAP TAP.&lt;BR /&gt;InitTarget() end - Took 55.4ms&lt;BR /&gt;TotalIRLen = 4, IRPrint = 0x01&lt;BR /&gt;JTAG chain detection found 1 devices:&lt;BR /&gt;#0 Id: 0x0995001D, IRLen: 04, JTAG-DP&lt;BR /&gt;DPv0 detected&lt;BR /&gt;AP map detection skipped. Manually configured AP map found.&lt;BR /&gt;AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000)&lt;BR /&gt;AP[0]: Core found&lt;BR /&gt;AP[0]: AHB-AP ROM base: 0xE00FF000&lt;BR /&gt;CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)&lt;BR /&gt;Found Cortex-M4 r0p1, Little endian.&lt;BR /&gt;FPUnit: 6 code (BP) slots and 2 literal slots&lt;BR /&gt;CoreSight components:&lt;BR /&gt;ROMTbl[0] @ E00FF000&lt;BR /&gt;[0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7&lt;BR /&gt;[0][1]: E0001000 CID B105E00D PID 003BB002 DWT&lt;BR /&gt;[0][2]: E0002000 CID B105E00D PID 002BB003 FPB&lt;BR /&gt;[0][3]: E0000000 CID B105E00D PID 003BB001 ITM&lt;BR /&gt;[0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU&lt;BR /&gt;[0][5]: E0041000 CID B105900D PID 000BB925 ETM&lt;BR /&gt;Memory zones:&lt;BR /&gt;Zone: "Default" Description: Default access mode&lt;BR /&gt;Cortex-M4 identified.&lt;BR /&gt;J-Link&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What could be going wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 00:40:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2313290#M56637</guid>
      <dc:creator>durga_choudhury</dc:creator>
      <dc:date>2026-02-06T00:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot program flash over JTAG</title>
      <link>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2314680#M56682</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/250000"&gt;@durga_choudhury&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There’s nothing wrong in the log, J-Link is obviously able to communicate with the device and I can’t see any error.&lt;/P&gt;
&lt;P&gt;I can see commands showhwstatus and connect in the log. How do you program your application? Could you share whole script? Or do you try to program the device by J-Link Commander or by S32 Design Studio?&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>Mon, 09 Feb 2026 11:55:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2314680#M56682</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2026-02-09T11:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot program flash over JTAG</title>
      <link>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2314757#M56687</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/37795"&gt;@lukaszadrapa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your comments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am programming the device over S32 Design Studio v 3.6.2 (as opposed to the Jlink scripts). As I mentioned before, this works with our previous generation of the boards, but not with this one.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 14:04:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2314757#M56687</guid>
      <dc:creator>durga_choudhury</dc:creator>
      <dc:date>2026-02-09T14:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot program flash over JTAG</title>
      <link>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2316394#M56745</link>
      <description>&lt;P&gt;Could you please share whole log from S32DS to see if anything is failing there? Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 11:03:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2316394#M56745</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2026-02-11T11:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot program flash over JTAG</title>
      <link>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2316594#M56755</link>
      <description>&lt;P&gt;The JTAG connection error, when launching via S32 DS v 3.6.2 is as follows:&lt;/P&gt;&lt;P&gt;I see the error window shown below, and if I choose to erase the whole chip this same window appears again, followed by the error window shown next. Please keep in mind that this is a freshly laid out board and I am trying to bring it up.&lt;/P&gt;&lt;P&gt;I am not sure if the issue is with the JTAG connection on the board (which seems unlikely because a scan of the JTAG chain with Jlink is successful, and the same JTAG pod works fine with our previous generation boards based on the same chip) or with the chip somehow being protected (which also seems unlikely because this is a factory fresh board)&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="Segger_error.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/376556i7CA0CC7169F7636C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Segger_error.png" alt="Segger_error.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="Segger_error2.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/376557i170D3F108C40D059/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Segger_error2.png" alt="Segger_error2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 16:42:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2316594#M56755</guid>
      <dc:creator>durga_choudhury</dc:creator>
      <dc:date>2026-02-11T16:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot program flash over JTAG</title>
      <link>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2317631#M56793</link>
      <description>&lt;P&gt;In Debug Configurations in S32DS, what is the communication speed? If I can remember, there's 1MHz by default. If it is higher in your configuration, try to use 1MHZ or even lower.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any external watchdog on the board? Maybe SBC with watchdog?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And have you tried to program the device directly by JLink commander?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Feb 2026 08:08:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Cannot-program-flash-over-JTAG/m-p/2317631#M56793</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2026-02-13T08:08:17Z</dc:date>
    </item>
  </channel>
</rss>

