<?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 make the CPU to sleep module by the UART interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1455/how-to-make-the-cpu-to-sleep-module-by-the-uart-interrupt</link><description>Hi,
I use the nrf51822 to read the data from the tag which designed by the 24l01p radio module.In the whole progress, first of all, the reading module read the instructions by the PC through the UART. when the instructions are &amp;quot;ON&amp;quot;,the 51822 module should</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Feb 2014 14:21:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1455/how-to-make-the-cpu-to-sleep-module-by-the-uart-interrupt" /><item><title>RE: how to make the CPU to sleep module by the UART interrupt</title><link>https://devzone.nordicsemi.com/thread/6505?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2014 14:21:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d48ef72-9d43-4b20-a2b6-c86d03242f65</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Linda,&lt;/p&gt;
&lt;p&gt;What you described is pretty close to &lt;a href="http://en.wikipedia.org/wiki/Software_flow_control"&gt;the software flow control&lt;/a&gt; mechanism.
Currently, you can do that by keeping the UART in RX mode and enabling RXDRDY interrupt so that you will receive RXDRDY event every time there is 1 byte received on the RX buffer.
The limitation of this implementation is that the power consumption will remain high (1mA+) when you keep UART in RX mode since this module require 1V2 regulator and 16 MHz clock. This is the reason I recommended the hardware flow control option. So that you can disable UART when waiting for new data and only wake up the CPU and enable UART when there is a pin interrupt (RTS signal)&lt;/p&gt;
&lt;p&gt;Regarding __WFI() instruction, it&amp;#39;s the command to put the CPU to sleep waiting for an interrupt. If you want to wake the CPU up, you would need an event/interrupt. You can enable an interrupt by setting the NRF_UART0-&amp;gt;INTENSET register and then enable the UART interrupt using NVIC_EnableIRQ()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to make the CPU to sleep module by the UART interrupt</title><link>https://devzone.nordicsemi.com/thread/6504?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2014 07:26:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96a51f17-1f14-4a1c-9aba-615c492212c0</guid><dc:creator>Linda</dc:creator><description>&lt;p&gt;Hi,
Thank you for your reply. In my application, the nrf51822 read the instunctions from the PC through the UART. If the instruction from the UART is &amp;quot;ON&amp;quot;,the 51822 should start read the tag&amp;#39;s data which is from the 24l01p.If the instruction from the UART if &amp;quot;OFF&amp;quot;.the 51822 is to the low power mode. I don&amp;#39;t know how to make the 51822 to wake up by the UART. Is it by the _WFI()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to make the CPU to sleep module by the UART interrupt</title><link>https://devzone.nordicsemi.com/thread/6503?ContentTypeID=1</link><pubDate>Wed, 29 Jan 2014 13:36:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69286268-4635-4929-9fa0-04cdd940e3bb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Linda,&lt;/p&gt;
&lt;p&gt;For your application, if you can have the hardware flow control on UART interface, you can use RTS signal from the PC as the wake up source.
You can find the example of using RTS as wake up source in app_uart library where we defined the APP_UART_FLOW_CONTROL_LOW_POWER mode. So that the UART RX task can be disabled (and the CPU can be put to sleep mode) and we will wake the chip up when there is a signal on the RTS line.&lt;/p&gt;
&lt;p&gt;In your description, I don&amp;#39;t really get it when you mention you &amp;quot;use the _wfe() to make the 51822 start read tag data&amp;quot;, could you explain it a little bit more ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>