<?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>Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94255/adding-timer-interrupt-100us-to-matter-demo</link><description>Hi all, 
 I would like to measure time intervals between gpio edges along with Matter. 
 I tried to use a 100us timer interrupt but seems it will crash the original matter demo (Say light switch). 
 Not sure if the matter stack support this kind of operation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Dec 2022 10:54:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94255/adding-timer-interrupt-100us-to-matter-demo" /><item><title>RE: Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/thread/398945?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2022 10:54:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:babdac67-09be-462f-abc3-fb42d03d0b0d</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Brian,&lt;br /&gt;&lt;br /&gt;According to the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.7.pdf"&gt;nRF52840 technical specification&lt;/a&gt;, Timer can operate in Timer and Counter mode. You can read more about the timer in the chapter 6.30 of the mentioned specification.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/thread/398896?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2022 00:59:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5eaa082-b2e5-4179-ac0c-527a6c4d725f</guid><dc:creator>BrianBlanc</dc:creator><description>&lt;p&gt;Hi Dejan,&lt;/p&gt;
&lt;p&gt;Thanks for your advice. I will give it a try. By the way, do nrf52840 supports timer input capture mode and time interval data can be stored to memory buffers via DMA?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Brian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/thread/398484?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 09:49:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b272549-6bec-4ad6-9723-6b706a9d8909</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Brian,&lt;br /&gt;&lt;br /&gt;You could initialize NEC protocol in app_task.cpp Init() method, add some callbacks to process the data of IR signal and then use Event handling to handle measurements in Matter Zephyr&amp;#39;s thread.&lt;br /&gt;&lt;br /&gt;Button handling is a good example how this can be done. In the AppTask::Init() method, there is initialization dk_buttons_init(ButtonEventHandler), then AppTask::ButtonEventHandler is called on each button interrupt and it calls specific GetAppTask().PostEvent() event which is executed by the Matter thread. An AppTask event callback connected to the IR measurement should contain updating the onoff cluster update as in AppTask::UpdateClusterState() method or simply change the LED state on the DK.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/thread/398216?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 01:03:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abadec8b-17ec-4a20-9810-63e812af0416</guid><dc:creator>BrianBlanc</dc:creator><description>&lt;p&gt;Hi Dejan,&lt;/p&gt;
&lt;p&gt;I just want to read an IR code and then trigger some matter features like light switching. Is it feasible?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am thinking of receiving IR signal from a common IR receiver module (38kHz demodulated) and then try to get the pulse intervals and then decode them into IR codes. I have done that using NCS and nRF SDK wihtout the matter stack. Just wonder if possible to integrate into the matter stack. Any good references on this?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Brian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/thread/398110?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 13:03:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae03abf4-dabd-4ccd-90bd-74f82c898815</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Brian,&lt;br /&gt;&lt;br /&gt;Could you provide more information about the integration of matter light switch demo with reading IR signals from GPIO pins? What is your starting point? What is your desired result?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/thread/397997?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 04:28:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cd60026-b406-4ed8-aa1a-8affa387dc5f</guid><dc:creator>BrianBlanc</dc:creator><description>&lt;p&gt;Hi Dejan,&lt;/p&gt;
&lt;p&gt;Actually, I am trying to read IR signals (NEC protocol, min. pulse gap is around 500us) from a GPIO pin. We did it using NCS and nRF5 SDK (using a 100us timer to sample incoming gpio signal) but once we try to do the same in the matter light switch demo, the whole thing crashed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Brian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/thread/397935?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2022 15:29:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b1ac41b-8b52-4d07-9ea9-26e8ba9faced</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Brian,&lt;br /&gt;&lt;br /&gt;Could you please provide more information on what you are trying to achieve? Do you want to capture PWM signal at the output?&lt;br /&gt;&lt;br /&gt;50 ms is given as an example in the application, and this can be changed. You should be able to use PPI with your desired timer value. You could consider using PPI for registering the edges in similar way as sample does that. It is using alarm to toggle GPIO pins. You could potentially read the output of PWM or use PPI to generate events for starting and stopping the counter.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/thread/397767?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2022 01:54:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8182e9af-1f46-4d65-b312-4eb805c0d44d</guid><dc:creator>BrianBlanc</dc:creator><description>&lt;p&gt;Hi Dejan,&lt;/p&gt;
&lt;p&gt;Thanks for your kind advice, I will look into ppi trace but wonder if it can support 100us as ppi trace sample is 50ms based instead. In the meantime, wonder if nrf52840 supports timer input capture mode with dma? my application is actually decoding IR data packets and I just wonder to grab intervals between data edges (min. around 500us) .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Brian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding timer interrupt (100us) to Matter Demo</title><link>https://devzone.nordicsemi.com/thread/397638?ContentTypeID=1</link><pubDate>Fri, 25 Nov 2022 12:34:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffa46ae3-9b4e-4e7f-b13c-a757a1285c9f</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Based on your description, you could have a look at&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/debug/ppi_trace.html"&gt;PPI Trace&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/debug/ppi_trace/README.html#ppi-trace-sample"&gt;PPI Trace sample&lt;/a&gt;. You can read more about&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/ppi.html"&gt;PPI&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfx/drivers/ppi/index.html#group__nrf__ppi"&gt;PPI drivers&lt;/a&gt;&amp;nbsp;in the documentation.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>