<?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>sd_app_evt_wait cause uart not work.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47044/sd_app_evt_wait-cause-uart-not-work</link><description>Hi, I use nrf52832&amp;#39;s uart with a simple driver, not &amp;quot;nrf_drv_uart&amp;quot;, because I don&amp;#39;t know how to use receive and transmit interruption with &amp;quot;nrf_drv_uart&amp;quot;. the uart drive i used is bellow: 
 void drv_uart_init(void) { init_io(); init_uart(); } 
 static</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 May 2019 04:44:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47044/sd_app_evt_wait-cause-uart-not-work" /><item><title>RE: sd_app_evt_wait cause uart not work.</title><link>https://devzone.nordicsemi.com/thread/189743?ContentTypeID=1</link><pubDate>Wed, 29 May 2019 04:44:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b358b4a-fe46-4b8b-a0b9-4900cfe4e039</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You should not use nrf_pwr_mgmt_run&amp;nbsp; in &lt;span&gt;vApplicationIdleHook&amp;nbsp;&lt;/span&gt;when you are using tickless_dile. Can you please comment it?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am also assuming that you are testing this on the PCA10040 development kit.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the above suggestion did not help you, then I need to get your project to be able to reproduce it and give you a proper workaround.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait cause uart not work.</title><link>https://devzone.nordicsemi.com/thread/189501?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 08:34:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dde216a4-9df2-4e8c-9d5e-17e4b5b37be6</guid><dc:creator>tianbing357</dc:creator><description>&lt;p&gt;i did as your advise, but it still not worked, the current is 7mA when use &amp;quot;&lt;span&gt;#define configUSE_TICKLESS_IDLE 1&lt;/span&gt;&amp;quot;, but 2mA use&amp;nbsp;&lt;span&gt;__WFE(); &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait cause uart not work.</title><link>https://devzone.nordicsemi.com/thread/189472?ContentTypeID=1</link><pubDate>Tue, 28 May 2019 07:34:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f36ab7f-de55-4586-977b-f1721d367492</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I would strongly recommend you to download SDK15.3 and replace your SDK14\external\freertos folder with the SDK15.3\external\freertos folder. There were a couple of fixes that came later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait cause uart not work.</title><link>https://devzone.nordicsemi.com/thread/189148?ContentTypeID=1</link><pubDate>Sun, 26 May 2019 15:30:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd028490-82c0-4fed-a60b-958b9056927e</guid><dc:creator>tianbing357</dc:creator><description>&lt;p&gt;i tried,&amp;nbsp;#define configUSE_TICKLESS_IDLE 1 , the power consumption is much higher than&amp;nbsp;&lt;span&gt;sd_app_evt_wait() ,i use SDK 14.2.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;when use&amp;nbsp;__WFE(); as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;void vApplicationIdleHook( void )&lt;br /&gt;{&lt;br /&gt; do{&lt;br /&gt; __WFE();&lt;br /&gt; } while (0 == (NVIC-&amp;gt;ISPR[0] | NVIC-&amp;gt;ISPR[1]));&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the power consumption is a little higher than&amp;nbsp;sd_app_evt_wait(). why?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait cause uart not work.</title><link>https://devzone.nordicsemi.com/thread/186152?ContentTypeID=1</link><pubDate>Thu, 09 May 2019 11:09:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fe8f31e-8fba-46cb-bf07-f5056be7ba38</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="tianbing357"]the&amp;nbsp;&lt;span&gt;&amp;quot;nrf_drv_uart&amp;quot; or&amp;nbsp; UART FIFO can realize my needs?&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;Well using a simple_uart should be good enough for the simple use case you are using.&lt;/p&gt;
&lt;p&gt;If you are using APP_Timer to trigger the transfer and the&amp;nbsp;&lt;span&gt;UARTE0_UART0_IRQHandler makes sure to read the UART FIFO and push it to RAM, then adding the sleep in&amp;nbsp;vApplicationIdleHook should work just fine without a problem. Why not just use Tickless IDLE mode and let the RTOS take care of the sleep? All you need to do is set&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define configUSE_TICKLESS_IDLE 1&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and leave vApplicationIdleHook function empty.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You will get better power optimization with this as compared to vApplicationIdleHook sleep, since in tickless modethe RTC tick interrupt is disabled until the expected wake time.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait cause uart not work.</title><link>https://devzone.nordicsemi.com/thread/186042?ContentTypeID=1</link><pubDate>Thu, 09 May 2019 01:31:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4150dc0-6857-402b-b79d-9438724f617b</guid><dc:creator>tianbing357</dc:creator><description>&lt;p&gt;My needs are very simple, &amp;nbsp;i trigger the data(100 byte) transfer in a cycle&amp;nbsp;task , the cycle is 5s, &amp;nbsp;implemented by a APP_TIMER (FreeRTOS), after i trigger the first byte data transfer, i want the chip go to sleep , and then i hope the uart can transfer the rest of bytes. also, in the sleep mode, i want the uart can receive data and notify the cpu to get the received data, not query the flag &amp;quot;NRF_UART0-&amp;gt;EVENTS_RXDRDY&amp;quot; periodically. the&amp;nbsp;&lt;span&gt;&amp;quot;nrf_drv_uart&amp;quot; or&amp;nbsp; UART FIFO can realize my needs?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_app_evt_wait cause uart not work.</title><link>https://devzone.nordicsemi.com/thread/185925?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 11:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1d1fe3d-99ed-4e85-976d-f966b6a9bcce</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You made me read twice to see the function&amp;nbsp;&lt;span&gt;vApplicationIdleHook and figure out that you are using FreeRTOS.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Well the simple uart needs CPU to be awake to trigger send/receive as you are not using EasyDMA to push pop data from the UART FIFO to/from the RAM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In which context are you transmitting data? when you make the chip go to sleep, are you expecting the data transfer to be triggered in some other interrupt context?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>