<?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>The program hangs while executing the example code.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73777/the-program-hangs-while-executing-the-example-code</link><description>I am confirming ADC sampling 420Hz operation by following question. 
 https://devzone.nordicsemi.com/f/nordic-q-a/69096/1khz-or-more-adc-sampling-rate-over-ble 
 The source code is as follows. 
 
 
 What mistake did I make?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Apr 2021 07:45:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73777/the-program-hangs-while-executing-the-example-code" /><item><title>RE: The program hangs while executing the example code.</title><link>https://devzone.nordicsemi.com/thread/303907?ContentTypeID=1</link><pubDate>Fri, 09 Apr 2021 07:45:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4183d116-223a-4ff5-b78f-4ddbd1033589</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;This is actually as intendend in the original example. The sample application is configured to enter System OFF mode (i.e. deep sleep) from the&amp;nbsp;BLE_ADV_EVT_IDLE event after the advertising has timed out. The only problem that is that the chip can&amp;#39;t enter System OFF mode while it&amp;#39;s in debug mode, and this is why the program ends up in the error handler if you let advertising time out while debugging.&lt;/p&gt;
&lt;p&gt;If you want, you can disable advertising timeout by setting APP_ADV_DURATION to &amp;#39;0&amp;#39; and replace the BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE flag in advertising_init() with &amp;#39;BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>