<?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 when adding service UUID to softdevice S132</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30552/hard-fault-when-adding-service-uuid-to-softdevice-s132</link><description>Hi, I get a hard fault when I try to add an own UUID to the softdevice S132. I&amp;#39;m using Eclipse with GCC compiler, Rigado BMD350 eval board with the nRF52832 chip on it. As project template I use the ble_peripherals_template from the SDK 14.2.0 and went</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Feb 2018 13:16:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30552/hard-fault-when-adding-service-uuid-to-softdevice-s132" /><item><title>RE: Hard fault when adding service UUID to softdevice S132</title><link>https://devzone.nordicsemi.com/thread/121076?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 13:16:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:169316bd-22e0-40de-96c3-a9631e04a60a</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Happy to help :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault when adding service UUID to softdevice S132</title><link>https://devzone.nordicsemi.com/thread/121072?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 12:44:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:558f89cd-628f-45b4-93c2-36129a6d1fb9</guid><dc:creator>Phil</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;that helped perfectly. Thank you very much for your support and advices!!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault when adding service UUID to softdevice S132</title><link>https://devzone.nordicsemi.com/thread/121068?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 11:28:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:379b969e-4445-4258-b41b-6b0f313c1af5</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tested your code and think I found the issue. In addition to incrementing&amp;nbsp;&lt;span&gt;&lt;em&gt;NRF_SDH_BLE_VS_UUID_COUNT&lt;/em&gt; you need to allocate more RAM to the Softdevice. The way to figure out how to do this is to use a serial terminal when you debug your project. When your code executes&amp;nbsp;nrf_sdh_ble_enable() these messages are printed out:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-9ea35fa727414d8ba835b73f942a6aa8/serial.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then open your linker script and edit the RAM sizes accordingly:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-9ea35fa727414d8ba835b73f942a6aa8/change.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To make debugging easier you should also use optimization level -O0 (instead of the default -O3) and define&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CFLAGS += -DDEBUG&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;in the C flags&amp;nbsp;in your Makefile.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;EDIT: After I made these changes to your code it seemed to work. Note that you will probably have to make more changes to RAM sizes as you expand your project with more services&amp;nbsp;and characteristics&amp;nbsp;and if you tweak the Softdevice link and bandwidth settings. So be aware of that.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault when adding service UUID to softdevice S132</title><link>https://devzone.nordicsemi.com/thread/121064?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 10:28:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ba3d61f-9170-44dc-b8ce-41822f0a757c</guid><dc:creator>Phil</dc:creator><description>&lt;p&gt;Here they are &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt; These are main.c and the own_service.c and .h. These are the only files I manipulated and added to the project.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2146.ble_5F00_app_5F00_template.zip"&gt;devzone.nordicsemi.com/.../2146.ble_5F00_app_5F00_template.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault when adding service UUID to softdevice S132</title><link>https://devzone.nordicsemi.com/thread/121049?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 08:53:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72db5a3e-b756-43e2-b314-a3fb1676bde1</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Maybe we can start with just the .c and .h files that you use.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault when adding service UUID to softdevice S132</title><link>https://devzone.nordicsemi.com/thread/121048?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 08:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a13e4d7-ac25-4a78-94d8-e51122915f27</guid><dc:creator>Phil</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve incremented the value from 0 to 1 and tried again, but still got the hard fault. I&amp;#39;ve tried to upload my project, but it didn&amp;#39;t work also. I thing it&amp;#39;s too big (zipped 12MB). Can I upload in another way?&lt;/p&gt;
&lt;p&gt;Thanks for the support!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault when adding service UUID to softdevice S132</title><link>https://devzone.nordicsemi.com/thread/121003?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 16:25:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5eb593f-d474-4cab-990f-61c0be67fa47</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you are adding a second VS UUID, make sure to increment &lt;em&gt;NRF_SDH_BLE_VS_UUID_COUNT&lt;/em&gt;&amp;nbsp;in sdk_config.h. I needs to match the number of VS UUIDs in your application.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m a little puzzled that you get a hard fault though. If the issue was a wrong value in&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_VS_UUID_COUNT&amp;nbsp;I&amp;#39;m pretty sure that&amp;nbsp;sd_ble_uuid_vs_add() should only&amp;nbsp;return an error code that you would typically check with&amp;nbsp;APP_ERROR_CHECK(err_code);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If this is in order, do you mind uploading your project files?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>