<?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>PPI + SoftDevice = HardFault?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37597/ppi-softdevice-hardfault</link><description>Hi all! 
 We&amp;#39;ve been time-stamping GPIO events using PPI in nRF52 , and it works* ! 
 ...but when using the SoftDevice , it apparently clashes with the PPI about 30ms after the BLE connection , and sd_ppi_channel_enable_get () triggers a Hard Fault: </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 02 Sep 2018 17:46:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37597/ppi-softdevice-hardfault" /><item><title>RE: PPI + SoftDevice = HardFault?</title><link>https://devzone.nordicsemi.com/thread/146860?ContentTypeID=1</link><pubDate>Sun, 02 Sep 2018 17:46:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2738f2c-8f98-4c84-bbc7-74b3e100483b</guid><dc:creator>Cedric Honnet</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon!&lt;br /&gt;Thanks a lot for your answer ;)&lt;br /&gt;(sorry for the answer time, holidays made it longer than expected)&lt;/p&gt;
&lt;p&gt;It looks like there was 2 problems:&lt;br /&gt;- The priority was set to 3 already, but it was done after the softdevice was started and that was not good&amp;nbsp;apparently!&lt;br /&gt;- Once this was fixed, using the&amp;nbsp;nrf_ppi_xxx() functions worked ;)&lt;br /&gt;&lt;br /&gt;Thanks again for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PPI + SoftDevice = HardFault?</title><link>https://devzone.nordicsemi.com/thread/144851?ContentTypeID=1</link><pubDate>Mon, 20 Aug 2018 07:42:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e073e56f-3fa6-4d46-b882-93e64eeb0d63</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Cedric,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One of the changes from nRF51 to nRF52 is the amount of interrupt priorities available (cortex m0 vs cortex m4).&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the interrupt priority levels of the SoftDevice stack:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.sds/dita/softdevices/s130/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=2_3_2_0_15_1"&gt;http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.sds/dita/softdevices/s130/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=2_3_2_0_15_1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You have two options to work around this hardfault:&lt;/p&gt;
&lt;p&gt;1. Change the interrupt priority of the timer ISR to 5 or less, since SVC is handled in interrupt priority 4.&lt;/p&gt;
&lt;p&gt;2. Instead of using the sd_ppi-API, you can call the NRF_PPI structure directly. This is because the PPI is an &amp;quot;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.sds/dita/softdevices/s130/sd_resource_reqs/hw_block_interrupt_vector.html?cp=2_3_2_0_6_0"&gt;open peripheral&lt;/a&gt;&amp;quot;, meaning that the application can access it directly. The softdevice uses the hard-coded PPI channels&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.sds/dita/softdevices/s130/sd_resource_reqs/ppi.html?cp=2_3_2_0_6_2"&gt;as shown here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>