<?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>How to serial debug custom nrf51 chip via Development Kit USB?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30724/how-to-serial-debug-custom-nrf51-chip-via-development-kit-usb</link><description>Hi everyone, I&amp;#39;ve read some nordic forum articles on this topic but somehow I just dont get information I need. 
 
 I can flash my custom nrf51822 chip by using my nrf51422-DK (PCA10028). I simply connect to P20 as follows: P20-DK_VTG ==&amp;gt; chip_VDD 
 P20</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Feb 2018 17:20:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30724/how-to-serial-debug-custom-nrf51-chip-via-development-kit-usb" /><item><title>RE: How to serial debug custom nrf51 chip via Development Kit USB?</title><link>https://devzone.nordicsemi.com/thread/121838?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2018 17:20:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5973269b-0427-476e-8975-96ef8227be2a</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;The PC10028 connections look fine (I use PCA10040 and the pin numbers are different). I suggest you use the coin cell battery to power the DK. And make sure you see the com port when you hook up the USB TTL serial cable (open device manager and check com port if you&amp;#39;re using windows). Try baud rate 57600 8N1 no flow control on both ends (putty on windows, and uart_init() in your nRF51)&lt;br /&gt;&lt;br /&gt;As for the square board (again I only have the nRF52 square one) make sure you connect to the correct pin 9 and 11 (for my nRF52 square board the pins 6 &amp;amp; 8 are on the left hand side).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to serial debug custom nrf51 chip via Development Kit USB?</title><link>https://devzone.nordicsemi.com/thread/121832?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2018 16:39:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a009e50-2909-4b23-be31-128c5a583310</guid><dc:creator>Mcdane</dc:creator><description>&lt;p&gt;Hi Matt I bought a USB TTL Adapter Cable.&lt;br /&gt;&lt;br /&gt;The cable has the follwoing pins:&lt;br /&gt;&lt;br /&gt;Red - 3.3V&lt;br /&gt;Black - Gnd&lt;br /&gt;White - RxD&lt;br /&gt;Green - TxD&lt;br /&gt;&lt;br /&gt;I tried two things:&lt;br /&gt;&lt;br /&gt;1) I flashed my Nrf51422-DK (PCA10028) with a simple program printing &amp;quot;Hello there&amp;quot; on the console. When I connect the DK normally via its USB cable:&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_0438.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then it prints it out, saying &amp;quot;Hello there&amp;quot;. So far so good.&lt;br /&gt;&lt;br /&gt;The DK&amp;#39;s&amp;nbsp;pin definitions are:&lt;/p&gt;
&lt;p&gt;P0.08 = RTS&lt;/p&gt;
&lt;p&gt;&lt;span&gt;P0.09 = TXD&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;P0.10 = CTS&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;P0.11 = RXD&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So I took the cable that I bought and connected it as follows:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Cable Black: Gnd ====&amp;gt; Nrf51 Gnd&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Cable White: RxD====&amp;gt; Nrf51 -&amp;nbsp;P0.09 = TXD&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Cable Green: TxD====&amp;gt; Nrf51 -&amp;nbsp;P0.11 = RXD&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_0439.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I guess I can just forget about the RTS / CTS pins. Correct?&lt;br /&gt;I am using &amp;quot;Terminate 3.3&amp;quot; in order to print out the incoming serial data. And in my settings I chose no flow control:&lt;br /&gt;Flow control: &amp;quot;none&amp;quot;. And it worked in the first case above (normal DK USB connection).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;While my DK still gets its power from the normal USB connection, I dont need to use the Red Pin (3.3V) from the bought cable.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;==&amp;gt; But I dont get any data via this cable. I dont know why.&lt;br /&gt;&lt;br /&gt;2) The second thing that I tried is actually the same &amp;quot;hello there&amp;quot; program that prints it out on the console but with another Nrf51822 chip on a square board. There I connected it as follows:&lt;br /&gt;&lt;br /&gt;Cable Red: 3.3V ====&amp;gt; Nrf51 VDD&lt;br /&gt;Cable Black: Gnd ====&amp;gt; Nrf51 Gnd&lt;br /&gt;Cable White: RxD====&amp;gt; Nrf51 -&amp;nbsp;P0.09 = TXD&lt;br /&gt;Cable Green: TxD====&amp;gt; Nrf51 -&amp;nbsp;P0.10 = RXD&lt;br /&gt;&lt;br /&gt;On this board I just had to change to RXD --&amp;gt;&amp;nbsp;P0.10.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;P0.09 = TXD&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;P0.10 = RXD&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/IMG_5F00_0440.jpg" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;Additionally I made an LED blink via P0.12 in order to know that I flashed this chip correctly. The LED blinks as expected but I still dont get any serial data (&amp;quot;Hello there&amp;quot; in this case) from the chip.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;How can I make this work?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to serial debug custom nrf51 chip via Development Kit USB?</title><link>https://devzone.nordicsemi.com/thread/121543?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2018 14:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55a5a0ed-3334-4170-a897-deb30846c4e7</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;2 ways&amp;nbsp;to perform your &amp;quot;cable&amp;quot; test:&lt;br /&gt;&lt;br /&gt;(a) hook up your custom board to your pc through a &amp;quot;&lt;span&gt;USB to TTL serial cable: (eg.&amp;nbsp;&lt;a href="https://www.adafruit.com/product/70"&gt;https://www.adafruit.com/product/70&lt;/a&gt;). Install the driver in your pc, then fire up, say, the putty to display the &amp;quot;hello world&amp;quot; from your custom board. You also need to initialize the uart in your custom board of course.&lt;br /&gt;&lt;br /&gt;(b) keep to the [&amp;nbsp; pc &amp;lt;--- usb ---&amp;gt; PCA10028 &amp;lt;-- SWD --&amp;gt; custom board&amp;nbsp; ] configuration but enable segger rtt in your hello-world application code and call the SEGGER_RTT_printf() to send your debug messages out. On your pc side launch the segger rtt viewer to display the messages from your custom board.&lt;br /&gt;&lt;br /&gt;I used both in my nRF52 sdk12 work before; should work for nRF51 also.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>