<?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 run program unless using debugger (ST-LINK V2 and OpenOCD)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68072/can-t-run-program-unless-using-debugger-st-link-v2-and-openocd</link><description>I&amp;#39;m trying to make the sample beacon in my custom nrf52832 board, builded by Segger Embedded Studio. 
 
 The code runs fine when I&amp;#39;m connected to the device with the OpenOCD, but as soon as I disconnect it and try to use only external power, it doesn</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Nov 2020 14:55:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68072/can-t-run-program-unless-using-debugger-st-link-v2-and-openocd" /><item><title>RE: Can't run program unless using debugger (ST-LINK V2 and OpenOCD)</title><link>https://devzone.nordicsemi.com/thread/279534?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 14:55:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a98a7cc1-8348-455d-b1d3-740193bff439</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You&amp;#39;re referring to &lt;a href="https://github.com/zephyrproject-rtos/zephyr/tree/master/samples/bluetooth/ibeacon"&gt;this IBeacon example&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Could you check if the DC/DC is enabled? Some of examples uses this as a default which will make the nRF assert if the external filter isn&amp;#39;t included.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can check this by reading the DCDCEN register after you&amp;#39;ve flashed the application:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrfjprog --memrd 0x40000578&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The DCDC can be disabled by adding this to the config file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_BOARD_ENABLE_DCDC=n&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't run program unless using debugger (ST-LINK V2 and OpenOCD)</title><link>https://devzone.nordicsemi.com/thread/279465?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 11:35:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04290af8-4917-439a-9e10-fc6846b99068</guid><dc:creator>arthurkafer</dc:creator><description>&lt;p&gt;I&amp;#39;m using some nRF Connect SDK projects, 1.4.0-rc1 release, and yes, I have an external crystal on the board, but it is not really been used on the project right now.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="73165" url="~/f/nordic-q-a/68072/can-t-run-program-unless-using-debugger-st-link-v2-and-openocd/279414#279414"]Well, are you using any kind of logging? If so, what backend are you using, RTT?[/quote]
&lt;p&gt;I actually don&amp;#39;t know how to use RTT and other types of logging, I was just using a LED in my board to check for errors in the code. The blinky example worked fine,&amp;nbsp;just the iBeacon example that was with the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't run program unless using debugger (ST-LINK V2 and OpenOCD)</title><link>https://devzone.nordicsemi.com/thread/279414?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 08:21:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d85d8d97-19a2-44c3-8345-daa273e7b2c4</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;Are you using the SDK or NCS, and what version are you using? And do you have an external crystals on the board?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="arthurkafer"]&lt;p&gt;I don&amp;#39;t remember where I read, but someone had the same problem here and he suggested to remove all types of printk on the program, and it actually worked, I don&amp;#39;t know how.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&amp;nbsp;Well, are you using any kind of logging? If so, what backend are you using, RTT?&lt;/p&gt;
&lt;p&gt;I have seen some &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/14618/nrf52-does-not-start-without-debugger"&gt;similar cases&lt;/a&gt; where the board doesn&amp;#39;t start without the debugger due to semi hosting being used. But this is usually related to older SDKs such as v11 and older.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you seeing the same behavior if you flash one a simple SDK example such as ble_app_blinky? It might be that the board is asserting in your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't run program unless using debugger (ST-LINK V2 and OpenOCD)</title><link>https://devzone.nordicsemi.com/thread/279338?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 16:25:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ff2a9d0-be80-4a84-b65d-89d5a8ec6979</guid><dc:creator>arthurkafer</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m running a simple iBeacon example, and to check if the application is running, I scan for devices that match the UID I set on the main file. The board can be supplied by 2 AA batteries or a 3V3 external power, but I was using 3V3 external when debugging.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;VDD had 3.28V when debug was both connected or disconnected. I enabled a LED on the board to check for errors and to check the start of the program, but nothing seemed to work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t remember where I read, but someone had the same problem here and he suggested to remove all types of printk on the program, and it actually worked, I don&amp;#39;t know how.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the reply, Jared&lt;/p&gt;
&lt;p&gt;Arthur K&amp;auml;fer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't run program unless using debugger (ST-LINK V2 and OpenOCD)</title><link>https://devzone.nordicsemi.com/thread/279282?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 13:56:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03aec4a5-ccd3-490d-9da6-3cd4c9555798</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We officially support J-link not ST-link. But, I don&amp;#39;t think your issue is related to the kind of debugger that you&amp;#39;re using.&lt;/p&gt;
&lt;p&gt;First of all, exactly how are you determining that the application isn&amp;#39;t running when you disconnect the debugger? How is the board supplied? Have you checked that VDD is within the correct operating region when you disconnect the debugger. Please upload the schematics if you&amp;#39;re using a custom board ( I can make the ticket private first if you prefer it).&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>