<?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>NRF52 RESET question</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56667/nrf52-reset-question</link><description>Dear Nordic 
 there are two question find in my software. it may be some matter with thest two question, so put here together. 
 1. 
 My software will be reset about several minutes. but no debug output in jlink rtt viewer. 
 my software is base NUS,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Jan 2020 07:47:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56667/nrf52-reset-question" /><item><title>RE: NRF52 RESET question</title><link>https://devzone.nordicsemi.com/thread/229753?ContentTypeID=1</link><pubDate>Mon, 20 Jan 2020 07:47:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8710fbd0-5da8-4328-9a77-0489c2e3a0cd</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The&amp;nbsp;APP_ERROR_CHECK(err_code); inside will restart your chip if the err_code is NOT equal to NRF_SUCCESS. Which means that either&amp;nbsp;bsp_indication_set or&amp;nbsp;bsp_btn_ble_sleep_mode_prepare or&amp;nbsp;sd_power_system_off has failed with an error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 RESET question</title><link>https://devzone.nordicsemi.com/thread/229730?ContentTypeID=1</link><pubDate>Sun, 19 Jan 2020 10:06:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0dc8c15-6854-45d1-8ec1-b45ad15d0dc6</guid><dc:creator>Roger huang</dc:creator><description>&lt;p&gt;thanks，sd_ble_cfg_set or set define in sdk_config are all ok for the error return.&lt;/p&gt;
&lt;p&gt;but do you know the first qustion,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;why my software reset when call&amp;nbsp;&lt;span&gt;sleep_mode_enter();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now I only restart the advertising again when&amp;nbsp;BLE_ADV_EVT_IDLE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;static void on_adv_evt(ble_adv_evt_t ble_adv_evt)&lt;br /&gt;{&lt;br /&gt;switch (ble_adv_evt)&lt;br /&gt;{&lt;br /&gt;case BLE_ADV_EVT_FAST:&lt;br /&gt;bsp_indication_set(BSP_INDICATE_ADVERTISING);&lt;br /&gt;break;&lt;br /&gt;case BLE_ADV_EVT_IDLE:&lt;br /&gt;//sleep_mode_enter();&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// this line bring out reset&lt;br /&gt;break;&lt;br /&gt;default:&lt;br /&gt;break;&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 RESET question</title><link>https://devzone.nordicsemi.com/thread/229600?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 12:36:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b28191eb-41c1-47dc-a8de-123e4a43550c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Roger,&lt;/p&gt;
[quote user=""]My software will be reset about several minutes. but no debug output in jlink rtt viewer.[/quote]
&lt;p&gt;The reset happens by default due to APP_ERROR_CHECK() after a function that returned a failed error code other than NRF_SUCCESS. You need to have a breakpoint in the app_error_fault_handler to get the call stack to be able to track which function had APP_ERROR_CHECK that failed. We cannot narrow the problem down based on the info given. Please search your code if there are any other places which calls&amp;nbsp;NVIC_SystemReset() in your code.&lt;/p&gt;
[quote user=""]my software print&amp;nbsp;&amp;lt;00&amp;gt; &lt;span style="background-color:rgb(255, 0, 0);"&gt;error&lt;/span&gt;&amp;gt; ble_gatt: sd_ble_gap_data_length_update() (request) on connection 0x0 returned unexpected value 0x13.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;This is your application that has initiated data length update procedure and it failed with error 0x13 (NRF_ERROR_RESOURCES). The explanation for this is given in the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.0.1%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=4_5_3_1_2_1_3_16&amp;amp;anchor=gac4a6ef5c106107eb2a1707bb26f3245c"&gt;API documentation&lt;/a&gt;&amp;nbsp;clearly says that to be able fix this, you need to increase the event length of the connection before initiating the data length update procedure. Please do so like mentioned in the documentation and this error will go away.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 RESET question</title><link>https://devzone.nordicsemi.com/thread/229566?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 10:06:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b03dfa7-80d9-4516-85eb-463a67498f9a</guid><dc:creator>Roger huang</dc:creator><description>&lt;p&gt;for the 1 reset requestion, I find when adv idle, software goto sleep, then it reset,&lt;/p&gt;
&lt;p&gt;in here&amp;nbsp; &amp;nbsp;static void on_adv_evt(ble_adv_evt_t ble_adv_evt)&lt;br /&gt;{&lt;br /&gt; switch (ble_adv_evt)&lt;br /&gt; {&lt;br /&gt; case BLE_ADV_EVT_FAST:&lt;br /&gt; bsp_indication_set(BSP_INDICATE_ADVERTISING);&lt;br /&gt; break;&lt;br /&gt; case BLE_ADV_EVT_IDLE:&lt;br /&gt; //sleep_mode_enter();&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// this line bring out reset&lt;br /&gt; break;&lt;br /&gt; default:&lt;br /&gt; break;&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;but I want it go to sleep , like the SDK, thanks for support!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>