<?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>SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11743/svcall-resets-nrf51</link><description>Device: NRF51-DK 
 I&amp;#39;m using GDB+OpenOCD to step thru code and it appears that the nrf51 resets itself after calling: 
 SVCALL(SD_BLE_GAP_ADV_START, uint32_t, sd_ble_gap_adv_start(ble_gap_adv_params_t const *p_adv_params)); 
 in file: ble_gap.h 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Feb 2016 23:21:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11743/svcall-resets-nrf51" /><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44424?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 23:21:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:150aa559-7503-4015-b03c-de2748877855</guid><dc:creator>ypearson</dc:creator><description>&lt;p&gt;I&amp;#39;m not 100%, but GDB may be responsible for interfering with the soft device function call triggering a reset. Without GDB it seems to work fine :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44423?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:40:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9972a68e-0f51-4619-a776-de6527781362</guid><dc:creator>ypearson</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure what the name is, its just the default code.&lt;/p&gt;
&lt;p&gt;err_code = ble_advertising_init(&amp;amp;advdata, &amp;amp;scanrsp, &amp;amp;options, on_adv_evt, NULL);&lt;/p&gt;
&lt;p&gt;This returns 0&lt;/p&gt;
&lt;p&gt;(gdb) p/x err_code
$3 = 0x0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44422?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:34:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad705c50-bb27-4811-b279-ca5e800bb2ae</guid><dc:creator>Gustavo - Argenox</dc:creator><description>&lt;p&gt;Can you show what m_adv_uuids is configured to, and what&amp;#39;s the name of the device?
You should check the return value of ble_advertising_init&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44421?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:32:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dcc238f-6250-4247-a345-bf3d26128041</guid><dc:creator>ypearson</dc:creator><description>&lt;p&gt;int main(void)
{
uint32_t err_code;
bool erase_bonds;
uint8_t  start_string[] = START_STRING;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Initialize.
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
uart_init();
buttons_leds_init(&amp;amp;erase_bonds);
ble_stack_init();
gap_params_init();
services_init();
advertising_init();
conn_params_init();

printf(&amp;quot;%s&amp;quot;,start_string);

err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);

// Enter main loop.
for (;;)
{
    power_manage();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44420?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be6a47b7-4906-469e-a5fe-6f531821d9a2</guid><dc:creator>ypearson</dc:creator><description>&lt;p&gt;static void advertising_init(void)
{
uint32_t      err_code;
ble_advdata_t advdata;
ble_advdata_t scanrsp;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Build advertising data struct to pass into @ref ble_advertising_init.
memset(&amp;amp;advdata, 0, sizeof(advdata));
advdata.name_type          = BLE_ADVDATA_FULL_NAME;
advdata.include_appearance = false;
advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;

memset(&amp;amp;scanrsp, 0, sizeof(scanrsp));
scanrsp.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
scanrsp.uuids_complete.p_uuids  = m_adv_uuids;

ble_adv_modes_config_t options = {0};
options.ble_adv_fast_enabled  = BLE_ADV_FAST_ENABLED;
options.ble_adv_fast_interval = APP_ADV_INTERVAL;
options.ble_adv_fast_timeout  = APP_ADV_TIMEOUT_IN_SECONDS;

err_code = ble_advertising_init(&amp;amp;advdata, &amp;amp;scanrsp, &amp;amp;options, on_adv_evt, NULL);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44419?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:30:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35b33450-f57b-4a6f-b6d4-46c6fe643ad6</guid><dc:creator>Gustavo - Argenox</dc:creator><description>&lt;p&gt;Your softDevice is in Flash yes? and you&amp;#39;ve called ble_stack_init() before? Are you able to get an example like HRS working?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44418?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6378510-61b3-42e0-9b29-0bdee0c6534e</guid><dc:creator>ypearson</dc:creator><description>&lt;p&gt;The function does &lt;em&gt;not&lt;/em&gt; return, so there is no return value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44417?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:27:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:985b1709-7c2f-4f43-9e48-74a6a093f133</guid><dc:creator>ypearson</dc:creator><description>&lt;p&gt;p/x adv_params
$2 = {type = 0x0, p_peer_addr = 0x0, fp = 0x0, p_whitelist = 0x0, interval = 0x40, timeout = 0xb4, channel_mask = {ch_37_off = 0x0, ch_38_off = 0x0,
ch_39_off = 0x0}}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44416?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:27:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22a97893-a5ab-49ab-abd3-cf2abd7b1443</guid><dc:creator>Gustavo - Argenox</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;What is the value of err_code?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Can you post your complete advertising_init function?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44415?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:25:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ec8b239-31b0-445c-867f-8ace9bec6b36</guid><dc:creator>ypearson</dc:creator><description>&lt;p&gt;I&amp;#39;m using the example code without edits.&lt;/p&gt;
&lt;p&gt;The code resets/crashes here:
err_code = sd_ble_gap_adv_start(&amp;amp;adv_params);
Which is a soft device call&lt;/p&gt;
&lt;p&gt;if (m_adv_mode_current != BLE_ADV_MODE_IDLE)&lt;br /&gt;
{&lt;br /&gt;
err_code = sd_ble_gap_adv_start(&amp;amp;adv_params);
if(err_code != NRF_SUCCESS)
{&lt;br /&gt;
return err_code;
}&lt;br /&gt;
}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SVCALL resets nRF51</title><link>https://devzone.nordicsemi.com/thread/44414?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 01:15:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b99cc4ef-928f-45b1-914a-7747f9793c91</guid><dc:creator>Gustavo - Argenox</dc:creator><description>&lt;p&gt;Can you provide the code where you set up the advertisement? The failure to start may be due to bad parameters. Also, the return code will be helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>