<?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>Softdevice crashes with PPI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3163/softdevice-crashes-with-ppi</link><description>Hi 
 I&amp;#39;ve made a small application on a NRF51422 device. It&amp;#39;s is loaded with the newest version of S320 and the newest API from you homepage. 
 In my application i need a couple of PWMs to trigger some external hardware. These PWMs are created using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Jul 2014 09:14:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3163/softdevice-crashes-with-ppi" /><item><title>RE: Softdevice crashes with PPI</title><link>https://devzone.nordicsemi.com/thread/11673?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2014 09:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e791acd-e9ad-40f0-8a7f-32d67aca2479</guid><dc:creator>anderswb</dc:creator><description>&lt;p&gt;Hi Håkon. Follow up question.&lt;/p&gt;
&lt;p&gt;We tried changing the SD to S110-SD-v7 from S310 and updated the SDK to 6.0.0 by overwriting the /Source/ and /Include/ folders in our project folder. The IROM and RAM adresses has been updated as specified in the v7 migration guide.&lt;/p&gt;
&lt;p&gt;Now we get some wierd error when initializing the GAP. The init code is pretty much the same as the one in the gap_params_init(void) function in the nrf51-ble-app-lbs project on your github. But our sd_ble_gap_device_name_set() function returns BLE_ERROR_INVALID_ATTR_HANDLE (0x3001) and the program keeps rebooting as a result.&lt;/p&gt;
&lt;p&gt;Any ideas? We looked through all of the documentation, but there&amp;#39;s no mention of anything we should be aware of in this regard.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice crashes with PPI</title><link>https://devzone.nordicsemi.com/thread/11672?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2014 07:34:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd2ed765-7de1-43ee-a108-e818a58bdf60</guid><dc:creator>anderswb</dc:creator><description>&lt;p&gt;Thanks. That makes sense.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice crashes with PPI</title><link>https://devzone.nordicsemi.com/thread/11671?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2014 07:24:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6683d52f-cf9c-4607-9252-39ce535f33c7</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Since the softdevice uses parts of the NRF_PPI peripheral, it protects the whole peripheral, so that the application cannot access it directly (if you try, you&amp;#39;ll end up in HardFault). So, using this protection, the only way we&amp;#39;re allowed to access it is through the nrf_soc API (sd_ppi-prefixed functions).
If you set up the PPI before starting the softdevice, the softdevice will only care about the PPI channel it needs and leave the others untouched. BTW: I&amp;#39;ll send you a PM regarding your last question:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice crashes with PPI</title><link>https://devzone.nordicsemi.com/thread/11670?ContentTypeID=1</link><pubDate>Tue, 22 Jul 2014 20:34:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53299e43-990f-437c-adf0-41bbe0946143</guid><dc:creator>anderswb</dc:creator><description>&lt;p&gt;Hi Håkon&lt;/p&gt;
&lt;p&gt;I found the information regarding the IRQ priorities while waiting for you reply, but thanks anyway.&lt;/p&gt;
&lt;p&gt;I still don&amp;#39;t understand the PPI stuff. I&amp;#39;m pretty confident that I&amp;#39;m not using any of the channels that are reserved according to the SD specifications. For some reason it works if I set it up before i start the softdevice. It&amp;#39;s only if I set it up after I&amp;#39;ve started the SD that it chrashes. It&amp;#39;s not really that important, but it&amp;#39;s a little concerning i think. Any ideas?&lt;/p&gt;
&lt;p&gt;On another note while I have your attention. :) Do you have any idea if it&amp;#39;s possible for me to get access to the S110/S120 SD instead of the S320? For some reason I only get access to some of the stuff with the Dynastream module I&amp;#39;m using. Seems a bit wasteful for me to order a NRF51422, that I don&amp;#39;t really need, just to gain access.&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Softdevice crashes with PPI</title><link>https://devzone.nordicsemi.com/thread/11669?ContentTypeID=1</link><pubDate>Tue, 22 Jul 2014 17:05:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24b942d8-ca16-43fb-8266-fbba7cd6719e</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The PPI is a restricted peripheral (see the S310 spec for more details), which means that this has to be accessed by the softdevice API when the softdevice is enabled.&lt;/p&gt;
&lt;p&gt;You can configure the PPI prior to starting the softdevice, but you will have to make sure that any interrupts enabled at this point must be set to priority level &amp;#39;1&amp;#39; or &amp;#39;3&amp;#39;, as these are the priority levels that the softdevice accepts.&lt;/p&gt;
&lt;p&gt;Most likely, it&amp;#39;s the Timer2 (or GPIOTE) interrupt priority that gives you this error code.
Try calling:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NVIC_SetPriority(TIMER2_IRQHandler, 3);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Before starting the softdevice.&lt;/p&gt;
&lt;p&gt;This library may be of interest to you:
&lt;a href="https://github.com/NordicSemiconductor/nrf51-pwm-library"&gt;github.com/.../nrf51-pwm-library&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>