<?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>Automated sampling of an input GPIO via EasyDMA</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35495/automated-sampling-of-an-input-gpio-via-easydma</link><description>I would like to sample a digital IO input from two IO&amp;#39;s into the processor internal memory incrementally per every rising or falling edge of each of the signals. 
 Is there a way to use GPIOTE IN via PPI to drive EasyDMA and get a memory buffer with the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Apr 2026 16:57:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35495/automated-sampling-of-an-input-gpio-via-easydma" /><item><title>RE: Automated sampling of an input GPIO via EasyDMA</title><link>https://devzone.nordicsemi.com/thread/564659?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2026 16:57:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3660777d-b83c-4175-838a-50987f36eb3e</guid><dc:creator>hsilstec</dc:creator><description>&lt;p&gt;I would propose to connect a GPIO pin with a wire to the SPI input clock. The GPIO pin is toggled by a timer. Then use the SPI which is connected to the DMA to capture the SPI data in pin at given time intervals. Should be possible without CPU intervention.&lt;/p&gt;
&lt;p&gt;Sorry, I just started with the nRF52840. Maybe it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Automated sampling of an input GPIO via EasyDMA</title><link>https://devzone.nordicsemi.com/thread/136501?ContentTypeID=1</link><pubDate>Mon, 18 Jun 2018 08:50:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1707fb48-038b-4c92-a3c2-4fa6b5400386</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]two IO&amp;#39;s into the processor internal memory incrementally per every rising or falling edge of each of the signals.&amp;nbsp;[/quote]
&lt;p&gt;This would require a bit of fiddling, but it depends on what information you need. The GPIOTE IN can be configured to provide an event on the following:&lt;/p&gt;
&lt;p&gt;* Rising edge&lt;/p&gt;
&lt;p&gt;* Falling edge&lt;/p&gt;
&lt;p&gt;* Any change (toggle)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you need to detect both the amount of rising and falling edge individually, you&amp;#39;ll need to use two GPIOTE channels per input, and externally connect two GPIOs to&amp;nbsp;the signal.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Is there a way to use GPIOTE IN via PPI to drive EasyDMA and get a memory buffer with the two io&amp;#39;s pattern per any change. For example: { 0, 3, 2, 1, 2, 0, ... }?[/quote]
&lt;p&gt;The nRF5 devices do not have a generic DMA channel, so it&amp;#39;s not possible to get the GPIOTE IN count directly into memory.&lt;/p&gt;
&lt;p&gt;What you can do is to hook together the GPIOTE-&amp;gt;IN event to a timer TASKS_COUNT, then you can manually trigger a&amp;nbsp;TASKS_CAPTURE[n] (remember to do a TASKS_CLEAR afterwards) to read how many pulses you&amp;#39;ve gotten since the last time.&lt;/p&gt;
&lt;p&gt;Note that since you mention two signals, you have to use a separate TIMER instance, configured&amp;nbsp;in&amp;nbsp;COUNTER mode, for each signal in order to differentiate between the two, and even more if you need to distinguish between rising and falling edges.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>