<?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: Connect JLink without active connection</title>
    <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1876361#M35897</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/234079"&gt;@peacefulcarrot&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;J-link / Pylink are not NXP products, I can't help you with the script.&lt;/P&gt;
&lt;P&gt;Is the MCU going through reset when you run the script?&lt;/P&gt;
&lt;P&gt;Do you monitor the reset_b pin?&lt;/P&gt;
&lt;P&gt;What is the source of the reset, can you read RCM_SRS?&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2024 13:48:37 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2024-05-28T13:48:37Z</dc:date>
    <item>
      <title>Connect JLink without active connection</title>
      <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1874632#M35777</link>
      <description>&lt;P&gt;Hi nxp,&lt;/P&gt;&lt;P&gt;I am trying to use rtt buffers and a j-link to communicate data back and forth from an s32k144w to a pc.&lt;/P&gt;&lt;P&gt;For this purpose I am using pylink at the pc side.&lt;/P&gt;&lt;P&gt;When performing the following steps, everything works fine:&lt;/P&gt;&lt;P&gt;1. Start gdb server on pc&lt;/P&gt;&lt;P&gt;2. Connect to target using gdb server&lt;/P&gt;&lt;P&gt;3. Start communication on pc with Python script using pylink&lt;/P&gt;&lt;P&gt;The first 'weird' behaviour that I see is that when I start my Python script, the s32 breaks in the `Reset_Handler()`, I don't really understand why. When I continue in my debugging session, the script runs without a problem and I can communicate with the s32.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that when I do not connect to the gdb server, the script doesn't work. It is my gut feeling that the s32 falls in the `Reset_Handler()` and is just stuck there. Do you have any idea what the difference would be in the two situations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For some more context, in the Python script I perform the following steps:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;jlink&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;pylink&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;JLink&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;jlink&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;open&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ip_addr&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;ipaddr&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;jlink&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;set_tif&lt;/SPAN&gt;&lt;SPAN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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;jlink&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;rtt_get_num_up_buffers&lt;/SPAN&gt;&lt;SPAN&gt;() &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; The program hangs here&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;jlink&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;rtt_get_num_down_buffers&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;break&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;except&lt;/SPAN&gt; &lt;SPAN&gt;pylink&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;errors&lt;/SPAN&gt;&lt;SPAN&gt;.JLinkRTTException:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;sleep&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;0.1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any pointers to why this is happening would be greatly appreciated!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 May 2024 12:30:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1874632#M35777</guid>
      <dc:creator>peacefulcarrot</dc:creator>
      <dc:date>2024-05-24T12:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Connect JLink without active connection</title>
      <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1876361#M35897</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/234079"&gt;@peacefulcarrot&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;J-link / Pylink are not NXP products, I can't help you with the script.&lt;/P&gt;
