<?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>ncs1.5.0 and nrf5340 board ,GPIOE interrupt every 4ms ECG data ready, but 30ms can read one time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77727/ncs1-5-0-and-nrf5340-board-gpioe-interrupt-every-4ms-ecg-data-ready-but-30ms-can-read-one-time</link><description>I use nordic5340 SPI read ADS1298R ecg data, using nrf5340 p0.13 to connect ADS1298R data ready pin . when ADS1298R data ready pin high to low mean ADS1298R data ready .i config GPIOE interrupt ,and in interrupt give a semophere to ecg thread to read</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Jul 2021 13:41:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77727/ncs1-5-0-and-nrf5340-board-gpioe-interrupt-every-4ms-ecg-data-ready-but-30ms-can-read-one-time" /><item><title>RE: ncs1.5.0 and nrf5340 board ,GPIOE interrupt every 4ms ECG data ready, but 30ms can read one time</title><link>https://devzone.nordicsemi.com/thread/321850?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 13:41:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cec457a-60d1-4899-848b-cb3728e21743</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It&amp;#39;s a little hard to know exactly what&amp;#39;s causing this without being able debug your application and without having access to the&amp;nbsp;ADS129 sensor. I assume there are some other threads running in the background causing the delay. The thread aware debugging feature that comes with Ozone may help you figure out the cause:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/thread-aware-debugging-with-nrf-connect-sdk"&gt;Thread aware debugging with nRF Connect SDK&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I created a simple sample where I triggered a timer every 4ms and woke up a custom thread using a semaphore. I then toggled a GPIO (as well as using LOG_INF()) in the custom thread to see if ran every 4ms, and it did indeed:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1627306613308v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Can you test out the same sample in NCS v1.6.0 using nrf5340dk_nrf5340_cpuapp? First with the timer, and then you swap it out the timer with the sensor interrupt.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/semaphore_5F00_timing.zip"&gt;devzone.nordicsemi.com/.../semaphore_5F00_timing.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is there a reason you&amp;#39;re logging all the data? Logging every 4ms corresponds to&amp;nbsp;250 logs each second. By the way, I don&amp;#39;t think it should affect the timing since it has a very low priority.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>