<?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>Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6398/test-nrf51822-through-swd-interface-after-programming-through-rtt</link><description>After programming a panel of 6 modules embedding nRF51822, I would like to send some data in order to test some features. The basic idea is to validate the modules before cutting it from panel and mounting it in its final case. For example, I would like</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Apr 2015 09:22:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6398/test-nrf51822-through-swd-interface-after-programming-through-rtt" /><item><title>RE: Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/thread/22307?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2015 09:22:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8049c30c-5665-40c9-a457-58d7508862c3</guid><dc:creator>Vebj&amp;#248;rn</dc:creator><description>&lt;p&gt;As you and RK point out, RTT is an easy way of doing what you want. See this &lt;a href="https://devzone.nordicsemi.com/tutorials/6/debugging-with-real-time-terminal/"&gt;tutorial&lt;/a&gt; for how to set it up.&lt;/p&gt;
&lt;p&gt;You can read input from your host machine from anywhere in the code, using for example SEGGER_RTT_Read() or  SEGGER_RTT_GetKey(). Note that these are non-blocking functions, so you could use them in combination with SEGGER_RTT_HasKey(), or use  SEGGER_RTT_WaitKey() which blocks until you send a character.&lt;/p&gt;
&lt;p&gt;There is more information on the link you posted in your question, and some more in-depth details and examples in chapter 9 &lt;a href="https://www.segger.com/admin/uploads/productDocs/UM08001_JLink.pdf"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/thread/22303?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2015 07:41:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ec510a2-e64e-45d5-ad99-c3596a13ae70</guid><dc:creator>Vebj&amp;#248;rn</dc:creator><description>&lt;p&gt;There will be a tutorial available on how to implement RTT debugging, sometime today :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/thread/22306?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2015 07:00:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d040e32d-638d-43ed-b6a4-421e06671ae5</guid><dc:creator>S&amp;#233;bastien Despont</dc:creator><description>&lt;p&gt;I will create a blog post if I successfully implement RTT to test my board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/thread/22305?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2015 06:57:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3f37350-be52-4ded-a64f-c9715eaade35</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;If you try it this way, please post or message me afterwards, I&amp;#39;m really interested to hear how this works out and if it really is practical and/or easy. It sounds like quite an interesting thing to do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/thread/22304?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2015 06:40:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03ec1a25-1c5a-4195-a1c1-3fd76b1173b7</guid><dc:creator>S&amp;#233;bastien Despont</dc:creator><description>&lt;p&gt;Thanks for your answer.  I didn&amp;#39;t know that it was possible to receive commands from RTT. Thanks for pointing that, a test mode seems a good idea. The target t this test is to validate that complex component are well mounted on the PCB. It needs several little screw to make contact on the PCB and is a sensible part of the module. Of course, it is not as simple as toggle a GPIO to test this component because a specific frequency must be generated to test it, so I need to send command to the module to run the test.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/thread/22302?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2015 16:03:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:653df944-604e-44dc-b740-eaaeb82e08d3</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;I don&amp;#39;t quite understand what test you&amp;#39;re trying to do here. Are you trying to test that an LED will come on when the correct GPIO is taken high and a motor will rotate when another one is? Or are you trying to run the software on your board and simulate it into different states, states it would normally get into by some other input, and see if it does the right thing?&lt;/p&gt;
&lt;p&gt;You probably could use RTT for that test, it doesn&amp;#39;t just write registers, you can send any data you want and read it by calling the segger RTT input functions in your code in a loop.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t imagine you would want your real code running on the chip to be polling the Segger RTT library, or even initializing it, so you&amp;#39;d want a way early in your code to put the device into a test mode where it loops and reads the RTT input and does your tests, perhaps write a bit pattern into memory somewhere which is tested just after reset to determine whether to boot up normally or go into test mode. Then your test procedure would be, attach debugger to SWD, write the bit pattern into memory, reset to get it to initialise and start reading the RTT input, and then send data down the Segger RTT pipe to perform your tests.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/thread/22301?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2015 15:13:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36cc1f34-01d9-448a-8c17-d0a57eb4be05</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Ah, I see.  I would love to know how this can be resolved.  Production QA could be quite a headache.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/thread/22300?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2015 14:59:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fccbda44-1f16-4bce-9f61-baa094aea0d0</guid><dc:creator>S&amp;#233;bastien Despont</dc:creator><description>&lt;p&gt;Thanks for your answer. It is a good point, but it is too complicated for &amp;quot;mass production&amp;quot; (I mean 6 panels containing 6 modules at times) because the production validation need to be simple and quick driven by a custom software. Also, it involves some masters to establish connections and send data. The bluetooth part is tested in another place in the production line.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Test nRF51822 through SWD interface after programming (through RTT?)</title><link>https://devzone.nordicsemi.com/thread/22299?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2015 14:02:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1056b77-c8a8-4cbe-963c-b6baedf8a19f</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Assuming the BLE part of the code is working, why not send your live data through BLE instead.  You can then activate or deactivate it at will in runtime.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>