<?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>GPIOTE interrupt not fast enough</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91868/gpiote-interrupt-not-fast-enough</link><description>Hi guys. I am using nRF52840. Currently, I want to read out an image from a camera. The camera PCLK is toggled at 500Khz, and what I want to do is to trigger an interrupt every time the PCLK goes HIGH or RISING EDGE. However, I noticed that GPIOTE cannot</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Sep 2022 12:15:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91868/gpiote-interrupt-not-fast-enough" /><item><title>RE: GPIOTE interrupt not fast enough</title><link>https://devzone.nordicsemi.com/thread/385957?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 12:15:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a3a1834-52aa-4498-8dec-2c8759fdea51</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which SDK version are you using?&lt;/p&gt;
&lt;p&gt;Possibly the delay here is caused by the wakeup latency, and it might be possible to make it faster, but if you need to process the input every 2us I think the interrupt latency will be too slow regardless.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The only way I can see to read the data this fast is to read the clock line in a while loop, and read the data pins as soon as you see the clock go high.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For this to work you need to avoid any other interrupts while the camera transfer is happening, as even the shortest of interrupts will cause you to lose one or more clock periods.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This means it is very limited what kind of other activities you can have going on (such as running any wireless communication) while the camera sensor is being read.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For a more robust solution you could consider finding some kind of parallel to SPI converter, that can convert the parallel output of the camera sensor to an SPI stream. The SPI interfaces have a DMA feature that allow them to send/receive data seamlessly in the background, with very little CPU interaction needed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>