<?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>is ppi thread safe?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27476/is-ppi-thread-safe</link><description>I have a thread using a Timer and PPI to trigger SAADC sampling at 100hz. Currently I have an app_timer also running at 100hz to sample the results of the SAADC (and its time stamp) and send notifications. However I am noticing time jitter due to the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Nov 2017 07:18:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27476/is-ppi-thread-safe" /><item><title>RE: is ppi thread safe?</title><link>https://devzone.nordicsemi.com/thread/108529?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2017 07:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d52847f8-7e34-4b2c-aa82-72a2da844522</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Dave&lt;/p&gt;
&lt;p&gt;This sounds like a good way to do it.&lt;/p&gt;
&lt;p&gt;Normally the best way to get an accurate timestamp is to run a capture operation on the timer, storing the current state in one of the CC registers, but that is a bit superfluous when the event you want to timestamp is triggered by the timer in the first place ;)&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is ppi thread safe?</title><link>https://devzone.nordicsemi.com/thread/108528?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2017 22:44:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5786575f-1e5f-4733-9703-e6b4417abe39</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;Thanks for the response.  I decided to increment my timestamp as the ADC samples return in the interrupt callback function.  Since I know the time between each successive ADC sampling is consistent via TIMER+PPI this should guarantee accuracy timestamp keeping.  Even if BLE interrupts the ADC callback or any other CPU. The time associated with the sample will still be valid since it was triggered w/o the CPU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is ppi thread safe?</title><link>https://devzone.nordicsemi.com/thread/108527?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2017 11:11:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0821513-6562-4cb3-931a-e29f83b54a8e</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Dave&lt;/p&gt;
&lt;p&gt;All the PPI channels can operate in parallel, there is no risk of one PPI channel affecting another.&lt;/p&gt;
&lt;p&gt;That said, you can not send a notification based on a PPI connection alone. The HVX call is a software function and needs to be triggered by running some code in the MCU.&lt;/p&gt;
&lt;p&gt;Calling the HVX function will only buffer the packet in the stack, and it will be sent on the next connection event, so there might be some jitter here, but you should be able to make the SAADC sampling itself jitter free.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>