<?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>Couldn&amp;#39;t change sampling frequency when using Timer + PPI with ADC.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33776/couldn-t-change-sampling-frequency-when-using-timer-ppi-with-adc</link><description>Hi, 
 I just create simple example based on nRF51 ADC examples, using SDK12.3.0 with softdevice S130 v2. 
 I used PPI + Timer to get sample from ADC. I used TIMER2 to trigger ADC sampling task, but changing ADC_SAMPLE_RATE doesn&amp;#39;t affect rate of sampling</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Apr 2018 14:03:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33776/couldn-t-change-sampling-frequency-when-using-timer-ppi-with-adc" /><item><title>RE: Couldn't change sampling frequency when using Timer + PPI with ADC.</title><link>https://devzone.nordicsemi.com/thread/129799?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 14:03:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d59646ad-1641-4e41-891b-1c8d3536b913</guid><dc:creator>Alisha</dc:creator><description>&lt;p&gt;Thanks for you reply, I use the same approach currently.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Couldn't change sampling frequency when using Timer + PPI with ADC.</title><link>https://devzone.nordicsemi.com/thread/129785?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 13:26:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:947e9b10-b223-4dc5-addd-0a8de64a2794</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;As you said yourself, you can only reach&amp;nbsp;a sampling period of 2.09 seconds (~0.48&amp;nbsp;Hz). You are not able to scale the TIMER frequency below 31.25 kHz and the counter register is too small. You either need to use timer interrupts (trigger interrupt every 2 sec e.g. and count to 5) or the RTC.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Couldn't change sampling frequency when using Timer + PPI with ADC.</title><link>https://devzone.nordicsemi.com/thread/129772?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 12:53:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74528e0d-99e9-484b-b208-33159a38f3b2</guid><dc:creator>Alisha</dc:creator><description>&lt;p&gt;Thanks for your reply. Would you please explain how should I set timer setting for 0.1 Hz sampling with TIMER2 peripheral, I don&amp;#39;t want to use RTC timer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Couldn't change sampling frequency when using Timer + PPI with ADC.</title><link>https://devzone.nordicsemi.com/thread/129760?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 12:33:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a06e092-46d5-460b-8436-191f102c61ad</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;That sounds right. Maybe you can look into using the RTC instead.&amp;nbsp;You can still use PPI and you should be able to achieve 0.1 Hz sampling.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Couldn't change sampling frequency when using Timer + PPI with ADC.</title><link>https://devzone.nordicsemi.com/thread/129730?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 11:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f18cc56f-e9b0-4e87-a853-19be82548a3c</guid><dc:creator>Alisha</dc:creator><description>&lt;p&gt;It seems I found the problem, the timer bit width is 16 bit and I try to set the ADC_SAMPLE_RATE to 10 second. Also the frequency of timer is 31.25 kHz, with simple computation the maximum possible delay is 2^16 / 31250 = 2.09 seconds. Am I right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>