<?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>Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2151/is-it-possible-to-use-the-uart-without-the-soft-device</link><description>There are some include dependencies that go like this: 
 app_uart.h -&amp;gt; app_util.h -&amp;gt; app_error.h -&amp;gt; nrf_error.h 
 and nrf_error.h is under Include/s110. 
 In order to debug some stuff happening with my UART peripherals, I&amp;#39;d like to do a build with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Apr 2014 11:42:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2151/is-it-possible-to-use-the-uart-without-the-soft-device" /><item><title>RE: Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/thread/9137?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2014 11:42:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffb1d2b7-a1fc-44c4-92e3-f98e5833d3c4</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;A couple of further issues here:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;I actually found this only works &lt;em&gt;without&lt;/em&gt; the call to __WFI(). Those seem to block forever for me, at least while debugging. Can&amp;#39;t get my head around what&amp;#39;s actually happening with the interrupts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I&amp;#39;m also doing some stuff with timers and can caught by an issue where when you&amp;#39;re not using the Soft Device, you have to explicitly start the RTC. See my older post about that here: &lt;a target="_blank" href="https://devzone.nordicsemi.com/index.php/timer-handler-never-called" rel="nofollow"&gt;https://devzone.nordicsemi.com/index.php/timer-handler-never-called&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/thread/9136?ContentTypeID=1</link><pubDate>Wed, 09 Apr 2014 00:48:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ad54e46-54ff-475a-a9f1-41cd8288477e</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;It&amp;#39;s working just fine now, without me having changed anything, which isn&amp;#39;t much help in figuring out what the issue was. Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/thread/9135?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 22:27:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8866bdc0-aa96-457d-a560-96b89e798fcb</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;In what way do you initialize the app_uart? Are interrupts enabled in that routine? Is the UART0_IRQHandler ever called? Does it work without the WFI instruction?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m on thin ice here, since I haven&amp;#39;t used the app_uart library that much. I see that the default app_uart_init() enables interrupt for the RX, TX and ERROR events, and this should wake up the CPU. There&amp;#39;s some additional information to be found in this thread:
&lt;a target="_blank" href="https://devzone.nordicsemi.com/index.php/how-to-make-the-cpu-to-sleep-module-by-the-uart-interrupt" rel="nofollow"&gt;https://devzone.nordicsemi.com/index.php/how-to-make-the-cpu-to-sleep-module-by-the-uart-interrupt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/thread/9134?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 20:33:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67ce74c3-8eef-4466-b313-c7ea8f789a8a</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Thanks again. I now seem to be stuck at the __WFI() call in this loop when reading from the UART:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;do
{
    err_code = app_uart_get(&amp;amp;amp;ch);
    
    if (NRF_ERROR_NOT_FOUND == err_code)
    {
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;#ifdef USE_SOFTDEVICE
sd_app_evt_wait();
#else
__WFI();
#endif
}
else if (NRF_SUCCESS == err_code)
{
response[i++] = ch;
}
else
{
APP_ERROR_CHECK(err_code);
}&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ended = gsm_response_ended((char *)response);
}
while (!ended);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also the timer that should make gsm_response_ended() return true eventually even if the peripheral stays quiet is never getting its timeout handler called. Any ideas?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/thread/9133?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 19:54:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12369477-a3fa-4849-9ba6-c90c3d631532</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;__WFI();&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/thread/9132?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 16:43:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd2d2a97-920f-41cc-a8a1-155e3c7cd456</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Thanks. I&amp;#39;m using the types in app_uart.h and want to keep using them, so I&amp;#39;ll try copying app_common out of the SDK to an app_common_no_sd in my source tree and breaking the dependencies.&lt;/p&gt;
&lt;p&gt;What&amp;#39;s the non-SD equivalent to sd_app_evt_wait() though?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/thread/9131?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 13:55:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0eb1248e-1933-4d63-8cef-1a4bafa036e9</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;You could temporarily remove the CRITICAL_REGION_ENTER / EXIT fields from app_util to remove the dependency to nrf_error, but it&amp;#39;s also possible to just access the peripherals directly using the same setup routine as found in app_uart.c. For simply logging data coming in, I think the latter approach would be very simple to set up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/thread/9130?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 13:42:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2c6c505-8b16-4de8-be1f-facbbbe36c9f</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;How then would you recommend breaking that dependency? Do I have it right above?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to use the UART without the Soft Device?</title><link>https://devzone.nordicsemi.com/thread/9129?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 13:39:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf366e1d-327f-488f-9c28-3d9a3872ade7</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;The softdevice is not needed to use the UART peripheral. You should be able to get along just fine with nrf51.h and nrf51_bitfields.h.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>