<?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>Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45268/data-bus-hard-fault-when-handling-secure-connection-bonding</link><description>Hello, I am working on an application which is freeRTOS based, now I wanted to integrate Glucose sensor app which supports secure connection and bonding. In 
 ble_evt_handler, if I take out pm_handler_secure_on_connection (p_ble_evt); then my code still</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Nov 2020 08:33:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45268/data-bus-hard-fault-when-handling-secure-connection-bonding" /><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/281723?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2020 08:33:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40a1e93c-5541-4200-b5b5-4864361980e2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;That is hard to debug but not impossible. I would rather suggest you to increase stack modestly for every task you have and if that helps, reduce the size back to what it was before to isolate the task in question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/281716?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2020 08:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:857276f3-f703-4ab3-9e80-f52d712687f2</guid><dc:creator>asaf</dc:creator><description>&lt;p&gt;how can I find which task need more stack ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/281710?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2020 07:51:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c15840f-4b4b-4ce0-8888-6fa06dced8a6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;It looks like a register pop has been done from a corrupted stack frame which in turn corrupted the PC value. Check if you have enough stack allocated for each task you have and check if you have enough heap dedicated in FreeRTOSConfig.h file to dedicate bigger chunks of stacks for tasks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/281568?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 13:13:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb57c794-cb67-48f5-8285-d940936883c2</guid><dc:creator>asaf</dc:creator><description>&lt;p&gt;sorry my project is an company code that run on dedicated hardware.&lt;/p&gt;
&lt;p&gt;the issue doesn&amp;#39;t occurs on optimization level &amp;quot;Debug&amp;quot;.&lt;br /&gt;&lt;br /&gt;the fault I get while pushing button ( then no issue when call the same function the button call by software).&lt;br /&gt;&lt;br /&gt;another fault I&amp;nbsp;get is:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;error&amp;gt; hardfault: HARD FAULT at 0x00000004&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: R0: 0x20006594 R1: 0x200064E8 R2: 0x2000D444 R3: 0x2000D444&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: R12: 0x20008278 LR: 0x00000004 PSR: 0x6000000E&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: Cause: The processor has attempted to execute an instruction that makes illegal use of the EPS&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/281564?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 13:08:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5da4ec2-4412-4258-8ec4-631bfa2aae50</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hmm, This thread slipped my radar, I see that there is no solution discussed here. Could you please upload your project for me to quickly do a test on my desk?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/281561?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 13:03:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c074025-c502-440a-996c-1e10b3b6ede4</guid><dc:creator>asaf</dc:creator><description>&lt;p&gt;hi , I&amp;#39;m facing the same issue.&lt;/p&gt;
&lt;p&gt;&amp;lt;error&amp;gt; hardfault: HARD FAULT at 0x0003210E&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: R0: 0xD26970F8 R1: 0x000003FF R2: 0x2000D444 R3: 0x2000D444&lt;br /&gt;&amp;lt;error&amp;gt; hardfault: R12: 0x20008278 LR: 0x00032101 PSR: 0x6100000E&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: 0xD26970F8&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;addr2line gives me port.c : 104.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have applied the suggested changes in the SDK&amp;nbsp;&lt;/p&gt;
&lt;p&gt;using sdk 16 with nrf52833&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/212770?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2019 10:13:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c236069c-eef8-4cb9-ba2d-e4000aa540fd</guid><dc:creator>Andreas48752</dc:creator><description>&lt;p&gt;Hello!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;think I may have the same problem here when using freeRTOS and calling&amp;nbsp;nrf_ble_lesc_request_handler() in a task. But how to fix this? What was your solution? Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/182180?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2019 16:32:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f1d6641-35e0-4b6d-85e7-a2f5276dab96</guid><dc:creator>thin_ice</dc:creator><description>&lt;p&gt;Did you mean the instruction address that I provided earlier ? Please see my previous responses&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/182008?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2019 08:04:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f4a2e14-263f-4db7-bb43-09fc80cb39b4</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sorry for very late reply. Most likely you figured this out by yourself.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the idea is to keep the logic into similar context. I do not still like the hardfault&amp;nbsp; being triggered, can you get the instruction address of the memory that caused the hardfault?&lt;/p&gt;
&lt;p&gt;if you have already solved this, can you please update this thread so that others could get help from your experience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/178799?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 22:12:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5aeed9c9-e3aa-445d-b413-48a25fea822b</guid><dc:creator>thin_ice</dc:creator><description>&lt;p&gt;so I confirmed that cause was I put&amp;nbsp;&lt;span&gt;nrf_ble_lesc_request_handler() in a freeRTOS task. This is because in the barebone example I saw they put it in the main loop so I had a task and stick it in. How do I explain the hard fault and how can I fix ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/178756?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 15:53:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87cf6e2b-3304-43a4-b5ac-c490ee76e067</guid><dc:creator>thin_ice</dc:creator><description>&lt;p&gt;so I found out that in sdk_config.h if I have&amp;nbsp;#define PM_HANDLER_SEC_DELAY_MS 400 then immediately after connection is initiated I get a hard fault, but if I change it to&amp;nbsp;#define PM_HANDLER_SEC_DELAY_MS 0 then I don&amp;#39;t. This is already with the sdh_freertos.c patch you mentioned so I don&amp;#39;t think the patch did anything.&lt;/p&gt;
&lt;p&gt;Now with the interrupt priority mod, I still have the same problem. In my application, I stripped everything hardware out, what remains is just BLE stack and a couple of tasks. One of the task has&amp;nbsp;nrf_ble_lesc_request_handler(), one is the &amp;quot;Logger&amp;quot; task.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/178546?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 06:29:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a6883ee-58c2-422b-b65f-affad03a7e06</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;great, try out the patch and see if you have any application specific interrupts where you are not using our driver and forgot to configure the interrupt priority of that interrupt.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also try the below fix by changing the&amp;nbsp;&lt;span&gt;define&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;__NRF_NVIC_SD_IRQS_1&amp;nbsp; 0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;to&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;__NRF_NVIC_SD_IRQS_1 ((uint32_t)(1U &amp;lt;&amp;lt; (MWU_IRQn - 32)))&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;in the nrf_nvic.h header.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/178467?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 15:44:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54d73e7e-56f6-49f3-8c15-a5b88161e59a</guid><dc:creator>thin_ice</dc:creator><description>&lt;p&gt;Hello, I am using SDK 15.2 and the address points to this line (xPortPendSVHandler) as you requested.&lt;/p&gt;
&lt;p&gt;nRF5_SDK_15.2.0_9412b96/external/freertos/portable/GCC/nrf52/port.c:104&lt;/p&gt;
&lt;p&gt;I am going to try the patch and let you know if it helps&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data Bus Hard fault when handling secure connection bonding</title><link>https://devzone.nordicsemi.com/thread/178239?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 08:02:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0985ca80-60c2-44c5-b38b-c4f4305c83df</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which SDK are you using?&lt;/p&gt;
&lt;p&gt;There are two parts of investigation&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) Try to find out if you have applied &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39459/observer-under-freertos-events-stop-coming-after-a-few-minutes"&gt;this&lt;/a&gt;&amp;nbsp;patch to softdevice_task as it might cause some deadlocks and wrong states in the statemachine of peer manager&lt;/p&gt;
&lt;p&gt;2) The Hardfault address 0x2C8FC is inside the application code. The below line should be able to reveal the instruction that is causing the hardfault. We can take a closer look after understanding what that is.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;addr2line -e &amp;lt;src.elf&amp;gt; 0x0002C8FC&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>