<?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>debugging nRF51822.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23162/debugging-nrf51822</link><description>Hello, 
 My project is on nrf51822 in which I am using BLE and UART interfaces. 
 There is single UART available on nRF51822 and I am using it for communication with an STM32. Now the problem is to debug the application. 
 Is there any solution to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Aug 2019 08:16:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23162/debugging-nrf51822" /><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/206259?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2019 08:16:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89be00a3-ebd4-4bdf-a34c-e5d6d615db24</guid><dc:creator>Archana Fugare</dc:creator><description>&lt;p&gt;Hi Bayram,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please help me to get the debug logs in RTT viewer, I am using segger embedded studio and SDK 12.3.0.&lt;/p&gt;
&lt;p&gt;Imported keil code in segger of nRF51.&lt;/p&gt;
&lt;p&gt;I am not getting the logs on RTT_viewer&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Archana&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91111?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2017 10:24:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38bdfdd4-3a71-4ab8-a40f-efd29b34dc83</guid><dc:creator>Bayram ZAYET</dc:creator><description>&lt;p&gt;Thank you,
this was good support.&lt;/p&gt;
&lt;p&gt;Regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91113?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2017 09:56:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e62a68c-66fd-4cde-abbc-be726ff0884b</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;It should be able to do both. It might be some configuration problem between RTT and UART in your project... nRF5 SDK v12 is using &lt;code&gt;sdk_config.h&lt;/code&gt; which is not so easy to manage, also some modules might still be buggy if some previously untested configuration combination is used (there are so many that it&amp;#39;s impossible to test all).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91112?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2017 09:52:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:540f0e84-a810-4b3b-b911-f9d2f7b43d2e</guid><dc:creator>Bayram ZAYET</dc:creator><description>&lt;p&gt;I agree.&lt;/p&gt;
&lt;p&gt;But considering the UART connection between my nRF51822 and the STM32, I was ondering if my issue is due to the fact that nRF cannot do both: UART communication with STM and log out(SEGGER_RTT) over SWD.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91114?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2017 09:10:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21276efa-0895-4517-b259-b1455c04b74f</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;As you an imagine that&amp;#39;s almost impossible to say from these two lines, there are so many things which can go differently then programmer think...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91110?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2017 08:54:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f27f17d-fcbd-44e3-8a4b-b4913e38bc34</guid><dc:creator>Bayram ZAYET</dc:creator><description>&lt;p&gt;Thanks for the answer.&lt;/p&gt;
&lt;p&gt;Yes I do have a J-link and implemented SEGGER_RTT. iT worked, I get my debug messages on RTT Viewer over SWD.&lt;/p&gt;
&lt;p&gt;But once I program my STM, the log on RTT Viewer is no longer real time. I get my messages after shutting down the STM communication with the nRF51822.&lt;/p&gt;
&lt;p&gt;What did I miss ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91109?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2017 16:18:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cc1b637-e1f2-4e8c-92de-3e253e24fc67</guid><dc:creator>Bayram ZAYET</dc:creator><description>&lt;p&gt;Thanks for the answer,
Yes I do have a J-link and implemented SEGGER_RTT. iT worked, I get my debug messages on RTT Viewer over SWD.&lt;/p&gt;
&lt;p&gt;But once I program my STM, the log on RTT Viewer is no longer real time. I get my messages after shutting down the STM communication with the nRF51822.&lt;/p&gt;
&lt;p&gt;What did I miss ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91115?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2017 05:06:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b652cc28-9507-442c-a7e4-0e93dfad5bac</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;You can also use Semihosting which is available to all jtag.  It is buitin newlib.  Semihosting enables printf functions to print to debug console.  The drawback is that it is quite slow.  so don&amp;#39;t printf in critical loops.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91106?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2017 21:51:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a844cae-b214-4cb3-aca1-238dcef8e923</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Sorry, you are right Daniel, SEGGER RTT works over standard SWD so it should work on nRF51. I mixed it up with ARM Tracing/SWO (which is present just on nRF52).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91108?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2017 21:40:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3a95f41-19fc-4d39-b758-0766957666cd</guid><dc:creator>Daniel Wang</dc:creator><description>&lt;p&gt;What?? I&amp;#39;m uing Segger RTT on my NRF51 without any problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91107?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2017 21:18:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8566e9d-6953-4f69-b3c8-70abb66661b6</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Ahhhh... I did not know that. I&amp;#39;ve only messed with it on an nRF52 and remained blissfully ignorant of that limitation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91105?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2017 20:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63716bb7-4427-4141-8042-57b3f9645811</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Yes but not on nRF51 :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91104?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2017 20:52:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9424bfb4-935d-4ee1-aac7-0126ed794f9f</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Well, if you meant J-Link instead of J-Tag, there is another option. Disregard the rest of this message if you are not referring to a J-Link.&lt;/p&gt;
&lt;p&gt;You can use the Segger RTT-Viewer to print debug messages to a console application. Nordic provides a Segger RTT implementation in  a lot of the example projects.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: debugging nRF51822.</title><link>https://devzone.nordicsemi.com/thread/91103?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2017 20:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e84a668-ba20-4c1c-985e-29df3a14f8b6</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Any good solution? Not really. You can use SWD for halt/step-in debugging until you use some time-critical operations such as any BLE link managed by Soft Device. You could also try to include some SW UART implementation (using simple GPIO routines and timers), it could be OK for some low throughput tracing because you don&amp;#39;t need Rx just Tx for debug messages. But it might be interfering with standard APP/SD operation so you would need to be very careful where and how long messages you can put into your code. In cases like yours I usually use just simple GPIO indications and logical analyzer to read them. It gives you idea where in the code you are. You can use number of pulses and and length of LOW/HIGH parts to &amp;quot;spray&amp;quot; your code with dozens of markers (typical logical analyzer can operate in microsecond range so pulses don&amp;#39;t need to take more than 0.1ms, typically much less). You can even signal some values by the timing and number of pulses (e.g. some simple integer values in reasonable ranges like 0-100).&lt;/p&gt;
&lt;h2&gt;Edit&lt;/h2&gt;
&lt;p&gt;SEGGER RTT missing in my previous answer and added by John is actually the best option!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>