<?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>Timer to PPI to GPIOTE propagation delay when Softdevice enabled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89661/timer-to-ppi-to-gpiote-propagation-delay-when-softdevice-enabled</link><description>Hi, 
 I&amp;#39;m using TIMER1 CC0 for SAADC sample triggering through PPI and it&amp;#39;s working well. 
 In order to check sampling frequency, for debug pourpose, I&amp;#39;m using PPI fork for toggling one GPIOPE pin. 
 At low frequency, about 1kHz, all seems ok. 
 But for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Jul 2022 21:32:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89661/timer-to-ppi-to-gpiote-propagation-delay-when-softdevice-enabled" /><item><title>RE: Timer to PPI to GPIOTE propagation delay when Softdevice enabled</title><link>https://devzone.nordicsemi.com/thread/377947?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2022 21:32:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e772998-5e91-4091-8721-4f33672ffbf1</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The drawback of running the HFXO at all times is that the current consumption is not going down when the CPU is sleeping. Since you are running a TIMER anyways, you will anyway not get to very low current, but you can check the different current consumption numbers in&amp;nbsp;&lt;a title="TIMER running" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/_tmp/nrf52840/autodita/CURRENT/parameters.i_timer.html?cp=4_0_0_4_1_0_8"&gt;TIMER running&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer to PPI to GPIOTE propagation delay when Softdevice enabled</title><link>https://devzone.nordicsemi.com/thread/376154?ContentTypeID=1</link><pubDate>Fri, 08 Jul 2022 09:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:775a4658-3f18-40bb-af49-287817c2beb0</guid><dc:creator>LucaF</dc:creator><description>&lt;pre id="tw-target-text" class="tw-data-text tw-text-large tw-ta" style="text-align:left;" dir="ltr" data-placeholder="Traduzione"&gt;In fact, I was not clear, sorry.&lt;br /&gt;Using &lt;span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrfxlib/mpsl/doc/api.html#c.mpsl_clock_hfclk_request"&gt;mpsl_clock_hfclk_request&lt;/a&gt;() the phase shift disappeared, so you right.&lt;br /&gt;Are there &lt;/span&gt;drawbacks using &lt;span&gt;HFXO ?&lt;br /&gt;Thanks very much,&lt;br /&gt;Luc&lt;/span&gt;a&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer to PPI to GPIOTE propagation delay when Softdevice enabled</title><link>https://devzone.nordicsemi.com/thread/376022?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2022 12:57:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21839ca9-7e60-46d3-886d-655a7d2c6cbb</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Sorry, I assumed you were using nRF5 SDK, as you said Softdevice and did not specify the SDK version/variant. It looks like you are using nRF Connect SDK and the&amp;nbsp;&lt;em&gt;Softdevice Controller&lt;/em&gt;. Then the corresponding API to&amp;nbsp;&lt;a title="sd_clock_hfclk_request" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=4_7_4_1_2_7_2_3#ga3e5afb495a1b0307c749cc268df94a74"&gt;sd_clock_hfclk_request&lt;/a&gt;&lt;span&gt;()&amp;nbsp;would be &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrfxlib/mpsl/doc/api.html#c.mpsl_clock_hfclk_request"&gt;mpsl_clock_hfclk_request&lt;/a&gt;().&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer to PPI to GPIOTE propagation delay when Softdevice enabled</title><link>https://devzone.nordicsemi.com/thread/376016?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2022 12:40:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1beeecf7-c704-4e09-b502-678d328d540d</guid><dc:creator>LucaF</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;J&amp;oslash;rgen&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;Here some snapshot on the oscilloscope with persistence enabled.&lt;/p&gt;
&lt;p&gt;Green track is the start sampling signal on gpio P0.29 (oscilloscope trigger on this signal)&lt;/p&gt;
&lt;p&gt;Yellow track is the sampling signal on gpio P0.30 (toggling at each timer CC0 event)&lt;/p&gt;
&lt;p&gt;You can see that whereas left side of the track is sharp, the rigth one is blurry.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/during_5F00_adv_5F00_sampl_5F00_4kHz.png" /&gt;&lt;/p&gt;
&lt;p&gt;Sampling at 4kHz during advertisement - track on the rigth is blurry&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/after_5F00_conn_5F00_sampl_5F00_4kHz.png" /&gt;&lt;/p&gt;
&lt;p&gt;Sampling at 4kHz after connection, no data sending - still bllurry but less blur&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/no_5F00_BLE_5F00_sampl_5F00_8kHz.png" /&gt;&lt;/p&gt;
&lt;p&gt;Sampling at 8kHz with no BLE, almost no blur&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/after_5F00_conn_5F00_sampl_5F00_8kHz.png" /&gt;&lt;/p&gt;
&lt;p&gt;Sampling at 8kHz after connection - track on the rigth is blurry&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here a minimal code I prepared for test. I used nRFConnect SDK and toolchain v. 1.9.1&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Tiny_2D00_BLE_2D00_Peripheral_2D00_minimal.zip"&gt;devzone.nordicsemi.com/.../Tiny_2D00_BLE_2D00_Peripheral_2D00_minimal.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Sorry, I were not able to find &lt;span&gt;&lt;a title="sd_clock_hfclk_request" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=4_7_4_1_2_7_2_3#ga3e5afb495a1b0307c749cc268df94a74"&gt;sd_clock_hfclk_request&lt;/a&gt;() function, where is it defined ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Luca&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer to PPI to GPIOTE propagation delay when Softdevice enabled</title><link>https://devzone.nordicsemi.com/thread/375593?ContentTypeID=1</link><pubDate>Tue, 05 Jul 2022 14:03:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f22102f8-0217-4f20-a8e5-66a5d03c841a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you post your code to setup the TIMER/PPI/GPIOTE, and logic traces showing the phase shift you are observing?&lt;/p&gt;
&lt;p&gt;The PPI signals should be implemented in HW, and should not be affected by the SoftDevice as far as I know, however, the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/ppi.html"&gt;PPI&lt;/a&gt; signals are synced to the 16MHz clock, so it will be delayed (up to) one clock cycle:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;On each PPI channel, the signals are synchronized to the 16 MHz clock to avoid any internal violation of setup and hold timings. As a consequence, events that are synchronous to the 16 MHz clock will be delayed by one clock period, while other asynchronous events will be delayed by up to one 16 MHz clock period.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you tried starting the HFXO in your application and keep this running all the tie, to see if it is the Softdevice&amp;#39;s starting of the HFCLK that is affecting your timer? You can use the API&amp;nbsp;&lt;a title="sd_clock_hfclk_request" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.3.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=4_7_4_1_2_7_2_3#ga3e5afb495a1b0307c749cc268df94a74"&gt;sd_clock_hfclk_request&lt;/a&gt;() to achieve this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>