<?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>A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6590/a-simple-ble-less-uart-example-not-working-on-nrf51822</link><description>I am trying to do a simple UART test with nRF51822 without BLE functionality. The code is a simplified version of the UART example in nRF51 SDK, and can be found here . It is really not much there: it sends the data from RX back to TX; if it gets a &amp;#39;q</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Jun 2017 20:55:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6590/a-simple-ble-less-uart-example-not-working-on-nrf51822" /><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23028?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2017 20:55:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41d957df-a4a9-43da-8c7f-fba7de026fcb</guid><dc:creator>Nelson Rodriguez</dc:creator><description>&lt;p&gt;Hi i use DTR and RTS in my serial port monitor (Hercules) and it works fine,....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23030?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 16:42:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f816177e-90dd-4f89-9da2-d298b88decd1</guid><dc:creator>diode</dc:creator><description>&lt;p&gt;That makes sense. Thanks for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23029?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 10:35:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58411183-ca0e-433c-89cb-2df2ce17fd59</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The reason is that you have only one byte reserved for RX buffer. and after exit when you type two characters without doing app_uart_get then the uart fifo library would return with an error, which is handled in your application by function uart_error_handle. The default behaviour would be system reset of you do  not handle these errors by overwriting the function app_error_handler&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23027?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 10:07:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8514064-4b9e-4c5e-be03-bf8dc8001c30</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I see that what you said, I just looked into POWER-&amp;gt;RESETREAS to see why that is caused by the SYSRESETREQ by ARM. I will find out more about that and post you later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23026?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 06:06:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1611ee6c-a3dd-43c3-a589-1a70ae34f6a4</guid><dc:creator>diode</dc:creator><description>&lt;p&gt;No, I was not doing anything extra other than the code in that link. But my previous description might be a little misleading. After I pressed &amp;quot;q&amp;quot;, there would be nothing after &amp;quot;Exit...&amp;quot; if I didn&amp;#39;t input anything. However, as long as I typed in another character, the program will print &amp;quot;Start:&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23025?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2015 06:00:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8cd829d-e67b-439a-a547-1d5697236f35</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi diode,&lt;/p&gt;
&lt;p&gt;It is not normal to have a reset after pressing &amp;#39;q&amp;#39;. If you are sure that the reset is happening after same amount of time after pressing &amp;#39;q&amp;#39;, then there seems to be some kind of unhandled exception triggered. Are you sure  you are doing nothing more than the example you linked here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23022?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2015 18:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ee83de5-28c9-4262-971a-900262a71403</guid><dc:creator>diode</dc:creator><description>&lt;p&gt;Hi Aryan. It turns out the it was because of the serial monitor was using open-drain mode so that it could not pull the line high. After switching it to normal mode (can pull the line high), I can see the loopback testing work on my serial command. Another small question: after hitting &amp;quot;q&amp;quot; the program will enter a infinite loop state. However, it gets itself out in a second or so and print out &amp;quot;Start:&amp;quot; (meaning a reset). Is this behavior expected because of something else (e.g. watchdog)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23021?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2015 07:58:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d661f75-4001-4e3b-bb19-63decbc5afa0</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;sorry, I missed to see that it is happening repetitively
A Note though your Start cannot happen repetitively as this is outside the loop. Seems like a reset happening somewhere, I cannot understand where and why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23024?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2015 06:52:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adbe4ae6-7787-4e46-8f13-df16a8244fdc</guid><dc:creator>diode</dc:creator><description>&lt;p&gt;Regarding your second comment, my serial monitor was not configured to have flow control. And even if I have something left in TX buffer, it should be depleted after a few runs. But I kept seeing those characters. Those were so bizarre to me since it was such a simple application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23023?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2015 06:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6af59d5c-43ae-48f1-af44-8f40d23d92b9</guid><dc:creator>diode</dc:creator><description>&lt;p&gt;Thanks for your reply. I reflashed the code without SoftDevice, and now at least it behaved similarly (and abnormally) as the one with SoftDevice. For your first comment, even if somehow my serial monitor was sending something to trigger the while loop, I shouldn&amp;#39;t see &amp;quot;Start:&amp;quot; over and over in my serial monitor, since that string printf was outside the while loop. I tried the Jlink debugger and set breakpoints in &amp;quot;while(app_uart_get(&amp;amp;cr) != NRF_SUCCESS);&amp;quot; and &amp;quot; while(app_uart_put(cr) != NRF_SUCCESS);&amp;quot;. I kept hitting F5 and could see the input characters I typed bounced back to my serial monitor (which was something I should expect). However, as long as I removed the second breakpoint, I couldn&amp;#39;t see the same behavior. Also, every time I typed in &amp;quot;Return&amp;quot; key to the serial monitor in debugging session, I saw &amp;quot;Start:&amp;quot; which shouldn&amp;#39;t there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A simple BLE-less UART example not working on nRF51822</title><link>https://devzone.nordicsemi.com/thread/23020?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2015 05:17:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57082271-5ede-4d8c-9baa-bdfdbbdfe09c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Diode,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If the same code starts with softdevice then it should work fine without it if you have set the IROM and IRAM addresses accordingly. With your example softdevice does nothing but jump correctly to you application. you can try to debug the code without softdevice to see if your main is being executed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;May be your serial monitor is configured to have flow control and It is possible that you have typed something on serial emulator before starting your application which was in the emulator TX buffer waiting to be transmitted (as nothing on the other side is ready to receive). As soon as you flashed your board, your  app received that char and moved out of waiting.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;also if you want to have 1000ms wait in between Start and Hit, you need to swap this lines&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                        printf(&amp;quot;Hit.\r\n&amp;quot;);
                        nrf_delay_ms(1000);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>