<?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>LPCOMP occasionally missing interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50810/lpcomp-occasionally-missing-interrupt</link><description>Hi, 
 I&amp;quot;m using SDK 15.3.0 with an NRF52840 dev board. I&amp;#39;m trying to record the timings from an incoming IR signal. In doing so I&amp;#39;m using LPCOMP with an analog input pin to record IR signals which will toggle at frequencies ranging from 1.2 ms to 2.4</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Aug 2019 08:26:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50810/lpcomp-occasionally-missing-interrupt" /><item><title>RE: LPCOMP occasionally missing interrupt</title><link>https://devzone.nordicsemi.com/thread/203753?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2019 08:26:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31609232-a8e0-4f1b-bc93-a86f1f319f22</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I think you will be facing the exact same issue if you switch to GPIOTE, as it seems that the issue is related to handling the interrupt fast enough. There is no &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/processor_usage_patterns.html?cp=3_4_2_0_15_2"&gt;operation in the softdevice specifications&lt;/a&gt;&amp;nbsp;that should block you from handling the interrupt within the required time, as it seems to be more than 1 ms between the two missed events. Please make sure that you do not run any other peripherals at the same high priority, and that you do not spend excessive time in the interrupt handler.&lt;/p&gt;
&lt;p&gt;You can also try with different prescaling/reference and with/without the hysteresis, to see if this makes any difference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP occasionally missing interrupt</title><link>https://devzone.nordicsemi.com/thread/203663?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 15:53:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edfb431c-0f2e-40d1-b438-eec840e41355</guid><dc:creator>Mojo</dc:creator><description>&lt;p&gt;I am using this library&amp;nbsp;&lt;a href="https://github.com/IOsonata/IOsonata/blob/master/ARM/Nordic/src/analog_comp_nrf5x.cpp"&gt;https://github.com/IOsonata/IOsonata/blob/master/ARM/Nordic/src/analog_comp_nrf5x.cpp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It works fine for me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP occasionally missing interrupt</title><link>https://devzone.nordicsemi.com/thread/203633?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 14:09:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a1bd9ab-80e2-41ee-b0f8-76b238944f8d</guid><dc:creator>Quantum_Quail</dc:creator><description>&lt;p&gt;I am using the soft device and I&amp;#39;ve tried setting the interrupt to priority 2 but the results are still the same. Do you think amplifying the signal and using GPIOTE will result in any differences? Or perhaps there are other libraries I can use?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP occasionally missing interrupt</title><link>https://devzone.nordicsemi.com/thread/203632?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 14:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23fe79e3-a05a-472c-a937-81659c6edfb2</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I see. Are you running the LPCOMP interrupt at the highest possible priority? Are you using the softdevice in your application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP occasionally missing interrupt</title><link>https://devzone.nordicsemi.com/thread/203628?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 13:58:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34a5754f-06c7-4666-81da-abf1e72f98af</guid><dc:creator>Quantum_Quail</dc:creator><description>&lt;p&gt;My original setup is exactly as you have detailed, PPI connecting a TIMER Task out and LPCOMP Event, with an LPCOMP, interrupt attached that collects the CC value. However, since the LPCOMP interrupt misses edges, it throws the entire array of times off. Do you have any suggestions/alternative solutions you could recommend for timing an IR signal?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP occasionally missing interrupt</title><link>https://devzone.nordicsemi.com/thread/203541?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 11:16:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b53fac3-c077-4dd0-af57-6859a77b6322</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You can use PPI to trigger one of the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23_0#concept_i53_2pp_sr"&gt;CAPTURE tasks&lt;/a&gt;&lt;span&gt;&amp;nbsp;of the TIMER, which will store the counter value in the corresponding CC register. You will have to read out the CC value in the interrupt, but at least you avoid the delay from event to interrupt is triggered to capture the value. As far as I know, there is no way to store CC value directly into RAM buffer.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP occasionally missing interrupt</title><link>https://devzone.nordicsemi.com/thread/203388?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 16:06:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fa62c97-fc1d-47ec-8894-a76462642186</guid><dc:creator>Quantum_Quail</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Seems like the problem was that the interrupt to the LPCOMP was being called late. After attaching the GPIOTE to PPI, the signals came out perfect. Since I&amp;#39;m trying to time this IR signal with a hardware timer, is there a way to use PPI to directly store CC values into a buffer instead of using an interrupt as I did before.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP occasionally missing interrupt</title><link>https://devzone.nordicsemi.com/thread/203313?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2019 12:44:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f7ad5a2-dc59-4dd1-ade9-2a1affc54507</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you testing this with a minimal example, or does the application perform other tasks as well? If other higher priority tasks are blocking you from clearing the event in the interrupt handler, the event/interrupt may not be generated on the subsequent crossings.&lt;/p&gt;
&lt;p&gt;Could you also try to toggle the GPIO using PPI+GPIOTE, to make sure this is only done by this event? You can use &lt;a href="https://github.com/andenore/NordicSnippets/blob/master/examples/ppi/main.c"&gt;this sample code&lt;/a&gt;, but connect the&amp;nbsp;&lt;a title="EVENTS_CROSS" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/lpcomp.html?cp=3_0_0_5_11_2_6#register.EVENTS_CROSS"&gt;EVENTS_CROSS&lt;/a&gt;&amp;nbsp;from LPCOMP to PPI EEP, instead of the TIMER event.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>