<?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>Call pstorage related functions from BLE stack handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9314/call-pstorage-related-functions-from-ble-stack-handler</link><description>Hi, 
 just to know ... is it possible to call pstorage related functions inside a BLE stack event handler ?
I&amp;#39;m facing with Hard Fault and I have the doubt that it&amp;#39;s related to this. 
 In my main.c I have an event handler called when the app receive</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Sep 2015 08:53:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9314/call-pstorage-related-functions-from-ble-stack-handler" /><item><title>RE: Call pstorage related functions from BLE stack handler</title><link>https://devzone.nordicsemi.com/thread/34380?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2015 08:53:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:557eb52d-1841-40ff-b3eb-cb0e4b8e59b6</guid><dc:creator>ppatierno</dc:creator><description>&lt;p&gt;I solved the problem as I explained in the question. Using an asynchronous task (with an app_timer) to call pstorage related function and not inside BLE handler.
Calling pstorage operation from BLE handler always end in an Hard Fault.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Call pstorage related functions from BLE stack handler</title><link>https://devzone.nordicsemi.com/thread/34379?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2015 16:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d06ffdcc-8bb0-435b-9c96-04a2d26dd380</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi ppatierno&lt;/p&gt;
&lt;p&gt;It should work to call pstorage operation from a BLE interrupt handler. However, it is not a good practice to process much code in an interrupt handler, as all other BLE callbacks are blocked when processing the event handler&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>