<?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>Hard fault with enabling of softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98935/hard-fault-with-enabling-of-softdevice</link><description>Hey! I am strugling with this for a few weeks now, so i decided to finaly put up a ticket for my problem here. I am working on a BLE feature on a custom board with a N52832 chip on it. The electrical part of the settup of the N52832 is basically a copy</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Apr 2023 07:59:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98935/hard-fault-with-enabling-of-softdevice" /><item><title>RE: Hard fault with enabling of softdevice</title><link>https://devzone.nordicsemi.com/thread/422199?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2023 07:59:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f757a68-662d-47ec-acbe-aac530467b2c</guid><dc:creator>Sequoia</dc:creator><description>&lt;p&gt;Hey Einar,&lt;br /&gt;&lt;br /&gt;Sorry for the late reaction.&lt;br /&gt;&lt;br /&gt;I messed around with some of the Preprocessor Definitions and the addation of&amp;nbsp;NO_VTOR_CONFIG finaly did the trick. The code runs stable through the startup sections now and reaches the nain loop.&lt;br /&gt;&lt;br /&gt;I tried adding&amp;nbsp;NO_VTOR_CONFIG before when i was diiging in to the essentials needed for enabling the softdevice, but then it didnt work. So i wonder why it was the key stone this time.&lt;br /&gt;&lt;br /&gt;The other preprocessor definitions i use are:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;APP_TIMER_V2&lt;br /&gt;APP_TIMER_V2_RTC1_ENABLED&lt;br /&gt;CONFIG_GPIO_AS_PINRESET&lt;br /&gt;CONFIG_NFCT_PINS_AS_GPIOS&lt;br /&gt;ENABLE_SWO&lt;br /&gt;FLOAT_ABI_HARD&lt;br /&gt;NO_VTOR_CONFIG&lt;br /&gt;NRF52&lt;br /&gt;NRF52832_XXAB&lt;br /&gt;NRF52_PAN_74&lt;br /&gt;S132&lt;br /&gt;NRF_SD_BLE_API_VERSION=7&lt;br /&gt;SOFTDEVICE_PRESENT&lt;/p&gt;
&lt;p&gt;I can sent the other files if you are stil interested in the problem, but it is working for me now, so my problem is solved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault with enabling of softdevice</title><link>https://devzone.nordicsemi.com/thread/421529?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2023 13:55:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7ae2c0c-2540-441e-823d-43b9f712d5c7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;That is interesting. I am also wondering about the other preprocessor defines and linker configuration. If it is difficult to find, perhaps you can upload your Keil and Segger projects here so that I can have a look? Not the code, just the project files (but please include all, as for instance with Segger, the linker configuration is in a separate xml file).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault with enabling of softdevice</title><link>https://devzone.nordicsemi.com/thread/421528?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2023 13:51:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65d2876c-ebf9-4ab8-8424-f68a98e96589</guid><dc:creator>Sequoia</dc:creator><description>&lt;p&gt;Hi Einar,&lt;br /&gt;&lt;br /&gt;We use the nRF5 SDK files as a submodule in the Git repo of the project. We checked the file paths and the adds of the .c files in the project. There dont seem to be any differences there.&amp;nbsp;&lt;br /&gt;I load the softdevice out of the SDK folder in the Git repo.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;When we ran through the differencves we had&amp;#39;nt thought off, indeed the precompiler definitions came to mind. In Segger these seem to be called Preproscessor Definitions.&amp;nbsp;&lt;br /&gt;In here we found some differences, those were the inclusion of difinitions:&amp;nbsp;&lt;br /&gt;&lt;span&gt;&lt;span class="ui-provider gz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;CONFIG_NFCT_PINS_AS_GPIOS,&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="ui-provider gz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;NRF_SD_BLE_API_VERSION=7,&amp;nbsp;&lt;br /&gt;S132,&amp;nbsp;&lt;br /&gt;__HEAP_SIZE=8192,&amp;nbsp;&lt;br /&gt;__STACK_SIZE=8192&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I included these definitions under the Preprocessor Definitions in my Segger project and this seemed to make a difference.&lt;br /&gt;For a moment a came pass the SVC #16 call and out of the function also pass the Critical Region part. Which seemed to point out that the Softdevice is working.&lt;br /&gt;After that with a bit of debugging again i get a new fault:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="ui-provider gz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/SVC-fault.PNG" alt=" " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="ui-provider gz b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak" dir="ltr"&gt;Which stil seems to point to a problem with SVC adresses, but is i think an improvement over the hard fault.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault with enabling of softdevice</title><link>https://devzone.nordicsemi.com/thread/421478?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2023 12:09:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9c9d6ce-c108-4abd-91b6-21e8b102808e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As you see this&amp;nbsp;working when you build with Keil but not with Segger Embedded Studio I wonder what the difference is in the configuration between these two? Are there differences in the include path for instance? Differences in the processor defines? Or differences in the linker configuration / memory layout?&lt;/p&gt;
&lt;p&gt;And as this happens when you enable the SoftDevice - are you building with the include files for the correct SoftDevice variant and version in your include path?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>