<?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>Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93916/stopped-by-vector-catch-when-attempting-to-debug-nrf52840-using-modified-thread-example</link><description>Hello everyone! 
 I have a Segger project written previously to catch and process sensordata from a NRF52840 DK thats connected to some peripherals (HC-SR04 and such). My current goal is to publish this data via MQTT/Thread to a border router. I have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Nov 2022 16:08:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93916/stopped-by-vector-catch-when-attempting-to-debug-nrf52840-using-modified-thread-example" /><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/396057?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 16:08:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55a20eb3-3b5e-4acd-ba2e-51e1481cf058</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Please see my post here: &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/45838/sd_softdevice_enable-hardfault"&gt;sd_softdevice_enable HardFault&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/395995?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 13:29:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63f29046-7ddc-474c-9071-947ea3ed7b62</guid><dc:creator>kwigulaker</dc:creator><description>&lt;p&gt;How would you go about debugging something like this? Where the softdevice points to another segment without any function name?&lt;img style="max-height:480px;max-width:640px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1280x960/__key/communityserver-discussions-components-files/4/7455.call-stack.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/395991?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 13:24:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e476c80-0ebe-4731-8cec-91562b3d9f25</guid><dc:creator>kwigulaker</dc:creator><description>&lt;p&gt;Aha, now I can see its when calling a function that the softdevice enable method is causing an exception, let me look more into this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/395988?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 13:20:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d8b4afe-3a7e-4076-a3f2-7c472d11cc61</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The stack pointer is correct now and the call stack shows that your program is reaching main().&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1668604735962v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I can tell what function is causing the exception because the call stack view is cropped.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/395984?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 13:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c59804f-7a08-4c4a-b17d-047469ce2848</guid><dc:creator>kwigulaker</dc:creator><description>&lt;p&gt;Here, I am not quite sure what to look at, this is after debugging and running.&lt;/p&gt;
&lt;p&gt;Let me know if there&amp;#39;s anything else to try and find.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:326px;max-width:640px;" alt="Memory window in Segger" src="https://devzone.nordicsemi.com/resized-image/__size/1280x652/__key/communityserver-discussions-components-files/4/Memory-read.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/395972?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 12:36:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:572f7e54-b479-4845-aec9-ef48baa1feb6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Try to read out the initial stack pointer value @ 0x27000 to see what it&amp;#39;s set to now. You can use the memory window in Segger for this. Alternatively, with nrfjprog:&lt;/p&gt;
&lt;p&gt;$ nrfjprog --memrd 0x27000&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/395970?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 12:34:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dccf8efa-d264-4784-9778-60fc54aae1e3</guid><dc:creator>kwigulaker</dc:creator><description>&lt;p&gt;This seems very logical, however I still receive the stopped by vector catch phrase in the debug terminal when running, and I have LED5 blinking whenever I attempt to read the NRF_LOG info with either RTT viewer or Segger, do you have any advice on how to remedy this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/395964?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 12:11:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de437c16-b38e-46b3-b175-4acd9148d1c9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks. I was able to download your attachment from google drive now. Turns out the problem was related to incorrect linker settings, as you suspected. In your case, the RAM_PH_START symbol was configured with an offset from where the RAM memory region actually starts, which caused the initial stack pointer value to become invalid.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The fix is to set the RAM_PH_START symbol to 0x20000000 (&lt;span&gt;&lt;a title="Memory map" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/memory.html?cp=4_0_0_3_1_2#memorymap"&gt;Memory map&lt;/a&gt;&lt;/span&gt;) here:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1668600130801v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/395955?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 11:29:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e07c956-c460-4de3-b74a-131cbc615c78</guid><dc:creator>kwigulaker</dc:creator><description>&lt;p&gt;I was unable to reupload the .zip directly to the post, does Google Drive work?&lt;/p&gt;
&lt;p&gt;Below is a share link to where I&amp;#39;ve uploaded the augmented thread example as a .zip.&lt;/p&gt;
&lt;p&gt;(EDIT: it seems the file was uploaded to the post anyway, so either link should work the same)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1Re8y3IvUR5q2HL89PqwD_BpJmVwGwhLA/view?usp=share_link"&gt;https://drive.google.com/file/d/1Re8y3IvUR5q2HL89PqwD_BpJmVwGwhLA/view?usp=share_link&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopped by vector catch when attempting to debug NRF52840 using modified Thread Example</title><link>https://devzone.nordicsemi.com/thread/395947?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 10:46:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1d622a9-5092-4f20-9ca5-114426befa5a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Could you please re-upload the project as a .zip? I get a checksum error when I try to extract the .rar you uploaded for some reason.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>