<?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>timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117195/timer1-4-inaccurate-timing-issue-on-nrf5-softdevice</link><description>1.test code 
 the code run separately on ble-softdevice and only timer demo .test code as follow: 
 
 
 2. test data 
 test result as follows： 
 picture A,show timer2 timing jitter test on NRF5-SDK17.1 ble-softdevice 
 
 picture A 
 
 picture B ，show</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Dec 2024 07:15:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117195/timer1-4-inaccurate-timing-issue-on-nrf5-softdevice" /><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/515383?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 07:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4a63c76-7a2d-4a42-a74b-e35f7db400f9</guid><dc:creator>david@2024</dc:creator><description>&lt;p&gt;thank you very much。I&amp;#39;ll refer to it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/515381?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 07:09:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dbd3579-e405-4e64-b486-15681c71b688</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming. If the channel selection command can be made the same length as the start sampling command, you might be able to use the &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/easydma.html#d914e100"&gt;EasyDMA array list&lt;/a&gt; feature to perform the entire SPI transaction sequence without CPU involvement.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/515380?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 07:04:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23aaad25-b38b-41df-8dc1-29b3e98e4285</guid><dc:creator>david@2024</dc:creator><description>&lt;p&gt;1.Is the ADC channel input changed by sending a SPI command or by using a GPIO output?&lt;/p&gt;
&lt;div class="content full threaded-reply-content user-defined-markup" data-replyid="515379" data-userid="4240" data-permalink="~/f/nordic-q-a/117195/timer1-4-inaccurate-timing-issue-on-nrf5-softdevice/515379"&gt;
&lt;div class="content"&gt;
&lt;div&gt;&lt;span&gt;the ADC channel input changed by sending a SPI command.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="edit-form"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/515379?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 07:01:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:804a9cc0-ac18-4c44-a76e-72d4ce9edea3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is the ADC channel input changed by sending a SPI command or by using a GPIO output?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/515363?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 01:39:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f953503-dc91-47c9-a229-18fb0e8a645e</guid><dc:creator>david@2024</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi,&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;1.Is it a requirement to sample the ADC while connected with BLE?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;yes.sample the ADC while connected with BLE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.it seems you need to change the ADC input channel between each sample.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;yes.it need to change ADC input channel,that need to cpu&amp;nbsp;&amp;nbsp;involvement.so I think,in my case, it need TIMER event to&amp;nbsp;change ADC input channel,and start&amp;nbsp;sample the ADC.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/515132?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2024 13:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c2e700a-d6d4-4fd3-a342-b9ee37dfb7e4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &amp;quot;Repeated transfers&amp;quot; section of the driver documentation here:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/hardware_driver_spi_master.html"&gt;https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/hardware_driver_spi_master.html&lt;/a&gt;&amp;nbsp;explains how you can set up PPI-triggered SPI transfers which can help you repeat the same SPI transfers over and over again without CPU involvement.&amp;nbsp;Unfortunately, I&amp;#39;m not sure this will work in your case, as it seems you need to change the ADC input channel between each sample.&lt;/p&gt;
&lt;p&gt;Is it a requirement to sample the ADC while connected with BLE?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/514834?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 06:24:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22881694-d238-40db-9641-7f139cb2d1eb</guid><dc:creator>david@2024</dc:creator><description>&lt;p&gt;&lt;strong&gt;Hi，&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;1.&amp;nbsp;I recommend you use PPI to connect the TIMER event&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ff9900;"&gt;&lt;b&gt;&amp;nbsp; How to use PPI to&amp;nbsp;&lt;strong&gt;The &amp;nbsp;following application scenarios?&lt;/strong&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(1)The application scenarios ：&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img style="max-height:0px;max-width:0px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/0x0/__key/communityserver-discussions-components-files/4/_014F1A4EAE5FE14F2A62FE565F00_17340531261520.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img class="align-left" style="float:left;max-height:134px;max-width:277px;" alt=" " height="134" src="https://devzone.nordicsemi.com/resized-image/__size/554x268/__key/communityserver-discussions-components-files/4/87638.png" width="277" /&gt;&lt;img style="max-height:165px;max-width:265px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/530x330/__key/communityserver-discussions-components-files/4/1538.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;（2）code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&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/_014F1A4EAE5FE14F2A62FE565F00_17340531261520.png" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;thanks!&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/514698?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2024 10:32:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dce881c5-bffb-48ac-9458-0dc19d81a89f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The Low-frequency (LF) clock is the 32KHz clock source.&amp;nbsp;But the&amp;nbsp;TIMERs run off the high frequency clock source.&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/clock.html"&gt;https://docs.nordicsemi.com/bundle/ps_nrf52832/page/clock.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/514694?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2024 10:22:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5200ae13-122b-4a5c-9ea2-8f10cc6e64b2</guid><dc:creator>david@2024</dc:creator><description>&lt;p&gt;Hi，Thank you for your reply.&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/027287.png" /&gt;&lt;/p&gt;
&lt;p&gt;NRF_SDH_CLOCK_LF_SRC=NRF_CLOCK_LF_SRC_SYNTH&amp;nbsp; and&amp;nbsp;&lt;a class="el" href="https://docs.nordicsemi.com/bundle/s132_v7.3.0_api/page/group_n_r_f_s_o_c_f_u_n_c_t_i_o_n_s_4.html#ga3e5afb495a1b0307c749cc268df94a74"&gt;sd_clock_hfclk_request&lt;/a&gt;&lt;span&gt;()&amp;nbsp; ，what&amp;#39;s the different？&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: timer1-4 Inaccurate timing issue on nrf5-softdevice</title><link>https://devzone.nordicsemi.com/thread/514428?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 08:23:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3656b6d1-a0ae-4260-a52b-228647c3cfae</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Interrupts used by the Softdevice can preempt or block&amp;nbsp;your&amp;nbsp;application interrupts for shorter durations which can lead to jitter, please refer to the &lt;a href="https://docs.nordicsemi.com/bundle/sds_s132/page/SDS/s1xx/processor_avail_interrupt_latency/processor_usage_patterns.html"&gt;Processor usage patterns and availability&lt;/a&gt;&amp;nbsp;section of the softdevice specification for more details. If you only need to toggle an GPIO on this timer event, I recommend you use PPI to connect the TIMER event directly to a GPIOTE task as demonstrated by the peripheral GPIOTE example. This will let you toggle the gpio without any CPU involvement.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: to further increase the accuracy, you can request the HF crystal oscillator by calling this function after you&amp;#39;ve enabled the Softdevice:&amp;nbsp;&lt;a class="el" href="https://docs.nordicsemi.com/bundle/s132_v7.3.0_api/page/group_n_r_f_s_o_c_f_u_n_c_t_i_o_n_s_4.html#ga3e5afb495a1b0307c749cc268df94a74"&gt;sd_clock_hfclk_request&lt;/a&gt;()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>