<?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>GPIOTE interrupt and BLE send resulting in hard fault</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5850/gpiote-interrupt-and-ble-send-resulting-in-hard-fault</link><description>Hi , 
 I am trying to set up event using GPIOTE. I want to implement reading of sensor data and sending over BLE when an interrupt is generated due to activity on a particular pin. I am following pin_change_int_example code and changed just the pin number</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Mar 2015 02:24:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5850/gpiote-interrupt-and-ble-send-resulting-in-hard-fault" /><item><title>RE: GPIOTE interrupt and BLE send resulting in hard fault</title><link>https://devzone.nordicsemi.com/thread/20427?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2015 02:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3ee3ca3-0f41-4eff-a350-cd81a9830bc7</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;You need to setup &lt;code&gt;app_scheduler&lt;/code&gt; and call &lt;code&gt;app_sched_event_put(...)&lt;/code&gt; within the GPIOTE_IRQ handler to transfer the event handling to the app_scheduler.  From the app_scheduler event handling you can call any Softdevice function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt and BLE send resulting in hard fault</title><link>https://devzone.nordicsemi.com/thread/20426?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2015 01:25:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0776dd58-1266-44dc-91f6-fae53fd35eef</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;This is discussed often, a search would have thrown up a number of answers.&lt;/p&gt;
&lt;p&gt;What interrupt priority is your GPIOTE IRQ? If it&amp;#39;s APP HI then it&amp;#39;s above the priority in which the softdevice service calls run and you can&amp;#39;t call a lower priority interrupt from a higher priority one, you get a hardfault.&lt;/p&gt;
&lt;p&gt;Run your GPIOTE IRQ in APP LO priority if you want to call the softdevice directly. Or find a way to have the GPIOTE handler set up a call which is handled by a lower priority interrupt or the main context later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>