<?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>saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36246/saadc-sample-cant-use-with-sd_power_system_off</link><description>When I use saadc to sample battery&amp;#39;s power,the software restart ceaselessly.I use the steps as following: 
 1.void saadc_init(void). 
 2.void saadc_callback(nrf_drv_saadc_evt_t const * p_event).read the sample value. 
 3.use nrf_drv_saadc_sample() in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Jul 2018 08:35:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36246/saadc-sample-cant-use-with-sd_power_system_off" /><item><title>RE: saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/thread/141848?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 08:35:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96a5da99-0344-4ea7-9788-1580c047de24</guid><dc:creator>liu_zhixiang</dc:creator><description>&lt;p&gt;Yet. This question has been solved. Thinks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/thread/141847?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 08:32:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5adf610-01ca-4d90-a0b8-72df1337ee9e</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;From what I understand, you have solved the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/thread/139990?ContentTypeID=1</link><pubDate>Fri, 13 Jul 2018 03:42:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b723b639-e88d-4114-b273-ed17e7d9c840</guid><dc:creator>liu_zhixiang</dc:creator><description>&lt;p&gt;I see. This is normal.When I push button,&amp;nbsp;bsp_btn_ble_sleep_mode_prepare() function judge that the button is pressed all the time.So software restart continuously.&amp;nbsp;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt; When I&amp;nbsp; release button, the device can sleep.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/thread/139986?ContentTypeID=1</link><pubDate>Fri, 13 Jul 2018 02:52:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:793d9111-00e1-42eb-8146-92c693a97881</guid><dc:creator>liu_zhixiang</dc:creator><description>&lt;p&gt;I found the source of question . In&amp;nbsp;saadc_callback() , I compare saadc value with 0.9V. When saadc value is less than 0.9v, I call&amp;nbsp;sleep_mode_enter() to deepest sleep. In my project, I have a button pushed to sample battery level. So , in this way , my software restarts continuously, when I push the button. If I comment out&amp;nbsp;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;sleep_mode_enter()&lt;/span&gt;, the software can work normally. But the device cannt sleep to save power.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/thread/139897?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 12:47:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bd7eda1-8d08-4d3c-8e9e-810b5e55992c</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Yes, for the battery level update to work, the device will have to be connected. To get connected the device has to start advertising. If the central is known, directed advertising can be used for a fast connection setup. I would assume that ble_bas_battery_level_update() uses notifications to update the battery level to the central. If that is the case, the central will also have to enable notifications before the peripheral (your device) can transmit the battery level update.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/thread/139666?ContentTypeID=1</link><pubDate>Wed, 11 Jul 2018 07:03:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccaef645-826b-460e-9ae0-1f20a6327f4e</guid><dc:creator>liu_zhixiang</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5164.saadc.txt"&gt;devzone.nordicsemi.com/.../5164.saadc.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I use saadc module like attachment. The software restart continuously.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/thread/139540?ContentTypeID=1</link><pubDate>Tue, 10 Jul 2018 09:52:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7347bca1-47d1-4c38-9baf-7d1a0850efe0</guid><dc:creator>liu_zhixiang</dc:creator><description>&lt;p&gt;Hi Kristin.I modify my third step above. I use a timer to measure battery&amp;#39;s current every 2s. But in&amp;nbsp;saadc_callback(),I use&amp;nbsp;ble_bas_battery_level_update to send percent of battery level. The function return 0x3002. It represent&amp;nbsp;BLE_ERROR_INVALID_CONN_HANDLE. When call&amp;nbsp;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;ble_bas_battery_level_update&lt;/span&gt;(), it need to connected?Can you tell me how to solve this error?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/thread/139528?ContentTypeID=1</link><pubDate>Tue, 10 Jul 2018 08:36:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2c8a9e8-2fa2-470e-8715-64381d5f2851</guid><dc:creator>liu_zhixiang</dc:creator><description>&lt;p&gt;Thank you for your reply.I see your point. I want to achieve&amp;nbsp; when chip works completely including sample battery&amp;#39;s value and so on, it calls&amp;nbsp;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:21px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;sd_power_system_off()&lt;/span&gt; enter system OFF to save power.&lt;/p&gt;
&lt;p&gt;While a button was pushed, the chip wake up , init saadc and use saadc to sample.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now,the question is saadc module and system_off use together, the chip always restart from main. It seems somewhere mistake,but log cant print fatal error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: saadc sample cant use with sd_power_system_off()</title><link>https://devzone.nordicsemi.com/thread/139524?ContentTypeID=1</link><pubDate>Tue, 10 Jul 2018 08:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fce1ea4-a6fc-4a80-884d-51f5afcae6ba</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;sd_power_system_off() puts the chip in &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fpower.html&amp;amp;cp=2_1_0_17_1&amp;amp;anchor=unique_1707892264"&gt;system OFF:&amp;nbsp;&lt;/a&gt;&amp;nbsp; &lt;em&gt;System OFF is the deepest power saving mode the system can enter. In this mode, the system’s core functionality is powered down and all ongoing tasks are terminated.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;What you should use is the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fpower.html&amp;amp;cp=2_1_0_17_2&amp;amp;anchor=unique_1349410009"&gt;system ON&lt;/a&gt; mode: &lt;em&gt;System ON is the default state after power-on reset. In System ON, all functional blocks such as the CPU or peripherals, can be in IDLE or RUN mode, depending on the configuration set by the software and the state of the application executing.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To set the chip in system ON, use sd_app_evt_wait(). For how to use this function, see the BLE examples in the SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>