<?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>Custom board with nRF5340: after reset firmware does not run and SWD is locked</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126314/custom-board-with-nrf5340-after-reset-firmware-does-not-run-and-swd-is-locked</link><description>I&amp;#39;m using ncs 3.2.1 with a custom board (Holyiot-20046-v1.0). I used the &amp;quot;Create a new board&amp;quot; function in nRF Connect VSCODE to create the board file. I copied the Zephyr Blinky sample and added an alias for led0. All builds and run from the debugger</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Jan 2026 14:25:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126314/custom-board-with-nrf5340-after-reset-firmware-does-not-run-and-swd-is-locked" /><item><title>RE: Custom board with nRF5340: after reset firmware does not run and SWD is locked</title><link>https://devzone.nordicsemi.com/thread/558295?ContentTypeID=1</link><pubDate>Thu, 08 Jan 2026 14:25:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f91ca80-4fda-4a0c-a850-768717581562</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Dennis,&amp;nbsp;&lt;br /&gt;From what showed in the &lt;a href="http://www.holyiot.com/tp/2021091016524433883.pdf"&gt;schematic of the module&lt;/a&gt;, there is an inductor on DCCH pin. So it&amp;#39;s quite strange that setting&amp;nbsp;&lt;span&gt;regulator-initial-mode to LDO changed the behavior.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you have a 2nd board that you can test with ? Just in case it&amp;#39;s an issue with one single board.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you have a nRF5340 DK , can you compile an application for the custom board and flash on the DK, do you see the same problem ? I think this should reveal if it&amp;#39;s the issue with the hardware on the board or it&amp;#39;s the firmware configuration.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;If you don&amp;#39;t have a DK, have you tried to flash an application built for a DK to the custom board ? From what I can see you should be a able to run a default application for the DK on the module as it&amp;nbsp; has both the crystals, and DCDC enabled.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom board with nRF5340: after reset firmware does not run and SWD is locked</title><link>https://devzone.nordicsemi.com/thread/558212?ContentTypeID=1</link><pubDate>Wed, 07 Jan 2026 18:00:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:371d1beb-2fb9-4a12-8078-f76bce09d92b</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;The firmware does not run properly after a power cycle.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the Zephyr Blinky sample for testing. &amp;nbsp;When I flash and debug from VSCode it works fine. &amp;nbsp;When I power cycle the board, the firmware does not appear to run - the LED does not flash. &amp;nbsp;However, I can connect the debugger and then the firmware does run. &amp;nbsp;If I power cycle a few more times, then I cannot even attach the debugger. &amp;nbsp;&lt;span&gt;When I flash and debug from VSCode again, it starts working again.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom board with nRF5340: after reset firmware does not run and SWD is locked</title><link>https://devzone.nordicsemi.com/thread/558016?ContentTypeID=1</link><pubDate>Tue, 06 Jan 2026 11:43:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff2b6e57-3702-4b9d-ac91-e101ebdb5ebd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Denis,&amp;nbsp;&lt;br /&gt;nrfjproj --recover --coprocessor CP_NETWORK does write to the network core with a small image that disable APPROTECT.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regarding the issue with debugger and power reset, did the application run normally when you do a second power reset ? And the issue was only with the debugger ? In your code do you do anything special ? Have you tested with a very simple code of blinking an LED?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom board with nRF5340: after reset firmware does not run and SWD is locked</title><link>https://devzone.nordicsemi.com/thread/557796?ContentTypeID=1</link><pubDate>Fri, 02 Jan 2026 02:00:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f18e3faf-9553-48b5-9cf4-060f5cfb2314</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;I have added the following to *cpuapp.dts:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;amp;vregmain {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#ff0000;"&gt; regulator-initial-mode = &amp;lt;NRF5X_REG_MODE_LDO&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#ff0000;"&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;amp;vregradio {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#ff0000;"&gt; regulator-initial-mode = &amp;lt;NRF5X_REG_MODE_LDO&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#ff0000;"&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;And the following to&amp;nbsp;&lt;/span&gt;prj.conf:&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#ff0000;"&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I do not need to erase and recover any more however, so some progress.&lt;/p&gt;
&lt;p&gt;However, still having some issues. &amp;nbsp;After the first power cycle of the board, I can attach the debugger and the code is running. &amp;nbsp;However, after another power cycle I can attach the debugger, but the code does not seem to be running. &amp;nbsp;The debugger just shows:&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;0xeffffffe in ?? ()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;rather than:&lt;/p&gt;
&lt;div id="list_id_3_30" class="monaco-list-row" data-index="30" data-last-element="false" data-parity="even"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt;arch_cpu_idle () at /Users/denis/sandbox/denisbohm/gremlins-playground/workspace/zephyr/arch/arm/core/cortex_m/cpu_idle.c:99 &lt;/span&gt;&lt;/span&gt;
&lt;div class="source"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="list_id_3_31" class="monaco-list-row" data-index="31" data-last-element="false" data-parity="odd"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt;99 SLEEP_IF_ALLOWED(__WFI); &lt;/span&gt;&lt;/span&gt;
&lt;div class="source"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="list_id_3_32" class="monaco-list-row" data-index="32" data-last-element="false" data-parity="even"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt;[New Thread 536872192] &lt;/span&gt;&lt;/span&gt;
&lt;div class="source"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="list_id_3_33" class="monaco-list-row" data-index="33" data-last-element="false" data-parity="odd"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt;[New Thread 536872000] &lt;/span&gt;&lt;/span&gt;
&lt;div class="source"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="list_id_3_34" class="monaco-list-row" data-index="34" data-last-element="false" data-parity="even"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt;[New Thread 536872672] &lt;/span&gt;&lt;/span&gt;
&lt;div class="source"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="list_id_3_35" class="monaco-list-row" data-index="35" data-last-element="false" data-parity="odd"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt; &lt;/span&gt;&lt;/span&gt;
&lt;div class="source"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="list_id_3_36" class="monaco-list-row" data-index="36" data-last-element="false" data-parity="even"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt;Thread 3 received signal SIGTRAP, Trace/breakpoint trap. &lt;/span&gt;&lt;/span&gt;
&lt;div class="source"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="list_id_3_37" class="monaco-list-row" data-index="37" data-last-element="false" data-parity="odd"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt;[Switching to Thread 536872000] &lt;/span&gt;&lt;/span&gt;
&lt;div class="source"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="list_id_3_38" class="monaco-list-row" data-index="38" data-last-element="false" data-parity="even"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt;arch_cpu_idle () at /Users/denis/sandbox/denisbohm/gremlins-playground/workspace/zephyr/arch/arm/core/cortex_m/cpu_idle.c:99 &lt;/span&gt;&lt;/span&gt;
&lt;div class="source"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="list_id_3_39" class="monaco-list-row" data-index="39" data-last-element="false" data-parity="odd"&gt;
&lt;div class="monaco-tl-row"&gt;
&lt;div class="monaco-tl-contents output"&gt;
&lt;div class="output expression value-and-source"&gt;&lt;span class="value info" style="color:#ff0000;"&gt;&lt;span class=""&gt;99 SLEEP_IF_ALLOWED(__WFI);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;When in the non-working state, the debugger pause function doesn&amp;#39;t work so&amp;nbsp;I can&amp;#39;t examine registers, memory, etc.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Any idea why it would work after one power cycle, but not the second?&lt;/p&gt;
&lt;p&gt;Does the net core need to be&amp;nbsp;built and programmed with any special options? &amp;nbsp;Does &amp;quot;nrfjproj --recover --coprocessor CP_NETWORK&amp;quot; flash the network core with empty firmware?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom board with nRF5340: after reset firmware does not run and SWD is locked</title><link>https://devzone.nordicsemi.com/thread/557792?ContentTypeID=1</link><pubDate>Thu, 01 Jan 2026 19:29:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15d892ae-2a54-4a33-8f62-bdc811c569d7</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;Thanks for the tips. &amp;nbsp;I think the DCDC inductors must not be populated. &amp;nbsp;Adding the following to the dts resolved the issue:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;vregmain&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; regulator-initial-mode&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &amp;lt;&lt;/span&gt;&lt;span&gt;NRF5X_REG_MODE_LDO&lt;/span&gt;&lt;span&gt;&amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Might be a good idea for the ncs &amp;quot;Create a new board&amp;quot; wizard to do that by default (or better yet have&amp;nbsp;check box options to indicate if the DCDC and XLF components are present).&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom board with nRF5340: after reset firmware does not run and SWD is locked</title><link>https://devzone.nordicsemi.com/thread/557725?ContentTypeID=1</link><pubDate>Tue, 30 Dec 2025 11:59:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:689cdba5-5128-4b22-ae7c-2b0c18b86358</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Denis,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you give more log when you try to flash the board after the initial programming ? How did you do programming&amp;nbsp; ?&amp;nbsp;&lt;br /&gt;&amp;nbsp;Please be aware that by default after programming the APPROTECT will be activated locking the SWD interface.&amp;nbsp;&lt;br /&gt;When you have APPROTECT locking SWD you still can recover the chip by using nrfjprog --recover&amp;nbsp;&lt;br /&gt;Please double check to see if your module has the inductor for DCDC (L5 inductor on the &lt;span&gt;Holyiot-20046 schematic&lt;/span&gt;) and the 32kHz crystal.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you try to compile the blinky example for DK and try flashing on the module. At least you should be able to step in the code. There could be a chance that there is an issue with the custom board file you created. Have you copied the board files for the DK and adjust it to the module ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>