<?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>sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19227/sd_softdevice_enable-crashes-on-nrf52832-when-debugging</link><description>Hi Everybody 
 When I run my code with the debugger, it always crashes when executing sd_softdevice_enable(). Even if there is no breakpoint activated. However, when I run the code without the debugger, it works fine. 
 I am using the PCA10040 dev board</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jul 2019 21:37:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19227/sd_softdevice_enable-crashes-on-nrf52832-when-debugging" /><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/200163?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 21:37:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4b6b235-7b21-43ec-80e5-d9c432534e3c</guid><dc:creator>Bill Finger</dc:creator><description>&lt;p&gt;In case anyone runs into this issue using IAR, the key is to add, under Project Options-&amp;gt;Debugger-&amp;gt;Extra Options, the command line option:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-drv_vector_table_base=0x0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/135599?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 13:16:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:600c6a0f-3925-4909-b3e3-553ba1780a91</guid><dc:creator>raccoon</dc:creator><description>&lt;p&gt;May the force be with you, I was banging my head for the past 3 hours...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/133662?ContentTypeID=1</link><pubDate>Mon, 28 May 2018 13:06:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01e9193a-19df-4e4e-95e3-47591e2c4ef3</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;Thank you it fixed my issue&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/127801?ContentTypeID=1</link><pubDate>Wed, 11 Apr 2018 10:55:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aae7668-d9e3-432f-b639-15a234dcc2d5</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Could you post your setup, i.e. SDK version, SD version SES version, HW used etc?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/127049?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 12:52:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:883f3bad-ea66-4523-9f67-b1e6d6a8bb26</guid><dc:creator>jmag999</dc:creator><description>&lt;p&gt;Embedded Studio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/127036?ContentTypeID=1</link><pubDate>Thu, 05 Apr 2018 12:34:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12d24bd6-0da0-42de-b2f0-e8316bde8c49</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/jmag999"&gt;jmag999&lt;/a&gt;: Is this using Segger Embedded Studio or Segger Ozone?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/126865?ContentTypeID=1</link><pubDate>Wed, 04 Apr 2018 13:27:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ceaf7ad-d8a3-4768-8738-f487720c795f</guid><dc:creator>jmag999</dc:creator><description>&lt;p&gt;I just ran into this same issue trying to debug the DFU project in Segger Embedded Studio.&amp;nbsp; I don&amp;#39;t see a similar setting for causing the j-link to start from a reset.&amp;nbsp; Anyone know how to do this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/126859?ContentTypeID=1</link><pubDate>Wed, 04 Apr 2018 13:06:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86d345ee-2a65-4fe3-a5d2-ab6ab8cf7e2a</guid><dc:creator>Jimmie Johansson</dc:creator><description>&lt;p&gt;I know that this is an old question, but I found the solution and it may help another person in the future:&lt;/p&gt;
&lt;p&gt;Open the ozone project file (.jdebug) and look for AfterTargetReset and AfterTargetDownload. Change so VectorTableAddress is set to 0x0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/74495?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2017 14:39:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dc4d1b5-410c-48ae-9fb2-6aeaa1f84351</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@facotl: So using Ozone, resetting and run does not work for you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/74494?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2017 17:34:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:996cd38e-998a-4f9a-84f2-cc072113dec9</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;I have the same issue but no success... (i have a bootloader)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/74493?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 10:51:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62a0c64c-079e-42d1-a11d-4620efd1ed31</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@fwanner: Does the approach described by Shane work for you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/74492?ContentTypeID=1</link><pubDate>Sat, 06 May 2017 21:37:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8725039-9deb-44e6-bb12-94fb611d7b25</guid><dc:creator>Shane Anderson</dc:creator><description>&lt;p&gt;Hello Fabi,&lt;/p&gt;
&lt;p&gt;I believe I&amp;#39;m encountering the same error and I think I know why.  Note: I&amp;#39;m using the S140 softdevice on the nRF52840, but I believe it&amp;#39;s the same issue.&lt;/p&gt;
&lt;p&gt;When you are debugging with the J-Link, you load your app past the SoftDevice and the debugger will typically start you in the Reset_Handler of your app.  The key here is that &lt;strong&gt;debugging avoids running the Reset_Handler in the SoftDevice&lt;/strong&gt;, which appears to setup a bunch of stuff that must be done before calling sd_softdevice_enable.&lt;/p&gt;
&lt;p&gt;On the flip-side, a true reset, launches using the Reset_Handler as specified in the SoftDevice, which then eventually runs the Reset_Handler of your app.  As it should be.&lt;/p&gt;
&lt;p&gt;So, I think you can possibly specify the initial actions of your debugger and instruct it to do a hardware reset and run from there.  I&amp;#39;m currently stuck on this part--I&amp;#39;m using Segger&amp;#39;s Ozone and can&amp;#39;t seem to find a way to specify the Reset Strategy.  However, I have a pretty easy workaround--use the reset button in Ozone and then run from there--that seems to do the trick--I just wish I could get it to reset on first debug.&lt;/p&gt;
&lt;p&gt;I hope that helps!  (And I hope this is what&amp;#39;s really going on..)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/74491?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 14:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:258a6cb8-a7f6-4202-9f77-e8bfd09e8394</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Are you able to see if sd_softdevice_enable() returns an error code or doesnt it return at all? As long as you do not step after you hit a breakpoint set after ble_stack_init is called you should be OK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/74490?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2017 09:56:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ecca4b8-6598-45b1-87bd-d0fbacb9271c</guid><dc:creator>Fabi</dc:creator><description>&lt;p&gt;I just run the solution without any breakpoint and get a &amp;#39;SIGTRAP: Trace/breakpoint trap&amp;#39; error in Visual Studio. By placing breakpoints I could figure out that the error occures when executing sd_softdevice_enable(). Because every breakpoint before the execution of this function can be executed, all after this call can not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_softdevice_enable() crashes on nRF52832 when debugging</title><link>https://devzone.nordicsemi.com/thread/74489?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2017 09:47:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53e6ac40-4a99-421f-a312-56555f15d91e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;How do you know that the nRF52832 crashed when executing sd_softdevice_enable() if you&amp;#39;re not using breakpoints? Once you&amp;#39;ve enabled the SoftDevice you cannot halt the program as this will break the timing requirements of the SoftDevice and it will Hardfault.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>