<?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>nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59703/nrf51822-not-running</link><description>We have 2 identical development boards and have been using only one until now. I was able to download code into the 2nd board successfully but it will not run. It does not run in either standalone or debug mode (PICKit3). What are the likely causes?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Apr 2020 10:36:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59703/nrf51822-not-running" /><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/244396?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 10:36:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f57f33dd-600f-484c-a8d4-421f6cc99646</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My apologies for the delayed answer.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If your application does not rely on the SoftDevice, you can then omit it.&lt;/p&gt;
&lt;p&gt;A softdevice application will be offset wrt. to flash and RAM, like 0x18000 for flash and 0x20002000 for RAM. If there is no softdevice present in flash then, you will never start your application, as there&amp;#39;s nothing at address 0 (and onward).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user="tomg3"]I placed a breakpoint at the first instruction in main(). After clicking on RUN icon it immediately stops and never gets to the breakpoint.[/quote]
&lt;p&gt;Where is it stuck if you break (or pause) the debug session?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="tomg3"]I just unsuccessfully tried using nRFgo with the Segger JTAG. If I remember correctly there is other hardware used for this purpose. What is it?[/quote]
&lt;p&gt;&amp;nbsp;Try using nrfjprog directly:&lt;/p&gt;
&lt;p&gt;nrfjprog -e # this will erase the device&lt;/p&gt;
&lt;p&gt;nrfjprog --program &amp;lt;hex file&amp;gt; -f nrf51 --reset # program a .hex and reset the device afterwards.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/244140?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2020 20:40:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3d461a2-603d-443a-8b8c-eedb376323a3</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;In debug mode, even when the breakpoint is at the 1st or 2nd line in main(), it immediately stops after clicking RUN but never gets to the break.&lt;/p&gt;
&lt;p&gt;I added the 3 code lines suggested and put breaks on each line. But it never reached any of them. Just stops after clicking RUN. Clearly the MCU is not running.&lt;/p&gt;
&lt;p&gt;No, the softdevice has not been loaded. Shouldn&amp;#39;t that just affect BT? Shouldn&amp;#39;t the MCU run instructions without it?&lt;/p&gt;
&lt;p&gt;It has been so long since I loaded the softdevice on targets I forgot how&amp;nbsp;though I do know that&amp;nbsp;nRFgo Studio was used. I just unsuccessfully tried using nRFgo with the Segger JTAG. If I remember correctly there is other hardware used for this purpose. What is it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/244122?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2020 17:15:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7860eb8-8c0e-461c-b4a0-cdf4a429e42b</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;I placed a breakpoint at the first instruction in main(). After clicking on RUN icon it immediately stops and never gets to the breakpoint.&lt;/p&gt;
&lt;p&gt;I inserted the 3-line test code you offered and placed breakpoints at every line. It doesn&amp;#39;t stop at any of them. Again, after clicking on RUN it immediately stops. Clearly it is not running at all.&lt;/p&gt;
&lt;p&gt;No, I have not installed the softdevice. I am assuming that it should run basic code without it. Of course without it the BLE will not work - but that is not an issue right now.&lt;/p&gt;
&lt;p&gt;Can the softdevice be written using uVision or must nRFgo Studio be used? It has been a long time since I used nRFgo Studio so I don&amp;#39;t remember the physical connections. Can I use the Segger programmer/emulator connected to SWDIO and SWDCLK on the target to write the softdevice. If I remember correctly there may have been a different cable that I used with nRFg Studio.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/244042?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2020 10:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85dfb36e-0a3d-49b4-b503-992f36b3cddb</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To see if the external HFCLK starts up, you can trigger it manually, by adding this at the top of your main (before softdevice init):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);
NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If it hangs in the while-loop, it has problems starting up the xtal.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you enter debug mode, where does it stop when you break/pause the debug session? Have you remembered to program the softdevice onto the device?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243927?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2020 15:03:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e01e717-dfcd-4426-a25b-0ee19df5ca28</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;That makes sense. If there is no external crystal connected it needs a clock from somewhere - hence the internal RC. I am not (knowingly) changing the the external crystal. I have searched for &amp;quot;HFCLKSTAT&amp;quot; and it is nowhere to be found in the project. So I assume that means it is running off the internal RC, correct?&lt;/p&gt;
&lt;p&gt;My understanding is that the radio requires the more accurate crystal. But the radio is working fine. That&amp;#39;s why I thought the external crystal was in use.&lt;/p&gt;
&lt;p&gt;If it is using the RC oscillator then the clock is not the problem.&lt;/p&gt;
&lt;p&gt;How do I switch to the external oscillator? As stated before, where should code be located (startup or main code) and what are the instructions? Load NRF_CLOCK-&amp;gt;HFCLKSTAT?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243865?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2020 10:53:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1bb646f-4181-439d-a9f5-3cac45663ef3</guid><dc:creator>ketiljo</dc:creator><description>&lt;p&gt;Default is 16 MHz RC so if you haven&amp;#39;t changed it, it should startup with that. If you have specifically changed to the 16 MHz XO, the MCU will hang while waiting for the crystal to start. If this is the case, check the crystal connection and the load caps.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243768?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 22:26:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b71330b-cba2-485d-8ba7-fb4f079c4cfb</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Why didn&amp;#39;t I think of that? Actually I did but since the external crystal is required for the radio I dismissed it.&lt;/p&gt;
&lt;p&gt;In order to try resolving the board problem I attempted to select the internal RC 16MHz clock but was unable to do it. It looks like something like the following must be in the code (but I don&amp;#39;t know where to put it). I would think it should be in the startup code???&lt;/p&gt;
&lt;p&gt;&amp;nbsp; NRF_CLOCK-&amp;gt;HFCLKSTAT = 0x00010000;&amp;nbsp; // HFCLK running, use 16MHz RC oscillator&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243756?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 18:58:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8906753f-a520-4028-8275-19ed75b22e07</guid><dc:creator>awneil</dc:creator><description>[quote userid="4378" url="~/f/nordic-q-a/59703/nrf51822-not-running/243752"]on the bad board nothing - sitting firmly at 0V.[/quote]
&lt;p&gt;So what happens if you change your code to use the internal oscillator?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243752?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 18:27:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ded9a52-1d4e-407d-86ce-4fddb33cd1c0</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Comparing the crystal input to the MCU indicates that on a working board there is a signal (albeit distorted and at a much lower frequency because the probe is pulling it). But on the bad board nothing - sitting firmly at 0V.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Xtal-Waveform.bmp" /&gt;&lt;/p&gt;
&lt;p&gt;Also checked the supply voltage at one of the caps (C3) and it is 3V as expected. The MCU pins are too small to probe but inspection under a microscope shows that this cap is tied to the MCU pin. I think that eliminates the &amp;quot;shorted decoupling cap&amp;quot; issue.&lt;/p&gt;
&lt;p&gt;Also verified that SWDIO/RESET- is 3V (i.e. not held in reset).&lt;/p&gt;
&lt;p&gt;SWDCLK and SWDIO are used to program the flash so the MCU is not involved (I agree). But if the flash can be programmed does that not prove that the chip is powered correctly? If that is true, then it seems the problem is a faulty MCU.&lt;/p&gt;
&lt;p&gt;In light of the above, please expand on your thought that the soldering may be an issue. Unfortunately I do now have the ability to reflow or X-ray the board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243667?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 13:06:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:538a11b3-e9f4-453a-b102-44b8da19538e</guid><dc:creator>ketiljo</dc:creator><description>&lt;p&gt;If some of the decoupling capacitors are no connected or shorted, the MCU may fail. The MCU core runs on a separate power domain. Programming of the flash doesn&amp;#39;t involve the MCU so even if you can program it, the HW may cause it to fail when the MCU starts.&lt;/p&gt;
&lt;p&gt;The problem can also be soldering under the chip, CSP parts can be tricky sometimes. See if a reflow solves the problem. Or have the board x-ray&amp;#39;ed.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243450?ContentTypeID=1</link><pubDate>Fri, 03 Apr 2020 16:49:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4ade2fe-3b9d-48c6-b7b2-f76c1fe4c459</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;But since it programs is successfully doesn&amp;#39;t that imply that it is connected properly - no shorts or opens? In order to program power, ground, SWDIO and SWDCLK must be connected. I believe the crystal must also be connected to program. Aren&amp;#39;t those are the only pins required to run?&lt;/p&gt;
&lt;p&gt;I again verified that is does not run with Segger connected or disconnected and it does not run in Debug mode with Segger connected.&lt;/p&gt;
&lt;p&gt;I did a visual inspection under a microscope and did not see any shorts or opens around the nRF51822. It seems that there might be a problem inside the MCU. Other than downloading the program code, is there any other code that must be downloaded to configure the MCU?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243367?ContentTypeID=1</link><pubDate>Fri, 03 Apr 2020 10:36:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1241f03e-df5f-4209-af0a-bc6bd9d4029f</guid><dc:creator>ketiljo</dc:creator><description>&lt;p&gt;The schematic looks correct, so I&amp;#39;m guessing solder issues. Could be anything from a missing power connection or a short.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243246?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 15:55:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1fba665-7f67-4d74-9126-b3eb5cef47a4</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8715.Untitled.bmp" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/243245?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 15:54:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8e4f1aa-d7dd-4a92-9888-4dbd963da806</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;&amp;quot;Does not run&amp;quot; means that it will not run code. If I put a simple test to turn on an LED and nothing happens. It will not single step or run to a breakpoint in debug mode. On the second board it runs the code as expected.&lt;/p&gt;
&lt;p&gt;My mistake. The programmer/debugger is a Segger. (Working on 2 project simultaneously hence my confusion).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/242654?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2020 10:30:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d736d8e5-f0a7-4557-b532-73974af70125</guid><dc:creator>ketiljo</dc:creator><description>&lt;p&gt;Can you post the schematic?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51822 Not Running</title><link>https://devzone.nordicsemi.com/thread/242557?ContentTypeID=1</link><pubDate>Mon, 30 Mar 2020 22:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4a6758e-5096-4058-acb1-80594ba2d22a</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;What do you mean, &amp;quot;&lt;span&gt;does not run&amp;quot; ?&lt;/span&gt;&lt;/p&gt;
[quote userid="4378" url="~/f/nordic-q-a/59703/nrf51822-not-running"]PICKit3[/quote]
&lt;p&gt;&lt;span&gt;That&amp;#39;s a Microchip product - not Nordic.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>