<?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: K8x MCU Reset Fails (project execution fails before hitting initial breakpoint) in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1702262#M5073</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/83989"&gt;@deniscollis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm glad you found a workaround, I've been looking for the root cause and it could be caused by many debug sesions active, some hardware issues on your custom board, the mcu is not respondig to the reset or the debuger firmware version.&lt;/P&gt;
&lt;P&gt;Best Regards, Miguel.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2023 18:49:58 GMT</pubDate>
    <dc:creator>Miguel04</dc:creator>
    <dc:date>2023-08-09T18:49:58Z</dc:date>
    <item>
      <title>K8x MCU Reset Fails (project execution fails before hitting initial breakpoint)</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1700355#M5067</link>
      <description>&lt;P&gt;I need some troubleshooting ideas.&lt;/P&gt;&lt;P&gt;I have a custom board with K82, SDK2.8.0, MCUXresso IDE v11.7.1_9221, Segger J-Link Compact. There's a debug console on LPUART4.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Execution fails before hitting initial breakpoint. Debugger opens view on startup_mk82f25615.c:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="deniscollis_0-1691426364013.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235370i4BEB43AAF9D736C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="deniscollis_0-1691426364013.png" alt="deniscollis_0-1691426364013.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I hit pause:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="deniscollis_1-1691426437714.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/235371iE1D0D3D3C7862C75/image-size/medium?v=v2&amp;amp;px=400" role="button" title="deniscollis_1-1691426437714.png" alt="deniscollis_1-1691426437714.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I then disconnect J-Link and power cycle the board it still does not run (my LED heartbeat indicator is dead).&lt;/P&gt;&lt;P&gt;If I then load the .bin file with J-Link Commander (V7.86e), I get:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;J-Link&amp;gt;loadbin C:\Projects\sspm-cl-v1\DTE_L2\sspm-cl-v1.bin 0
'loadbin': Performing implicit reset &amp;amp; halt of MCU.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Reset: SYSRESETREQ has confused core.
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Skipped. Could not read CPUID register
Attach to CPU failed. Executing connect under reset.
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Skipped. Could not read CPUID register
Could not find core in Coresight setup
Reset: Using fallback: VECTRESET.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.VECTRESET.
Reset: VECTRESET has confused core.
Reset: Using fallback: Reset pin.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via reset pin
Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
Reset: Reconnecting and manually halting CPU.
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Skipped. Could not read CPUID register
Attach to CPU failed. Executing connect under reset.
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Skipped. Could not read CPUID register
Could not find core in Coresight setup
T-bit of XPSR is 0 but should be 1. Changed to 1.
AfterResetTarget()
Downloading file [C:\Projects\sspm-cl-v1\DTE_L2\sspm-cl-v1.bin]...
HandleBeforeFlashProg() start
HandleBeforeFlashProg() end - Took 4us

****** Error: Failed to preserve target RAM @ 0x1FFF0000-0x2002FFFF.
Failed to prepare for programming.
Unspecified error -1
J-Link&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 17:17:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1700355#M5067</guid>
      <dc:creator>deniscollis</dc:creator>
      <dc:date>2023-08-07T17:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: K8x MCU Reset Fails (project execution fails before hitting initial breakpoint)</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1700529#M5069</link>
      <description>&lt;P&gt;The issue appears to resolve when I unplug the Serial-to-USB cable connecting the UART to the PC and power-cycle the board.&amp;nbsp; After restarting MCUXpresso and restarting the debug, execution then stops at the first statement in main(), as expected.&amp;nbsp; I can then reconnect the Serial-to-USB cable, and resume execution.&lt;/P&gt;&lt;P&gt;Does anyone know why this could be so, and how to fix it?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 16:49:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1700529#M5069</guid>
      <dc:creator>deniscollis</dc:creator>
      <dc:date>2023-09-19T16:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: K8x MCU Reset Fails (project execution fails before hitting initial breakpoint)</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1702262#M5073</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/83989"&gt;@deniscollis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm glad you found a workaround, I've been looking for the root cause and it could be caused by many debug sesions active, some hardware issues on your custom board, the mcu is not respondig to the reset or the debuger firmware version.&lt;/P&gt;
&lt;P&gt;Best Regards, Miguel.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 18:49:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1702262#M5073</guid>
      <dc:creator>Miguel04</dc:creator>
      <dc:date>2023-08-09T18:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: K8x MCU Reset Fails (project execution fails before hitting initial breakpoint)</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1703249#M5075</link>
      <description>Hi Miguel. I have posted a support ticket with Segger. I'll revert with their findings. Thanks.</description>
      <pubDate>Thu, 10 Aug 2023 21:12:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1703249#M5075</guid>
      <dc:creator>deniscollis</dc:creator>
      <dc:date>2023-08-10T21:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: K8x MCU Reset Fails (project execution fails before hitting initial breakpoint)</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1706109#M5079</link>
      <description>&lt;P&gt;Narrowing down the issue.&lt;/P&gt;&lt;P&gt;I have found that the MCU fails to reset only if, on a previous session, functions are called that are in a library archive (libxxx.a). This is library provided by a third party - no source code - so are obviously not 'debuggable'.&lt;/P&gt;&lt;P&gt;However, in the normal operational (not debug) environment, the board appears to run without any issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 00:55:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1706109#M5079</guid>
      <dc:creator>deniscollis</dc:creator>
      <dc:date>2023-08-17T00:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: K8x MCU Reset Fails (project execution fails before hitting initial breakpoint)</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1730781#M5115</link>
      <description>&lt;P&gt;This was caused by the Flash Option (FOPT) Register config in &lt;SPAN&gt;startup_mk82f25615.c.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The board has a PN5180 NFC Frontend that uses the NMI pin on PTA4 for its IRQ.&amp;nbsp; This pin is also used for the K8x boot, but should not be.&amp;nbsp; The startup_MK82F25615c template used by the SDK sets the FOPT Config to 0x3D, which has&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;NMI_DIS bit is set, (NMI pin/interrupts reset default to 'enabled')&lt;/LI&gt;&lt;LI&gt;BOOTPIN_OPT is not set (which forces Boot from ROM is BOOTCFG0 is asserted - requires RESET pin enabled)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Changing to 0x3B:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;NMI is not set (NMI Interrupts are always blocked)&lt;/LI&gt;&lt;LI&gt;BOOTPIN_OPT is set (requires BOOTSRC_SEL to be set)&lt;/LI&gt;&lt;LI&gt;BOOTSRC_SEL is 00b (Boot from Internal Flash)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Which Stabilizes the debug environment so that it behaves as expected.&lt;/P&gt;&lt;P&gt;This also fixes reset issues like watchdog or __NVIC_SystemReset() not working. (See:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/Kinetis-Microcontrollers/NVIC-SystemReset-not-working-on-MK82/td-p/1723488" target="_self"&gt;NVIC_SystemReset not working on MK82&lt;/A&gt;&amp;nbsp;)&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 21:17:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/K8x-MCU-Reset-Fails-project-execution-fails-before-hitting/m-p/1730781#M5115</guid>
      <dc:creator>deniscollis</dc:creator>
      <dc:date>2023-09-27T21:17:03Z</dc:date>
    </item>
  </channel>
</rss>

