<?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>NRF51 PPI: ADC event NRF_DRV_ADC_EVT_DONE not working?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58000/nrf51-ppi-adc-event-nrf_drv_adc_evt_done-not-working</link><description>Hi, 
 I am trying to perform ADC conversions controlled by Timer with minimal manual interaction. My goal is that every 2 seconds, the ADC takes 10 samples in quick succession. For that I configured 2 timers (timer1 2000ms , timer2 10ms). 
 Then I configured</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Feb 2020 08:21:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58000/nrf51-ppi-adc-event-nrf_drv_adc_evt_done-not-working" /><item><title>RE: NRF51 PPI: ADC event NRF_DRV_ADC_EVT_DONE not working?</title><link>https://devzone.nordicsemi.com/thread/236152?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 08:21:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:689ec104-df37-4e6e-ad9a-d2c0621f69b6</guid><dc:creator>Spritkopf</dc:creator><description>&lt;p&gt;Hi. This confirms my suspicion. I will then stick to my current solution of stopping the timer in the ADC callback handler.&lt;/p&gt;
&lt;div&gt;&lt;span&gt;Thanks for the answer!&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;Cheers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51 PPI: ADC event NRF_DRV_ADC_EVT_DONE not working?</title><link>https://devzone.nordicsemi.com/thread/235525?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2020 15:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5303882f-5f20-4b9d-8263-fb5d37387a3e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your assumption is correct,&amp;nbsp;&lt;span&gt;NRF_DRV_ADC_EVT_DONE is an application event, only available in the driver/application. It cannot be used with PPI, which is a hardware peripheral.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The ADC in nRF51 does not support EasyDMA like SAADC in the nRF52 series, the buffer feature is a driver-feature. The hardware ADC peripheral will not generate any event when the buffer is filled, it will only generate the END event after each sample conversion.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You have two possible options:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Stop the timer in the ADC driver callback handler, when you receive the DONE event.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Use a third timer in count-mode, counting the number of END events from the ADC peripheral.&amp;nbsp;Set the compare register to the desired number of samples, and configure PPI to stop the second timer when compare the event from the third timer is generated.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&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>