&lt;P&gt;Is the MCU going through reset when you run the script?&lt;/P&gt;
&lt;P&gt;Do you monitor the reset_b pin?&lt;/P&gt;
&lt;P&gt;What is the source of the reset, can you read RCM_SRS?&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 13:48:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1876361#M35897</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2024-05-28T13:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Connect JLink without active connection</title>
      <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1882693#M36307</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply :-).&lt;/P&gt;&lt;P&gt;Reading RCM_SRS returns 0x400, which indicates a SW reset (-&amp;gt;&amp;nbsp;RCM_SRS[SW] bit).&lt;/P&gt;&lt;P&gt;This reset seems to come from the `&lt;SPAN&gt;jlink.connect(device)` command. We haven't had these issues on other targets (Nordic for example) so I was wondering why the device seems to get stuck in the `Reset_Handler()`?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 11:00:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1882693#M36307</guid>
      <dc:creator>peacefulcarrot</dc:creator>
      <dc:date>2024-06-06T11:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Connect JLink without active connection</title>
      <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1882704#M36310</link>
      <description>&lt;P&gt;The SW reset can be called either by the application core or the debugger, there is no other way.&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;/*FUNCTION**********************************************************************
*
* Function Name : SystemSoftwareReset
* Description : This function is used to initiate a system reset
*
* Implements : SystemSoftwareReset_Activity
*END**************************************************************************/
void SystemSoftwareReset(void)
{
uint32_t regValue;
/* Read Application Interrupt and Reset Control Register */
regValue = S32_SCB-&amp;gt;AIRCR;
/* Clear register key */
regValue &amp;amp;= ~( S32_SCB_AIRCR_VECTKEY_MASK);
/* Configure System reset request bit and Register Key */
regValue |= S32_SCB_AIRCR_VECTKEY(FEATURE_SCB_VECTKEY);
regValue |= S32_SCB_AIRCR_SYSRESETREQ(0x1u);
/* Write computed register value */
S32_SCB-&amp;gt;AIRCR = regValue;
}&lt;/LI-CODE&gt;
&lt;P&gt;The debugger can then catch it at the reset vector.&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, 06 Jun 2024 11:19:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1882704#M36310</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2024-06-06T11:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Connect JLink without active connection</title>
      <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1882717#M36311</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;But my issue remains the same. When the debugger is attached, I can get the system to work. If the debugger is not attached, I cannot get the system to work.&lt;/P&gt;&lt;P&gt;It seem that, for some reason, the reset hangs when the debugger is not connected? However, I cannot verify this, since I cannot attach the debugger...&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 11:33:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1882717#M36311</guid>
      <dc:creator>peacefulcarrot</dc:creator>
      <dc:date>2024-06-06T11:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Connect JLink without active connection</title>
      <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1882777#M36314</link>
      <description>&lt;P&gt;So if I understand correctly, only calling `&lt;SPAN&gt;SystemSoftwareReset()` can cause the `&lt;/SPAN&gt;&lt;SPAN&gt;RCM_SRS[SW]` bit to be set?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When setting a breakpoint on this function (in the `system_S32K144W.c` file), this function is never reached when running my script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Steps taken:&lt;/P&gt;&lt;P&gt;1. Start debugger&lt;BR /&gt;2. Place breakpoint on `SystemSoftwareReset()` function&lt;BR /&gt;3. Start the Python JLink script&lt;BR /&gt;4. Debugger breaks in `Reset_Handler()`&lt;BR /&gt;5. Continue debugger &amp;gt; system restarts and falls in main breakpoint&lt;BR /&gt;6. Read out RCM, SW reset bit is set. `SystemSoftwareReset()` is not reached.&lt;/P&gt;&lt;P&gt;It seems like the reset is initiated some other way?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 13:16:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1882777#M36314</guid>
      <dc:creator>peacefulcarrot</dc:creator>
      <dc:date>2024-06-06T13:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Connect JLink without active connection</title>
      <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1886258#M36508</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/234079"&gt;@peacefulcarrot&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Since you are not able to attach the debugger, you don't know what reset is it while the debugger is not connected and the MCU is running stand-alone. You would need to read the RCM_SRS register in the application and send it out using another interface.&lt;/P&gt;
&lt;P&gt;In general, the debugger can disable the WDOG, initialize SRAM ECC, enable some peripheral clocks etc, hard to tell what could be issue here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 14:50:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1886258#M36508</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2024-06-12T14:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Connect JLink without active connection</title>
      <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1903779#M37367</link>
      <description>&lt;P&gt;Raking up an old topic...&lt;/P&gt;&lt;P&gt;By accident I used another target when connecting through pylink ( `&lt;SPAN&gt;NRF52832_XXAA` instead of `S32K144W`) and this works! Any idea why using an nRF as target (which also has a M4) works, but specifying S32 as a target doesn't?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 07:55:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1903779#M37367</guid>
      <dc:creator>peacefulcarrot</dc:creator>
      <dc:date>2024-07-09T07:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Connect JLink without active connection</title>
      <link>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1904205#M37433</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/234079"&gt;@peacefulcarrot&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I would recommend contacting SEGGER support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 10:51:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Connect-JLink-without-active-connection/m-p/1904205#M37433</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2024-07-09T10:51:14Z</dc:date>
    </item>
  </channel>
</rss>

