{"id":8960,"date":"2018-12-27T16:11:45","date_gmt":"2018-12-27T16:11:45","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=8960"},"modified":"2019-01-04T19:32:01","modified_gmt":"2019-01-04T19:32:01","slug":"nrf5-sdk-sd_power_system_off","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=8960","title":{"rendered":"nRF5 SDK: sd_power_system_off()"},"content":{"rendered":"<ul>\n<li>Emulated System OFF Mode<\/li>\n<li>Debug Interface Mode<\/li>\n<li>Debug Mode<\/li>\n<\/ul>\n<h3>UART Output<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;info&gt; app: Current Time service client started.\r\n&lt;debug&gt; app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist\r\n&lt;info&gt; app: Fast advertising\r\n&lt;debug&gt; app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist\r\n&lt;info&gt; app: Slow advertising\r\n&lt;debug&gt; ble_cts_c: BLE event handler called with event 0x26\r\n&lt;debug&gt; ble_cts_c: BLE event handler called with event 0x10\r\n&lt;info&gt; app: Connected.\r\n&lt;debug&gt; ble_cts_c: BLE event handler called with event 0x12\r\n&lt;debug&gt; ble_cts_c: BLE event handler called with event 0x12\r\n&lt;debug&gt; ble_cts_c: BLE event handler called with event 0x12\r\n&lt;debug&gt; ble_cts_c: BLE event handler called with event 0x19\r\n&lt;debug&gt; app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist\r\n&lt;info&gt; app: Fast advertising\r\n&lt;debug&gt; ble_cts_c: BLE event handler called with event 0x11\r\n&lt;info&gt; app: Disconnected.\r\n&lt;debug&gt; app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist\r\n&lt;info&gt; app: Slow advertising\r\n&lt;debug&gt; ble_cts_c: BLE event handler called with event 0x26\r\n<\/pre>\n<h3>Screenshots<\/h3>\n<p><code>sd_power_system_off()<\/code> doesn&#8217;t power off: it&#8217;s in Debug Mode!!<\/p>\n<table>\n<tr>\n<td>\n<a href=\"http:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_1-300x78.png\" alt=\"\" width=\"300\" height=\"78\" class=\"alignleft size-medium wp-image-8963\" srcset=\"https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_1-300x78.png 300w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_1-768x201.png 768w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_1-1024x268.png 1024w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_1-624x163.png 624w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_1.png 1110w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n    <\/td>\n<\/tr>\n<tr>\n<td>\n<a href=\"http:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_2-300x73.png\" alt=\"\" width=\"300\" height=\"73\" class=\"alignleft size-medium wp-image-8964\" srcset=\"https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_2-300x73.png 300w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_2-768x186.png 768w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_2-1024x249.png 1024w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_2-624x151.png 624w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_2.png 1174w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n    <\/td>\n<\/tr>\n<tr>\n<td>\n<a href=\"http:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_3-300x64.png\" alt=\"\" width=\"300\" height=\"64\" class=\"alignleft size-medium wp-image-8965\" srcset=\"https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_3-300x64.png 300w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_3-768x163.png 768w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_3-1024x217.png 1024w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_3-624x132.png 624w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_3.png 1174w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n    <\/td>\n<\/tr>\n<tr>\n<td>\n<a href=\"http:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_4-300x115.png\" alt=\"\" width=\"300\" height=\"115\" class=\"alignleft size-medium wp-image-8967\" srcset=\"https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_4-300x115.png 300w, https:\/\/blog.bachi.net\/wp-content\/uploads\/2018\/12\/nrf_log_4.png 589w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\n    <\/td>\n<\/tr>\n<\/table>\n<h3>Forum<\/h3>\n<p><a href=\"https:\/\/devzone.nordicsemi.com\/f\/nordic-q-a\/11304\/sd_power_system_off-returns-immediately-and-forces-reset\">sd_power_system_off returns immediately and forces reset<\/a><br \/>\n<a href=\"https:\/\/devzone.nordicsemi.com\/f\/nordic-q-a\/15677\/why-does-nrf52-hrs-sdk11-example-sd_power_off-return-6#post-id-90460\">Why does nRF52 hrs sdk11 example sd_power_off return 6?<\/a><br \/>\n<a href=\"https:\/\/devzone.nordicsemi.com\/f\/nordic-q-a\/17016\/problem-with-emulated-system-off-mode-with-nrf52#post-id-98831\">Problem with emulated System OFF mode with NRF52<\/a><\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n\/* components\/softdevice\/s132\/headers\/nrf_error.h *\/\r\n\/* SoC error base *\/\r\n#define NRF_ERROR_SOC_BASE_NUM  (0x2000)\r\n\r\n\r\n\/* components\/softdevice\/s132\/headers\/nrf_error_soc.h *\/\r\n\/* Power off should not return *\/\r\n#define NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN         (NRF_ERROR_SOC_BASE_NUM + 6)\r\n\r\n\r\n\/* components\/softdevice\/s132\/headers\/nrf_soc.h *\/\r\n\/**@brief Puts the chip in System OFF mode.\r\n *\r\n * @retval ::NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN\r\n *\/\r\nSVCALL(SD_POWER_SYSTEM_OFF, uint32_t, sd_power_system_off(void));\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Emulated System OFF Mode Debug Interface Mode Debug Mode UART Output &lt;info&gt; app: Current Time service client started. &lt;debug&gt; app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist &lt;info&gt; app: Fast advertising &lt;debug&gt; app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist &lt;info&gt; app: Slow advertising &lt;debug&gt; ble_cts_c: BLE event handler [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8960","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/8960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8960"}],"version-history":[{"count":6,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/8960\/revisions"}],"predecessor-version":[{"id":9064,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/8960\/revisions\/9064"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}