<?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>NCS system off fast</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87261/ncs-system-off-fast</link><description>Hello, 
 NCS1.9.1, VSCode ,nRF21540DK, 
 i want to system off fast, but 
 after clicking the button1 many times, it cannot be restarted/awaken. 
 
 
 
 Best regards</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Apr 2022 00:35:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87261/ncs-system-off-fast" /><item><title>RE: NCS system off fast</title><link>https://devzone.nordicsemi.com/thread/365272?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 00:35:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c016e2c-f28b-4394-a9ec-15b28e77b2e8</guid><dc:creator>yoyou</dc:creator><description>&lt;p&gt;thank you,&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS system off fast</title><link>https://devzone.nordicsemi.com/thread/365238?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 14:23:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9db34c86-1bf0-450b-874b-9a2c89952bb8</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Glad to hear you were able to turn the device off correctly.&lt;/p&gt;
&lt;p&gt;In system OFF mode, the CPU is turned OFF (which is why the power consumption is so low), and thus you won&amp;#39;t be able to use it for anything until you turn it back on.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS system off fast</title><link>https://devzone.nordicsemi.com/thread/365060?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 00:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9be50871-cc62-4b98-b26f-38209ca3f488</guid><dc:creator>yoyou</dc:creator><description>&lt;p&gt;Hi,Simon,&lt;/p&gt;
&lt;p&gt;in main() ,when button pressed,will break while,&lt;/p&gt;
&lt;p&gt;and call&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;go_system_off&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;I tried system off five times and couldn&amp;#39;t wake up again.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; press button to go_sysytem_off&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color:#008000;"&gt;press button&amp;nbsp; to wake up ok&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; press button to go_sysytem_off&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color:#008000;"&gt;&amp;nbsp;press button&amp;nbsp; to wake up ok&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; press button to go_sysytem_off&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color:#008000;"&gt;press button&amp;nbsp; to wake up ok&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; press button to go_sysytem_off&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color:#ff0000;"&gt;press button can&amp;#39;t wake up&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; press button to go_sysytem_off&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color:#ff0000;"&gt;press button can&amp;#39;t wake up&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; press button to go_sysytem_off&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color:#ff0000;"&gt;press button can&amp;#39;t wake up&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;img style="font-family:inherit;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x158/__key/communityserver-discussions-components-files/4/pastedimage1651019932529v1.png" /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;when i change to as follow:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; k_timer_stop(&amp;amp;my_timer);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; bt_le_scan_cb_unregister(&amp;amp;scan_callbacks);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; bt_le_per_adv_sync_delete(sync);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; bt_le_scan_stop();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; go_system_off();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:150%;"&gt;problem solved.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:150%;"&gt;one more question:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:150%;"&gt;how to add codes to&amp;nbsp;control LED twinkle or ADCreadBattery_NTC_temperature&amp;nbsp; in system off mode?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS system off fast</title><link>https://devzone.nordicsemi.com/thread/364974?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 13:25:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8c99a10-90f0-4e9d-86fa-86ad25464842</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Ah, I see. Yes, this is possible, as it&amp;#39;s not necessary to have these busy wait and extra sleep calls before going to system OFF. You can just disable the peripherals you&amp;#39;re using, and then go directly to system OFF if you&amp;#39;d like. The following snippet can be commented out entirely as long as you disable the UART at some point I think.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	printk(&amp;quot;Busy-wait %u s\n&amp;quot;, BUSY_WAIT_S);
	k_busy_wait(BUSY_WAIT_S * USEC_PER_SEC);

	printk(&amp;quot;Busy-wait %u s with UART off\n&amp;quot;, BUSY_WAIT_S);
	int rc = pm_device_action_run(cons, PM_DEVICE_ACTION_SUSPEND);
	k_busy_wait(BUSY_WAIT_S * USEC_PER_SEC);
	rc = pm_device_action_run(cons, PM_DEVICE_ACTION_RESUME);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS system off fast</title><link>https://devzone.nordicsemi.com/thread/364797?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 02:55:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98af831e-8b7e-4ec4-8686-3a7c13013f86</guid><dc:creator>yoyou</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;fast&amp;quot; system OFF? means&amp;nbsp;&lt;span style="color:#0000ff;"&gt;k_busy_wait and sleep&lt;/span&gt; will take time,system OFF process takes 4s,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;i want to&amp;nbsp;system OFF less than 2s.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;is in debug mode (i don&amp;#39;t know how to set release mode)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;system OFF ,when fully entering sleep mode, press the key to wake up，and than press the key&amp;nbsp;go to&amp;nbsp;system OFF,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;repeat this action and you will not be able to wake up within 10 times.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(especially in the process of entering system&amp;nbsp;OFF, click the button several times)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope I can go to sleep mode within 2 seconds after pressing the button to make sure I wake up every time I press the button.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS system off fast</title><link>https://devzone.nordicsemi.com/thread/364739?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 13:22:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f6a9654-acdb-42b2-8938-edd2a3730fa6</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you explain what you mean about needing a &amp;quot;fast&amp;quot; system OFF? Also,&amp;nbsp;what exact behavior do you see when pressing button 1 multiple times? Is this while in debug mode or in a release build? I need some more information to understand what the issue is and what you want to achieve here.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>