<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Can&amp;#39;t debug the system with jlink</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118669/can-t-debug-the-system-with-jlink</link><description>I have tried to debug my nordic5340 with VS code and it fails to load the code, although I&amp;#39;m able to flash the code using vs code. 
 when trying to track the problem using the Jlink commander I get a message the jlink fails to connect as my device is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Feb 2025 14:45:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118669/can-t-debug-the-system-with-jlink" /><item><title>RE: Can't debug the system with jlink</title><link>https://devzone.nordicsemi.com/thread/524648?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 14:45:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ddb10b2-fd5b-418a-883d-68d769ed94e4</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/ap_protect.html#enabling_software_ap-protect_with_confignrfapprotectuseuicr"&gt;I believe there are a few different ways of disabling it&lt;/a&gt;, and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/106996/nrf53-network-core-remains-secured"&gt;easy to miss something you&lt;/a&gt; need to enable it, but essentially you need to configure it to be off in both the netcore and appcore.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What you essentially need to do is to make sure that&amp;nbsp;&lt;span&gt;ENABLE_APPROTECT_USER_HANDLING (and&amp;nbsp;ENABLE_SECURE_APPROTECT_USER_HANDLING for the appcore) are set in the project. And then call&amp;nbsp;nrf53_handle_approtect() early on it the initialization of the code. Do all of this for both the appcore and netcore code if you have custom applications running on both; if just the BLE stack is running on the netcore then just doing the appcore should be okay.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If that doesn&amp;#39;t work,&amp;nbsp;check if&amp;nbsp;CONFIG_NRF_APPROTECT_USE_UICR is set.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Elfving&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't debug the system with jlink</title><link>https://devzone.nordicsemi.com/thread/524348?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 13:24:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40fbe1a7-726f-41e1-98dd-80b81c528391</guid><dc:creator>levijo</dc:creator><description>&lt;p&gt;It also seems to me as an autoprotect issue, but in the other hand it is working well with the DK, using the same auto protection configurations&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't debug the system with jlink</title><link>https://devzone.nordicsemi.com/thread/524311?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 11:05:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee28beff-9904-4a11-9229-54c57bd24f5d</guid><dc:creator>levijo</dc:creator><description>&lt;p&gt;I&amp;#39;m using version 2.7.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't debug the system with jlink</title><link>https://devzone.nordicsemi.com/thread/522137?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2025 08:39:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:441f1fe4-43da-40d8-8ff0-b8c19f9b9e55</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/allowing-debugger-access-to-an-nrf5340"&gt;Looks like approtect&amp;nbsp;being enabled is the issue&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/ap_protect.html#enabling_software_ap-protect_with_confignrfapprotectuseuicr"&gt;You can disable that&lt;/a&gt;&amp;nbsp;to debug it, though how you do it depends a bit on the NCS version. And you&amp;#39;ll have to do it for both the netcore and appcore for the nRF5340. What NCS version are you using?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't debug the system with jlink</title><link>https://devzone.nordicsemi.com/thread/522095?ContentTypeID=1</link><pubDate>Sun, 09 Feb 2025 07:46:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99a207b8-677c-4436-8d92-ff70aeded38c</guid><dc:creator>levijo</dc:creator><description>&lt;p&gt;sometimes the debug console shows the following logs, which implies that the jlink debug server was able to connect but vs code doesn&amp;#39;t show anything on the IDE:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;JLinkGDBServerCL: SEGGER J-Link GDB Server V8.12d Command Line Version
JLinkGDBServerCL: 
JLinkGDBServerCL: JLinkARM.dll V8.12d (DLL compiled Jan 29 2025 13:06:04)
JLinkGDBServerCL: 
JLinkGDBServerCL: -----GDB Server start settings-----
JLinkGDBServerCL: GDBInit file:                  none
JLinkGDBServerCL: GDB Server Listening port:     57568
JLinkGDBServerCL: SWO raw output listening port: 2332
JLinkGDBServerCL: Terminal I/O port:             2333
JLinkGDBServerCL: Accept remote connection:      localhost only
JLinkGDBServerCL: Generate logfile:              off
JLinkGDBServerCL: Verify download:               off
JLinkGDBServerCL: Init regs on start:            off
JLinkGDBServerCL: Silent mode:                   on
JLinkGDBServerCL: Single run mode:               on
JLinkGDBServerCL: Target connection timeout:     0 ms
JLinkGDBServerCL: ------J-Link related settings------
JLinkGDBServerCL: J-Link Host interface:         USB
JLinkGDBServerCL: J-Link script:                 none
JLinkGDBServerCL: J-Link settings file:          none
JLinkGDBServerCL: ------Target related settings------
JLinkGDBServerCL: Target device:                 nrf5340_xxaa_app
JLinkGDBServerCL: Target device parameters:      none
JLinkGDBServerCL: Target interface:              SWD
JLinkGDBServerCL: Target interface speed:        12000kHz
JLinkGDBServerCL: Target endian:                 little
JLinkGDBServerCL: 
=thread-group-added,id=&amp;quot;i1&amp;quot;
=cmd-param-changed,param=&amp;quot;pagination&amp;quot;,value=&amp;quot;off&amp;quot;
arch_cpu_atomic_idle (key=32) at C:/Repos/Genio2.2/genio-worskpace/zephyr/arch/arm/core/cortex_m/cpu_idle.c:131
131		SLEEP_IF_ALLOWED(__WFE);
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't debug the system with jlink</title><link>https://devzone.nordicsemi.com/thread/521688?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 10:52:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e833b0d8-4900-47cd-a694-e267d17c47d0</guid><dc:creator>levijo</dc:creator><description>&lt;p&gt;also recovering helps when the device program fails, but the connection to the j-link for debugging always fails&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't debug the system with jlink</title><link>https://devzone.nordicsemi.com/thread/521686?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 10:47:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3da73f32-2069-4748-b96f-52e82f35e782</guid><dc:creator>levijo</dc:creator><description>&lt;p&gt;Hi Elfving,&lt;/p&gt;
&lt;p&gt;This debug is working in the evaluation board; its our board, which is based on nRF5340 MCU that I can&amp;#39;t connect with a debugger. Flashing with the VS code is working well but it seems like some security locks not allowing to connect with the J-link.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't debug the system with jlink</title><link>https://devzone.nordicsemi.com/thread/521681?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 10:06:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e3613c4-a312-43a6-a81d-ac1356e0c302</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hi again&amp;nbsp;Joshua,&lt;/p&gt;
&lt;p&gt;Does recovering or &amp;quot;erasing all&amp;quot; help? Do you have all the switches on the board on the board in the default position?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>