<?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>Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29418/larger-mtu-results-in-hardfault</link><description>I&amp;#39;m running SDK 14.2 using FreeRTOS on a nrf52832. 
 When I increase NRF_SDH_BLE_GATT_MAX_MTU_SIZE to 158, the system ends up in Hard Fault. 
 Anyone have suggestions on where to being looking for the fault?
The soft device has more than enough RAM</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Jun 2020 15:24:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29418/larger-mtu-results-in-hardfault" /><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/255598?ContentTypeID=1</link><pubDate>Wed, 17 Jun 2020 15:24:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be5935ca-8a24-4b01-9f1b-1fe6083aa7ad</guid><dc:creator>Corey</dc:creator><description>&lt;p&gt;it&amp;#39;ｓworks after according your suggest.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Increasing&amp;nbsp;configTIMER_TASK_STACK_DEPTH to 512&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/213298?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2019 05:39:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7274d749-59f1-4399-b54f-360b14e5b395</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Just figured that the issue with increasing the MTU size to 247 could be too little stack size when creating the Timer thread.&lt;/p&gt;
&lt;p&gt;Please look at&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52048/ble_app_hrs_freertos-increassing-mtu-fatal-error"&gt;this&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;thread for a possible workaround.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/159066?ContentTypeID=1</link><pubDate>Mon, 26 Nov 2018 14:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b7152c1-b31b-4f82-8da3-54a14290197e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;i am wondering why I am not able to reproduce this. what is peer you are testing this with? I am guessing probably there are some old values in my FreeRTOSConfig.h file. Have you tried increasing the default configTOTAL_HEAP_SIZE in there? I normally use (4092 * 2) as default. But if you are limited by RAM, then try to increase it to (4092 + 2048).. I cannot think of anything else.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/158895?ContentTypeID=1</link><pubDate>Fri, 23 Nov 2018 19:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1a848a8-0cfb-4ed8-a8fd-1a3843012a35</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;I could not resolve this. Unfortunately I had to limit our MTU and DL settings for our product release.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/158772?ContentTypeID=1</link><pubDate>Fri, 23 Nov 2018 09:17:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c1dda9e-df94-4eeb-ba29-fa607dd01cb3</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;sorry Dave, this thread skipped my queue, I did not see that you replied. Do you still have this problem ? I am confident that due to my delay in answer, you must have dug into it yourself. If you found the solution, can you please update us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/157379?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 00:27:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c22bd288-2e91-42ba-906e-629a5d09a26e</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;I just took the freeRTOS example and increased the MTU to 247 and DL to 251.&amp;nbsp; Works fine until you connect.&amp;nbsp; It crashes during connection&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/157220?ContentTypeID=1</link><pubDate>Wed, 14 Nov 2018 08:04:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e48f9ebc-ffa3-4b16-a0fe-8f3d88ded8b9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I could not reproduce it . Can you help me to reproduce this error Dave?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/156050?ContentTypeID=1</link><pubDate>Tue, 06 Nov 2018 04:08:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6612a04-7d79-4328-8d62-b06fa7a1b6e7</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;This is exactly the error I&amp;#39;m seeing.&amp;nbsp; Have you solved this Jeff?&amp;nbsp; Any comment from Nordic?&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/aryan"&gt;Susheel Nuguru&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/154732?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2018 20:00:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e382f5c1-a382-421c-adec-49807a361433</guid><dc:creator>Jeff Breaking</dc:creator><description>&lt;p&gt;Here are my source files for reference. Based on the ble_apphrs_freertos.&amp;nbsp; The only change I really made was trying to add MTU and DL&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/12032.main.c"&gt;devzone.nordicsemi.com/.../12032.main.c&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2577.FreeRTOSConfig.h"&gt;devzone.nordicsemi.com/.../2577.FreeRTOSConfig.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/40146.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../40146.sdk_5F00_config.h&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/154727?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2018 19:24:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:625816e3-7e65-47dc-9c32-1732cd47fd79</guid><dc:creator>Jeff Breaking</dc:creator><description>&lt;p&gt;For me everything works up to GAP DL 174 and MTU 170.&amp;nbsp; Beyond this causes hardfaults on connection&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/154725?ContentTypeID=1</link><pubDate>Fri, 26 Oct 2018 19:11:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cfd37cb-afbe-4430-8ff1-523103f35014</guid><dc:creator>Jeff Breaking</dc:creator><description>&lt;p&gt;I also see this error with the freeRTOS example.&amp;nbsp; On Connect, the connect event propagates through the system. But quickly the chip goes into Hardfault reaching the Hardfault_c_handler().&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Logging shows:&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: HRS FreeRTOS example started.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_sdh_freertos: Enter softdevice_task.&lt;br /&gt;&amp;lt;info&amp;gt; app: Fast advertising.&lt;br /&gt;&amp;lt;info&amp;gt; app: Slow advertising.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Updating data length to 251 on connection 0x0.&lt;br /&gt;&amp;lt;info&amp;gt; app: Connected&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Data length updated to 27 on connection 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_octets: 27&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_octets: 27&lt;br /&gt;&amp;lt;info&amp;gt; app: Data Length Event Recevied: 251&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: ATT MTU updated to 247 bytes on connection 0x0 (response).&lt;br /&gt;&amp;lt;info&amp;gt; app: Data Length Event Recevied: 251&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Peer on connection 0x0 requested a data length of 251 bytes.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Updating data length to 251 on connection 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Data length updated to 251 on connection 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_octets: 251&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_octets: 251&lt;br /&gt;&amp;lt;info&amp;gt; app: Data Length Event Recevied: 251&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: HARD FAULT at 0x0002E140&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: R0: 0x00000040 R1: 0x20008700 R2: 0x74007300 R3: 0x74007300&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: R12: 0xA5A5A5A5 LR: 0x0002C6F1 PSR: 0x2100020E&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: Cause: Data bus error (PC value stacked for the exception return points to the instruction that caused the fault).&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: Bus Fault Address: 0x7400730C&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The Hardfault always seems to occur after Connection on a call to&amp;nbsp;taskSELECT_HIGHEST_PRIORITY_TASK();&amp;nbsp; &amp;nbsp; inside task.c.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My settings are: SDK15.2,&amp;nbsp; MTU 247, GAP DL 251, Len evt enabled, sdk_ble_task_depth 512&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It seems like the hardfault occurs shortly after the MTU handshaking after connection. I see service discovery occur just before everything blows up.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/136186?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 13:08:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87146196-ad2b-45b4-844c-0dae12a53ef5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Thanks Ken,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please comeback here to update us, it will be really helpful for others.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/136153?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 11:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab6b6615-8b72-4de9-8f86-74a31c75a813</guid><dc:creator>Ken</dc:creator><description>&lt;p&gt;I was able to get it to work, but I could not find any commit clearly indicating what I changed to get it to work properly.&lt;/p&gt;
&lt;p&gt;I also started with the ble_app_hrs_freertos, adding a 512 byte characteristic and increased the&amp;nbsp;MTU size to 158.&lt;br /&gt;I&amp;#39;ll look a but closer at the GIT history to see if I can&amp;nbsp;either reproduce with sharable code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/136072?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 07:54:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:049f86a2-ce2b-49e0-86e3-e7346ff36b7a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;no error or hardfault for me in the example atleast when i change the MTU size. But since you both are getting the same thing, i cannot overlook it. Can one of you give me your setup?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/136063?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 07:33:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:995ff280-8c39-4377-83bc-8c84f1ca8fc6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;ok , i need to reproduce this. Working on it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/136003?ContentTypeID=1</link><pubDate>Wed, 13 Jun 2018 17:53:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:979d8cfc-d993-48b2-9628-85ad07e87244</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;ble_app_hrs_freertos and SDK 15&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/135847?ContentTypeID=1</link><pubDate>Wed, 13 Jun 2018 07:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da32c68d-9752-46ae-aa22-431cc85bb8c3</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;which example is it? did you try with the same SDK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/135412?ContentTypeID=1</link><pubDate>Fri, 08 Jun 2018 18:52:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:735fdf5f-1163-4553-91f6-cbb18f0fb305</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;I get the same&amp;nbsp;issue when I increase the MTU size.&amp;nbsp; It only hardfaults on a Connection, but advertises fine.&amp;nbsp; Did you end up solving this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Larger MTU results in HardFault</title><link>https://devzone.nordicsemi.com/thread/117010?ContentTypeID=1</link><pubDate>Mon, 22 Jan 2018 20:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1be8ce6f-61f8-4962-b8a7-6393e0b601ee</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;with the info you gave, it is hard to say what it is without being able to reproduce it.
Have you tried trying to find out which instruction caused hardfault? Try &lt;a href="https://www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html"&gt;this&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>