<?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>sd_ble_gap_authenticate causes HardFault</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55668/sd_ble_gap_authenticate-causes-hardfault</link><description>Hi 
 
 I am using nRF51822, S130, SDK12, Working on adding static key security to my application 
 So far I have change the GLS (glucose) example to static passkey and connected successfully using nRF Connect and NRF DK51 
 
 Since than I have tried to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Apr 2020 07:36:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55668/sd_ble_gap_authenticate-causes-hardfault" /><item><title>RE: sd_ble_gap_authenticate causes HardFault</title><link>https://devzone.nordicsemi.com/thread/244273?ContentTypeID=1</link><pubDate>Mon, 13 Apr 2020 07:36:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd97cc3d-2541-41b0-84c8-38033c880263</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hey Nicholas,&lt;/p&gt;
&lt;p&gt;Yes, I was using a project in which I have previously changed the implementation of RTC1 (I used it for PPI) and specifically the compare channel that is used for security request, the solution was to bring it back to legacy implementation and than to move my previous PPI implementation to new compare channel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_authenticate causes HardFault</title><link>https://devzone.nordicsemi.com/thread/237092?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 10:34:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a39fd83-9e04-43d8-8381-db1a64c17037</guid><dc:creator>Nicholas_Nuti</dc:creator><description>&lt;p&gt;Hi Ron, may I ask how you solved this issue?&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: sd_ble_gap_authenticate causes HardFault</title><link>https://devzone.nordicsemi.com/thread/228689?ContentTypeID=1</link><pubDate>Sun, 12 Jan 2020 12:13:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7698f6b8-33c0-458d-909c-6881ce09c7ae</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It was a different implementation of the RTC1 interrupt,&lt;/p&gt;
&lt;p&gt;Thank you!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_authenticate causes HardFault</title><link>https://devzone.nordicsemi.com/thread/225736?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 16:48:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd52017c-9d9a-4301-bafa-590e85a2cb37</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hey Vidar!&lt;/p&gt;
&lt;p&gt;I will do that and compare my RTC1 interrupt configuration to that of the original GLS project&lt;/p&gt;
&lt;p&gt;Thanks :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_authenticate causes HardFault</title><link>https://devzone.nordicsemi.com/thread/225628?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 12:37:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcc22667-8d8b-432d-8ec5-39e274e62d54</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s ok to make Softdevice calls from an interrupt context as long as its int priority is lower than the SVC handler&amp;#39;s (is &amp;#39;3&amp;#39; for the 51 series). Have you kept the default setting for&amp;nbsp;RTC1_IRQ_PRI and&amp;nbsp;SWI_IRQ_PRI&amp;nbsp;in app_timer.c? It should be&amp;nbsp;APP_IRQ_PRIORITY_LOWEST for both.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_authenticate causes HardFault</title><link>https://devzone.nordicsemi.com/thread/225599?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 11:22:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33a0ef0c-6218-4f87-9992-46c1c9fd99aa</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hey Fredrik,&lt;/p&gt;
&lt;p&gt;Interesting,&amp;nbsp;I will definitely try that, but to clarify the&amp;nbsp;GLS example did the exact same thing, this wasn&amp;#39;t my addition, and when doing the same thing on the GLS based project no such problem occurred. anyway I will try you method&lt;/p&gt;
&lt;p&gt;Thank you very much for your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_authenticate causes HardFault</title><link>https://devzone.nordicsemi.com/thread/225586?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 10:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00779fac-e5cc-4298-a999-bca3c30689b1</guid><dc:creator>Fredrik</dc:creator><description>&lt;p&gt;Wild guess: from your call stack it appears everything is handled in the context of an RTC IRQ handler. As a general rule, interrupt handlers should be short and perform only simple operations. Calling into the softdevice from an interrupt handler can give unexpected results. Try to perform the authentication from main context (thread mode) insead. These are all valid options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use app timer with scheduling (set&amp;nbsp;APP_TIMER_CONFIG_USE_SCHEDULER and call app_sched_execute in the main loop)&lt;/li&gt;
&lt;li&gt;Set a flag in your timer interrupt handler and check the flag in the main loop and trigger authentication from there&lt;/li&gt;
&lt;li&gt;Use the application scheduler inside the timer interrupt handler to schedule&amp;nbsp;a call to&amp;nbsp;link_secure_peripheral&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the hardfault disappears when authenticating&amp;nbsp;from main context&amp;nbsp;you&amp;#39;ll know that the interrupt context was the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>