<?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>NRF52832 Jlink Debugging Zephyr application is impossible.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125079/nrf52832-jlink-debugging-zephyr-application-is-impossible</link><description>I have inherited a NRF52832 design, it uses Zephyr and I am using the NRF52 DK to debug the design using the SWDIO and SWDCLK. The board flashes correctly and I can single step the debugger all the way through the Zephyr initialisation code until it wants</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Oct 2025 06:43:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125079/nrf52832-jlink-debugging-zephyr-application-is-impossible" /><item><title>RE: NRF52832 Jlink Debugging Zephyr application is impossible.</title><link>https://devzone.nordicsemi.com/thread/552695?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2025 06:43:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8ebca24-de35-42c9-b768-0d2fc464dd70</guid><dc:creator>Zings</dc:creator><description>&lt;p&gt;Thanks Einar,&lt;br /&gt;&lt;br /&gt;I think I have found the answer. We drive LEDS on the PWM outputs. The dts file configures the pwm outputs with nordic,invert.&lt;br /&gt;&lt;br /&gt;ChatGPT:-&lt;/p&gt;
&lt;div data-olk-copy-source="MailCompose"&gt;If adding &lt;code&gt;nordic,invert&lt;/code&gt;&amp;nbsp;caused the debugger to drop, that&amp;rsquo;s often because:&lt;/div&gt;
&lt;ul data-end="2717" data-start="2515"&gt;
&lt;li&gt;
&lt;div&gt;All pins went &lt;b&gt;active&lt;/b&gt;&amp;nbsp;at init (due to inverted logic) and dumped current into LEDs/FETs &amp;rarr; brownout &amp;rarr; reset.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;When the driver released the PWM, the &amp;ldquo;inverted idle&amp;rdquo; held pins in an unexpected state.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I have removed nordic,invert and the debugger now runs into main and stops, single steps etc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 Jlink Debugging Zephyr application is impossible.</title><link>https://devzone.nordicsemi.com/thread/552648?ContentTypeID=1</link><pubDate>Tue, 28 Oct 2025 14:04:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5adbb070-3bfc-4a87-879d-c8811722ad7d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you share some information on your custom board? Particularily, if it has the optional 32.768 kHz oscillator and the optional DCDC inductors in place? The DK board files enabled both DCDC and LFXO and if your custom board files do too, tha tcould be a problem (which we see quite often).&lt;/p&gt;
&lt;p&gt;To disable the DCDC add&amp;nbsp;&lt;code&gt;CONFIG_BOARD_ENABLE_DCDC=n&lt;/code&gt; (or even better, don&amp;#39;t set it to y in the board fiels if the inductors are missing). To use LFRC instaed of LFXO, use &lt;code&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 Jlink Debugging Zephyr application is impossible.</title><link>https://devzone.nordicsemi.com/thread/552573?ContentTypeID=1</link><pubDate>Tue, 28 Oct 2025 05:05:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc3a8469-ebb9-472e-a535-2f91b399cda0</guid><dc:creator>Zings</dc:creator><description>&lt;p&gt;Update - I tried the version built for our hardware on the dev kit and it works with Ozone debugger no problems. So it appears that there is something configured in our board dts file that causes our hardware not to be debuggable. Any ideas?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 Jlink Debugging Zephyr application is impossible.</title><link>https://devzone.nordicsemi.com/thread/552570?ContentTypeID=1</link><pubDate>Tue, 28 Oct 2025 04:51:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03b5a6de-cb9a-4116-bb31-9e79b41de022</guid><dc:creator>Zings</dc:creator><description>&lt;p&gt;Thanks Einar,&lt;br /&gt;&lt;br /&gt;I built the Zephyr samples\basic\blinky_pwm as our board is configured with a pwm led. I built&amp;nbsp;&lt;br /&gt;west build -p always -b nrf52dk_nrf52832 &amp;quot;%ZEPHYR_BASE%\samples\basic\blinky_pwm&amp;quot;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;and also a version for our hardware. The nrf52dk worked perfectly with the&amp;nbsp; Ozone debugger. I then tried the same file in our hardware (fortunately there is a led on the right gpio) and it worked with the debugger too. Then I built blinky_pwm with our project board configuration and the dying behaviour returns. I can stop the code after main has started and then in a couple of seconds a pop up appears with &amp;quot;Failed to read target status. Abort Debug Session?&amp;quot;&lt;br /&gt;&lt;br /&gt;In order to build it with my board config I needed to add&lt;br /&gt;&amp;quot;CONFIG_PINCTRL=y &amp;quot; to prj.conf&amp;nbsp;&lt;br /&gt;add a file app.overlay to blinky_pwm folder.&lt;/p&gt;
&lt;p&gt;/ {&lt;br /&gt;&amp;nbsp; /* A logical PWM LED node the sample will use */&lt;br /&gt;&amp;nbsp; pwmleds {&lt;br /&gt;&amp;nbsp; &amp;nbsp; compatible = &amp;quot;pwm-leds&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; pwm_led0: pwm_led_0 {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* controller, channel, period, flags */&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pwms = &amp;lt;&amp;amp;pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL&amp;gt;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; label = &amp;quot;PWM_LED0&amp;quot;;&lt;br /&gt;&amp;nbsp; &amp;nbsp; };&lt;br /&gt;&amp;nbsp; };&lt;/p&gt;
&lt;p&gt;&amp;nbsp; aliases {&lt;br /&gt;&amp;nbsp; &amp;nbsp; pwm-led0 = &amp;amp;pwm_led0;&lt;br /&gt;&amp;nbsp; };&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;//* app.overlay */&lt;br /&gt;&amp;amp;pwm0 {&lt;br /&gt;&amp;nbsp; status = &amp;quot;okay&amp;quot;;&lt;br /&gt;&amp;nbsp; pinctrl-0 = &amp;lt;&amp;amp;pwm0_default_custom&amp;gt;;&lt;br /&gt;&amp;nbsp; pinctrl-1 = &amp;lt;&amp;amp;pwm0_sleep_custom&amp;gt;;&lt;br /&gt;&amp;nbsp; pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;&amp;amp;pinctrl {&lt;br /&gt;&amp;nbsp; pwm0_default_custom: pwm0_default_custom {&lt;br /&gt;&amp;nbsp; &amp;nbsp; group1 { psels = &amp;lt;NRF_PSEL(PWM_OUT0, 0, 17)&amp;gt;; };&lt;br /&gt;&amp;nbsp; };&lt;br /&gt;&amp;nbsp; pwm0_sleep_custom: pwm0_sleep_custom {&lt;br /&gt;&amp;nbsp; &amp;nbsp; group1 { psels = &amp;lt;NRF_PSEL(PWM_OUT0, 0, 17)&amp;gt;; };&lt;br /&gt;&amp;nbsp; &amp;nbsp; /* optional low-power props */&lt;br /&gt;&amp;nbsp; };&lt;br /&gt;};&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 Jlink Debugging Zephyr application is impossible.</title><link>https://devzone.nordicsemi.com/thread/552367?ContentTypeID=1</link><pubDate>Fri, 24 Oct 2025 14:11:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b076e3c2-7310-4b6d-ba69-5b45a1d5ddf7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Interrupts itself should not cause problems for debugging. If the problem is debug related, then I suggest taking a step back and starting there, as digging down into interrupts may not be relevant for the issue you are attempting to solve.&lt;/p&gt;
&lt;p&gt;Can you explain in a bit more detail the debug issue and what you do? Also, just to get a base line, do you have a development kit and are you able to debug the blinky sample on that? This could help us establish if the tools on your computer work properly. If so, the next step would be if you can explain in more detail how you debug your custom board and application and more on how it fails.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 Jlink Debugging Zephyr application is impossible.</title><link>https://devzone.nordicsemi.com/thread/552309?ContentTypeID=1</link><pubDate>Fri, 24 Oct 2025 04:28:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4034cec2-e2e6-4625-aa23-df7eb3e41359</guid><dc:creator>Zings</dc:creator><description>&lt;p&gt;Thanks Einar,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I appreciate the help, I have just picked up Zephyr and NRF52832 and trying to get my head around all the moving pieces.&lt;/p&gt;
&lt;p&gt;I checked what interrupts were enabled, by adding code just after main and ran it without the &lt;br /&gt;debugger.&lt;/p&gt;
&lt;p&gt;00&amp;gt; *** Booting Zephyr OS build v3.3.99-ncs1-2 *** &lt;br /&gt;00&amp;gt; == IRQs enabled right after boot == &lt;br /&gt;00&amp;gt; 0 POWER_CLOCK en=1 pend=0 act=0 prio=2 &lt;br /&gt;00&amp;gt; 6 GPIOTE en=1 pend=0 act=0 prio=6 &lt;br /&gt;00&amp;gt; 7 SAADC en=1 pend=0 act=0 prio=2 &lt;br /&gt;00&amp;gt; 17 RTC1 en=1 pend=0 act=0 prio=2&lt;br /&gt;&lt;br /&gt;I managed to turn off SAADC interrupts and debugging still dies when main is called, so I think SAADC is off the hook now. It was my prime suspect as it is triggered by a timer, so the potential for interrupts to happen before the main code starts was possible.&lt;br /&gt;&lt;br /&gt;I asked&amp;nbsp;ChatGPT about the remaining interrupts.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;POWER_CLOCK en=1 prio=2 &amp;larr; clock/power driver (expected)&lt;br /&gt;GPIOTE en=1 prio=6 &amp;larr; gpio-keys/input driver&lt;br /&gt;RTC1 en=1 prio=2 &amp;larr; Zephyr system timer (always on)&lt;br /&gt;&lt;br /&gt;So I tried to disable GPIOTE but cannot. Would GPIOTE interrupts cause J-Link debugger to die? The hardware is configured to use a timer at 1kHz to trigger the SAADC, would having 1kHz of interrupts possibly &amp;quot;unexpected interrupts&amp;quot; cause a problem for J-Link?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 Jlink Debugging Zephyr application is impossible.</title><link>https://devzone.nordicsemi.com/thread/551949?ContentTypeID=1</link><pubDate>Mon, 20 Oct 2025 13:16:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e1a2634-e336-4388-b291-ab98db983925</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you are using the Zephyr ADC driver, the ADC itself is initialized before the main thread runs (you can see &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/ff8f0c579eeb896876b6f36aca70c2bbfa756e19/drivers/adc/adc_nrfx_adc.c#L307"&gt;here&lt;/a&gt; it is&amp;nbsp;POST_KERNEL).&lt;/p&gt;
&lt;p&gt;Have you confirmed that it is ADC interrupts that is the problem (for instance, this does not happen if the ADC is not enabled)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>