<?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>Low power mode with nrf9160 and cat_tracker application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57831/low-power-mode-with-nrf9160-and-cat_tracker-application</link><description>Hello, 
 
 we have developed a custom board using the nrf9160 SICA chip and are now modifying the bifravst cat tracker example to suite our needs. 
 Basicaly, it samples from ADC and sends the collected data every so often. Between the sampling periods</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Mar 2020 08:52:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57831/low-power-mode-with-nrf9160-and-cat_tracker-application" /><item><title>RE: Low power mode with nrf9160 and cat_tracker application</title><link>https://devzone.nordicsemi.com/thread/239904?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 08:52:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9debc5a2-1cf2-4070-9cad-5bf551d47bff</guid><dc:creator>Tjaz</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;we managed to figure it out.&amp;nbsp;Setting only TASKS_STOPTX and TASKS_STOPRX does not turn UART off fully.&lt;br /&gt;If it helps anyone else, the following two functions do all we need to fully disable and enable UART 0, as well as prevent leaking of current out of the pins.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;
&lt;div class=" ace_editor ace-clouds"&gt;
&lt;div class="ace_scrollbar ace_scrollbar-v"&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void uart_0_disable(void)
{
    // stop tx and rx
    NRF_UARTE0-&amp;gt;TASKS_STOPTX = 1;
    NRF_UARTE0-&amp;gt;TASKS_STOPRX = 1;
    // disable whole UART 0 interface
    NRF_UARTE0-&amp;gt;ENABLE = 0;

    // deselect rx and tx pins and clear them
    NRF_UARTE0-&amp;gt;PSEL.TXD = 0xFFFFFFFF;
    NRF_P0_NS-&amp;gt;OUTCLR = (1 &amp;lt;&amp;lt; UART0_TX_PIN);

    NRF_UARTE0-&amp;gt;PSEL.RXD = 0xFFFFFFFF;
    NRF_P0_NS-&amp;gt;OUTCLR = (1 &amp;lt;&amp;lt; UART0_RX_PIN);

    // reconfigure them as GPIO pins and set them to output/0
    gpio_pin_configure(gpio_dev, UART0_RX_PIN, GPIO_DIR_OUT);
    gpio_pin_write(gpio_dev, UART0_RX_PIN, 0);

    gpio_pin_configure(gpio_dev, UART0_TX_PIN, GPIO_DIR_OUT);
    gpio_pin_write(gpio_dev, UART0_TX_PIN, 0);
}

void uart_0_enable(void)
{
    // select pins
    NRF_UARTE0-&amp;gt;PSEL.TXD = UART0_TX_PIN;
    NRF_UARTE0-&amp;gt;PSEL.RXD = UART0_RX_PIN;

    // enable interface
    NRF_UARTE0-&amp;gt;ENABLE = 8;
    NRF_UARTE0-&amp;gt;TASKS_STARTRX = 1;
    NRF_UARTE0-&amp;gt;TASKS_STARTTX = 1;
}&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The same can be done for other UARTs, just replace&amp;nbsp;NRF_UARTE0 with&amp;nbsp;NRF_UARTE1, for example.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It would be immensely helpful, if things like this were documented, instead of having to&amp;nbsp;&lt;span&gt;scour devzone, trying and merging different answers.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Tjaž V&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Low power mode with nrf9160 and cat_tracker application</title><link>https://devzone.nordicsemi.com/thread/236279?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 14:16:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e052701-9de3-4847-8eff-86d2d7312f0e</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Tjaz,&amp;nbsp;&lt;br /&gt;No, I am not suggesting that at all.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have called the function&amp;nbsp;&lt;em&gt;lte_lc_offline(&lt;/em&gt;), the modem goes to offline mode.&amp;nbsp;&lt;br /&gt;Try to call the function&amp;nbsp;&lt;em&gt;lte_lc_power_off(),&amp;nbsp;&lt;/em&gt;to put the modem in Power OFF mode and see if that changes the power consumption.&lt;/p&gt;
&lt;p&gt;I am not too familiar with the cat tracker application since it is not in the official NCS repository, but let me try to come with some suggestions.&lt;/p&gt;
&lt;p&gt;If you check the .&lt;em&gt;config&amp;nbsp;&lt;/em&gt;file in the &lt;em&gt;build/zephyr&amp;nbsp;&lt;/em&gt;folder you can check which peripherals and modules that are enabled in the application.&lt;/p&gt;
&lt;p&gt;To check e.g. peripherals in runtime you could either read directly the registers or utilize the driver APIs if they support that function.&lt;br /&gt;Please check out &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/1933" rel="noopener noreferrer" target="_blank"&gt;this pull request&lt;/a&gt;&amp;nbsp;of the Serial LTE modem example on how it goes to sleep mode and turn OFF the UART in runtime.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Low power mode with nrf9160 and cat_tracker application</title><link>https://devzone.nordicsemi.com/thread/235347?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2020 08:36:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09b4bd3f-2894-45ff-b8b5-9befb423b432</guid><dc:creator>Tjaz</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;we are not actually using PSM - i.e. we do not request it from the network with &lt;em&gt;lte_lc_psm_req.&amp;nbsp;&lt;br /&gt;&lt;/em&gt;We connect with&amp;nbsp;&lt;em&gt;&lt;/em&gt;&lt;em&gt;lte_lc_init_and_connect()&lt;/em&gt;, send our data and then disconnect with&amp;nbsp;&lt;em&gt;lte_lc_offline();&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So you are suggesting that not using PSM mode, the modem and/or SIM card is still communicating with the network and thus using power?&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;br /&gt;Tjaž V&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Low power mode with nrf9160 and cat_tracker application</title><link>https://devzone.nordicsemi.com/thread/234662?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2020 13:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4047a042-961f-42c0-a05c-ef2d06bddc36</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Tjaz,&lt;br /&gt;Before digging into your code, please state which SIM card you are using?&lt;br /&gt;And also which network you are connecting to can be interesting.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I would like you to try to increase the PSM interval (RPTAU) to over 10 minutes to see if there is a restriction in the SIM card.&lt;/p&gt;
&lt;p&gt;Some SIM cards require that the modem needs to stay in PSM mode longer than 10 minutes so the SIM card can go in Shut down mode and draw around (~0,01µA).&lt;/p&gt;
&lt;p&gt;I may suspect that this could be the idle current from the SIM card.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;martin L,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>