<?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>Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41966/reading-ws2812b-leftover-data-through-i2s</link><description>Hello there, 
 I am currently trying to read the leftover WS2812b LED strip data which was sent using a single channel I2S. The data sent from the board (through I2S) looks like this: 
 
 with around 34 mV for high and around 2~6 mV on low. I decided</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Feb 2019 08:06:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41966/reading-ws2812b-leftover-data-through-i2s" /><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172942?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 08:06:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0f9fe98-ebf2-493e-ad64-1b6be15a293f</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="Winz"]Okay so what I&amp;#39;m achieving now is to capture all the pulse&amp;#39;s timing. I am really curious about this: will I be able to capture all rising edge and falling edge using one PPI channel and set GPIOTE&amp;#39;s task to sense toggle?[/quote]
&lt;p&gt;It should be possible. You could configure the GPIOTE channel to generate an event on toggling, and hook that up to a timer via a single PPI channel and use it to capture the counter value. Then you can use a short in the timer to reset the timer. You should also enable a interrupt whenever a new timer value is stored.&lt;/p&gt;
&lt;p&gt;The downside with this is that you have to process the interrupts rapidly, between every toggle. You could half this by for instance using two GPIOTEs, two PPI channels and hooking them to separate CC registers (on the same timer or on two different timers). Essentially this is like LEGO, so you can hook things up in different ways and still achieve the same basic end goal.&amp;nbsp;&lt;/p&gt;
[quote user="Winz"]And I would like to know how to store the data in. Will you be able to provide me some info on how to do that? I&amp;#39;ve searched anywhere but did not really see how to store the value when it detects transitions.[/quote]
&lt;p&gt;The data sample (time) is stored in the CC register of the timer. You would typically configure the timer to generate an interrupt so that you can read the data sample form the CC register and clear the interrupt (being ready for the next sample).&lt;/p&gt;
[quote user="Winz"]I referred &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27132/reading-digital-waveform"&gt;here&lt;/a&gt;, and the example code provided was able to capture the time. I adapted here, but I was able to capture (at most) the periods of 16 data, when I expect 24. I guess it&amp;#39;s GPIOTE, not PPI.[/quote]
&lt;p&gt;Yes, this demonstrates much of what we have discussed. You can use it as a reference. I did not understand what you mean by only being able to capture periods of 16 data, though. Can you elaborate?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172599?ContentTypeID=1</link><pubDate>Sat, 23 Feb 2019 05:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e155b4b2-0dab-408e-bf6e-3a81c9c4bc61</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;ahh.. let&amp;#39;s leave the second question alone.&lt;/p&gt;
&lt;p&gt;Okay so what I&amp;#39;m achieving now is to capture all the pulse&amp;#39;s timing. I am really curious about this: will I be able to capture all rising edge and falling edge using one PPI channel and set GPIOTE&amp;#39;s task to sense toggle?&lt;/p&gt;
&lt;p&gt;And I would like to know how to store the data in. Will you be able to provide me some info on how to do that? I&amp;#39;ve searched anywhere but did not really see how to store the value when it detects transitions.&lt;/p&gt;
&lt;p&gt;I referred &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27132/reading-digital-waveform"&gt;here&lt;/a&gt;, and the example code provided was able to capture the time. I adapted here, but I was able to capture (at most) the periods of 16 data, when I expect 24. I guess it&amp;#39;s GPIOTE, not PPI.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172517?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 13:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d437559-e908-4b46-a932-1cb1d0199785</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Winz"]hmm, I don&amp;#39;t quite get it. (Is the variation expected?)[/quote]
&lt;p&gt;There will be some variation between the input signal and output signal, as the input signal is not synchronized to the 16 MHz peripheral clock, but the output signal is.&lt;/p&gt;
&lt;p&gt;[quote user="Winz"][/quote]&lt;/p&gt;
&lt;p&gt;Are you saying that I let GPIOTE to handle this accidentally? But I remember that GPIOTE is not fast enough to handle it. Therefore, I do not think it is GPIOTE.&lt;/p&gt;
&lt;p&gt;In my case, one pulse (one high and one low) 1.24 us (~ 1240 ns). Is that what you mean?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did not get this. I am sorry, but am still unable to get a proper understanding of the previous question, context and test setup. I suggest you create a new question starting with &lt;em&gt;absolutely all&lt;/em&gt; the information you have in a single post, making it stand alone and not referring to this thread.&amp;nbsp;&lt;/p&gt;
[quote user="Winz"]I also read &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24283/measuring-interrupt-interval-with-app_timer"&gt;another&lt;/a&gt; question that (I think) is achieving the similar thing. If I am asking PPI to transfer the data to a timer, will I need to make 2 timers that does:&lt;br /&gt;1. one records high (HT) and one waits for low (LT)&lt;br /&gt;2. once a transition to low is sensed, PPI calls LT. LT stops and captures HT&amp;#39;s duration and save it&lt;br /&gt;3. once a transition to high is sensed, PPI calls HT. HT stops and captures LT&amp;#39;s duration and save it[/quote]
&lt;p&gt;Yes, your points about what you want to achieve are sensible. You need to calculate the pulse durations by hooking up the GPIOTE input to a timer so that you start the timer on one event and capture it on another (or capture bot start and stop in different CC registers, depending on what suits you best).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172497?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 12:10:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28bf6711-34b7-4180-b35e-1a9c09a0cbb2</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;hmm, I don&amp;#39;t quite get it. (Is the variation expected?)&lt;/p&gt;
&lt;p&gt;Are you saying that I let GPIOTE to handle this accidentally? But I remember that GPIOTE is not fast enough to handle it. Therefore, I do not think it is GPIOTE.&lt;/p&gt;
&lt;p&gt;In my case, one pulse (one high and one low) 1.24 us (~ 1240 ns). Is that what you mean?&lt;/p&gt;
&lt;p&gt;I also read &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24283/measuring-interrupt-interval-with-app_timer"&gt;another&lt;/a&gt; question that (I think) is achieving the similar thing. If I am asking PPI to transfer the data to a timer, will I need to make 2 timers that does:&lt;br /&gt;1. one records high (HT) and one waits for low (LT)&lt;br /&gt;2. once a transition to low is sensed, PPI calls LT. LT stops and captures HT&amp;#39;s duration and save it&lt;br /&gt;3. once a transition to high is sensed, PPI calls HT. HT stops and captures LT&amp;#39;s duration and save it&lt;/p&gt;
&lt;p&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172471?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 09:59:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:445c5088-c732-4963-8c8c-b29185dcafff</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see. If these are worst case numbers, then that is not unexpected. The 16 MHz peripheral clock means that you will have some variation on the GPIOTE sampling of the input signal. If you are looking at a pulse with two tranzitions, that means&amp;nbsp; up to two&amp;nbsp;16 MHz periods,&amp;nbsp; 62.5 ns * 2 = 125 ns.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172462?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 09:34:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fb990e1-dcbc-4bce-8692-f9b5a8f2b86d</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Yes. PPI works. Otherwise, I am experiencing some inaccuracy. According to my 100 MHz Logic Analyzer, the HIGH signal was sent, from the end of a WS2812 or from nRF52DK&amp;#39;s Pin 11, for +350 ns.&lt;/p&gt;
&lt;p&gt;Otherwise, after being captured by the same nRF52DK&amp;#39;s Pin 13, and being copied (by triggering) to Pin 17, the HIGH signal was sent only for +240 ns.&lt;/p&gt;
&lt;p&gt;The same thing happened on LOW signal: sent: +900 ns, copied: +1.01 us.&lt;/p&gt;
&lt;p&gt;I think a table will describe it better:&lt;/p&gt;
&lt;table width="351"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="74"&gt;Something&lt;/td&gt;
&lt;td width="64"&gt;Type&lt;/td&gt;
&lt;td width="104"&gt;Acutal Duration&lt;/td&gt;
&lt;td width="109"&gt;Copied Duration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test 1&lt;/td&gt;
&lt;td&gt;HIGH&lt;/td&gt;
&lt;td&gt;350 ns&lt;/td&gt;
&lt;td&gt;240 ns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test 2&lt;/td&gt;
&lt;td&gt;HIGH&lt;/td&gt;
&lt;td&gt;340 ns&lt;/td&gt;
&lt;td&gt;230 ns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test 3&lt;/td&gt;
&lt;td&gt;LOW&amp;nbsp;&lt;/td&gt;
&lt;td&gt;890 ns&lt;/td&gt;
&lt;td&gt;1000 ns (1us)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test 4&lt;/td&gt;
&lt;td&gt;LOW&amp;nbsp;&lt;/td&gt;
&lt;td&gt;270 ns&lt;/td&gt;
&lt;td&gt;130 ns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test 5&lt;/td&gt;
&lt;td&gt;HIGH&lt;/td&gt;
&lt;td&gt;960 ns&lt;/td&gt;
&lt;td&gt;980 ns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test 6&lt;/td&gt;
&lt;td&gt;LOW&amp;nbsp;&lt;/td&gt;
&lt;td&gt;900 ns&lt;/td&gt;
&lt;td&gt;1.01 us&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test 7&lt;/td&gt;
&lt;td&gt;HIGH&lt;/td&gt;
&lt;td&gt;350 ns&lt;/td&gt;
&lt;td&gt;240 ns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test 8&lt;/td&gt;
&lt;td&gt;LOW&amp;nbsp;&lt;/td&gt;
&lt;td&gt;890 ns&lt;/td&gt;
&lt;td&gt;1000 ns (1us)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;I hope this thing is visible&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172447?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 08:42:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55271ff5-b305-4b08-9a58-112c295aaea9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;OK, so we agree that PPI works as expected. Then we can move on. What is actually the problem now? I have&amp;nbsp;lost track of this thread...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172443?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 08:36:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cfc7e7c-9dab-43ee-8eba-662d957ddb09</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Oh, my bad.&lt;/p&gt;
&lt;p&gt;I tried shorting pin 11 and pin 13 (which are the pin used to drive the LED and the pin used to receive leftover data). I am able to see that the PPI was working. Otherwise, still: the same delay.&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Cap8_2D00_no-led.zip"&gt;devzone.nordicsemi.com/.../Cap8_2D00_no-led.zip&lt;/a&gt; *Updated file*&lt;/p&gt;
&lt;p&gt;The output of PPI was inverted. Probably since I did not set it somewhere. But I don&amp;#39;t think it&amp;#39;s a problem now&lt;/p&gt;
&lt;p&gt;*edit*: This version is not inverted anymore. I&amp;#39;ve fixed it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172435?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 08:11:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ff16587-0dd0-4eaa-a62e-2ec6b0f8bc9b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I do not have a&amp;nbsp;WS2812B to test with. My point was that we need to skip that to look at the PPI behaviour and &lt;em&gt;only&lt;/em&gt;&amp;nbsp;use the DK. Then I think you will find that PPI works as expected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172418?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 05:53:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef24ce7b-d135-4b12-9248-3e6073457df4</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Okay, here is the full source code: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pin_5F00_change_5F00_int.zip"&gt;devzone.nordicsemi.com/.../pin_5F00_change_5F00_int.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note on the code:&lt;/p&gt;
&lt;p&gt;1. I use &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/43370/nrf_log_info-and-printf-does-not-work/169558#169558"&gt;UART&lt;/a&gt; for some communication and controls. I use PuTTY, but I believe other apps will work. The configuration is set like other examples:&lt;br /&gt;- Speed: 115200&lt;br /&gt;- Data bits: 8&lt;br /&gt;- Stop bits: 1&lt;br /&gt;- Parity: None&lt;br /&gt;- Flow control: XON / XOFF&lt;br /&gt;Commands available through serials:&lt;br /&gt;- Press the number &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;3&amp;quot; (normal keys and keypad) and followed by [ENTER] or [SPACE] to send data to turn on the LED to some color. 1 = sapphire? 2 = lime? 3 = magenta?&lt;br /&gt;- &amp;quot;4&amp;quot; will call the count_get() function. This function is connected to a TIMER. I&amp;#39;d like to use this TIMER to capture the duration. (Spoiler: I&amp;#39;ll have some questions about this later).&lt;/p&gt;
&lt;p&gt;2. The definition &amp;quot;MAX_LED&amp;quot; defines the number of LEDs connected. I connected 1 and would like to have 1 extra data for the analysis, so I wrote 2. If you got a strip of N LEDs, please change it to N+L to receive L data on the output of last LED bit.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And here&amp;#39;s the latest plot I captured, when I was typing this: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Cap7.zip"&gt;devzone.nordicsemi.com/.../Cap7.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;No extra external hardware needed. Only a logic converter and the WS2812B. I am currently using only 1 DK&lt;/p&gt;
&lt;p&gt;(I hope I did not miss any other description)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172234?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 08:21:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0864d8ab-73f4-4f12-a0bc-e092e4486eda</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Please ignore my last comment about the question (it was referring to a old question, my bad).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172233?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 08:10:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a5eda47-56ff-4d2c-a594-6e53357a99c4</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Sorry, which question?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172231?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 08:09:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5a0361f-11c9-40f8-ba8b-74c3f588eed8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I did not understand this question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172230?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 08:08:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf121970-84d5-4bc9-a127-fe050d02a22d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I am still having problems here. None of the signals relationship match what I would expect with the code snippet, though I have had to guess which of the three signals in the plot match the two signals in your code (PIN_IN and PIN_OUT). Can you upload the &lt;em&gt;full&lt;/em&gt; source code use in this test, full plot, and &lt;em&gt;full&lt;/em&gt; description in a single post so that all is of are from the &lt;em&gt;same&lt;/em&gt; test and I know they make sense together? Also, if you can make the example code run on a DK without any external HW that would be great, as that would allow me to test on my side as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/172022?ContentTypeID=1</link><pubDate>Wed, 20 Feb 2019 07:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99bacec8-5351-4885-bff7-d5bd43478b0c</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Okay,&lt;/p&gt;
&lt;p&gt;Pin 13 has the signal that controls Pin 17 through PPI.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the plot:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/cap6.png" /&gt;&lt;/p&gt;
&lt;p&gt;It may be observed better by opening this capture file inside this archive:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Cap6.zip"&gt;devzone.nordicsemi.com/.../Cap6.zip&lt;/a&gt; with its app, &lt;a href="https://www.dreamsourcelab.com/download/"&gt;DSView.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I believe that to set this up, we&amp;#39;ll need to enable the event through setting it as a GPIOTE object. therefore,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Init the GPIOTE
static void gpio_init(void) {
	ret_code_t err_code;

	err_code = nrf_drv_gpiote_init();
	APP_ERROR_CHECK(err_code);

	nrf_drv_gpiote_out_config_t out_config = GPIOTE_CONFIG_OUT_TASK_TOGGLE(false);

	err_code = nrf_drv_gpiote_out_init(PIN_OUT, &amp;amp;out_config);
	APP_ERROR_CHECK(err_code);

	nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
	//nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
	in_config.pull = NRF_GPIO_PIN_PULLUP;
	
	err_code = nrf_drv_gpiote_in_init(PIN_IN, &amp;amp;in_config, in_pin_handler);
	//err_code = nrf_drv_gpiote_in_init(PIN_IN, &amp;amp;in_config, null_handler);
    APP_ERROR_CHECK(err_code);

    nrf_drv_gpiote_in_event_enable(PIN_IN, true);
	nrf_drv_gpiote_out_task_enable(PIN_OUT);
}

// Init PPI
static nrf_ppi_channel_t m_ppi_channel1;
static void ppi_init(void) {
    uint32_t err_code = NRF_SUCCESS;
	err_code = nrf_drv_ppi_init();
	APP_ERROR_CHECK(err_code);
    // Configure 1st available PPI channel to stop TIMER0 counter on TIMER1 COMPARE[0] match,
    // which is every even number of seconds.
	
    err_code = nrf_drv_ppi_channel_alloc(&amp;amp;m_ppi_channel1);
    APP_ERROR_CHECK(err_code);
	//ppi_enable_channel(FC_PPI_CH, &amp;amp;NRF_GPIOTE-&amp;gt;EVENTS_IN[FC_GPIOTE_CH], &amp;amp;FC_TIMER-&amp;gt;TASKS_COUNT);
    err_code = nrf_drv_ppi_channel_assign(m_ppi_channel1, \
										  nrf_drv_gpiote_in_event_addr_get(PIN_IN), \
										  nrf_drv_gpiote_out_task_addr_get(PIN_OUT));
										  
	//err_code = nrf_drv_ppi_channel_assign(m_ppi_channel1, \
										  nrf_drv_gpiote_in_event_addr_get(PIN_IN), \
										  (uint32_t)&amp;amp;(NRF_TIMER1-&amp;gt;TASKS_COUNT));
    APP_ERROR_CHECK(err_code);

    // Enable both configured PPI channels
    err_code = nrf_drv_ppi_channel_enable(m_ppi_channel1);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and then called them on main:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main() {
    gpio_init();
    ppi_init();
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/171866?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 11:49:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52b9368f-988d-4c92-a190-b16c8f13b9bc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Perfect. Now I guess we just need to look at two pins to see if there is any unexpected delay in PPI. Which input pin has the signal that controls which output pin via PPI? Can you upload a plot that shows those two signals and the code snippet that produces it? (Having all information in the same post would be beneficial, so that we know what there has not been any relevant changes in between possibly making the information inconsistent.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/171802?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 07:48:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:831b8c06-16e3-4df1-b583-e0bdc7e859ea</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Oh, okay,&lt;/p&gt;
&lt;p&gt;here is my current setup. hope it&amp;#39;s more visible now&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7142.setup2.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/171609?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 11:50:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0abab78-1a6b-4d96-8733-1c9a3122cd15</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry about that. It was supposed to link back to one older post in this thread, but it is not important. The point is that I am 99% certain that you have hooked up something in a different way than what it seems, as PPI cannot behave as you describe. However, I am not able to understand how it is hooked up, as I do not get it to match. Perhaps you can try to do the same think using only a single DK (with external wires connecting different GPIO pins)? Then if you can reproduce in that setting, perhaps you can upload here so I can test on my side as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/171542?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 07:12:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff4afd01-cf2d-4f4e-b142-b9e30683f1a8</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Umm sorry, the link did not lead me anywhere..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/171065?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 09:47:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f09dadb1-c39d-4aec-b18a-38b33102e1de</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I have literally never heard of any problems similar to what you suggest, so we need to look at how you have hooked up the signals and what you are doing. Unfortunately, it is still unclear to me what exactly I am looking at. Can you explain &lt;em&gt;in full detail&lt;/em&gt; what each signals are (the description in &lt;a href="https://devzone.nordicsemi.com/support-private/support/220152#permalink=432369"&gt;this post&lt;/a&gt; might make sense to you who knows this already, but it does not tell me enough to fully understand the test setup). How are the connected in HW and how are they handled internally in the nRF. Please note that the more signals to look at the more difficult to get an overview, so a simple plot showing just the signals you mean is related with a detailed description would be useful here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/171040?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 08:53:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0f32e1e-d050-49f3-b2ce-02e212f1419f</guid><dc:creator>Winz</dc:creator><description>[quote userid="7377" url="~/f/nordic-q-a/41966/reading-ws2812b-leftover-data-through-i2s/171023"]Generally, PPI behaves as I explained, and that is deterministic. Of course, there can be some jitter depending on the input signal relative to the internal 16 MHz peripheral clock, but that is all. Any other noise must be caused by something else.[/quote]
&lt;p&gt;I agree with this. Otherwise, I believe PPI should not behave like what I experience, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/171039?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 08:51:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33a3c560-4064-4c5e-8712-3e713d038097</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7115.cap4.png" /&gt;&lt;/p&gt;
&lt;p&gt;Full capture from above&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/171037?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 08:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb2f4e4f-009a-494d-ace4-cbbc6eb0385f</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5344.cap5.png" /&gt;&lt;/p&gt;
&lt;p&gt;Okay, Here&amp;#39;s the improved capture. The 4 lines above are the decoded version of the 4 lines below. The color on the left represents their connection (brown with brown, purple with purple).&lt;/p&gt;
&lt;p&gt;Please note on the lower right part, below Cursor Distance. Those are the time sampled.&lt;/p&gt;
&lt;p&gt;1-2 belongs to the original data, LED Out&lt;/p&gt;
&lt;p&gt;3-4 belongs to the Self PPI out&lt;/p&gt;
&lt;p&gt;5-6 belongs to the Other PPI Out&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/171023?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 07:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99a63349-bac5-40b7-9956-e8ee85e7115e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Perfect. But now I am having trouble understand in what I am looking at. Can you explain in detail which signal in this plot is supposed to follow which, how they are connected etc.? It is difficult to see the timing etc. from the plot.&lt;/p&gt;
&lt;p&gt;Generally, PPI behaves as I explained, and that is deterministic. Of course, there can be some jitter depending on the input signal relative to the internal 16 MHz peripheral clock, but that is all. Any other noise must be caused by something else.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading WS2812b leftover data through I2S</title><link>https://devzone.nordicsemi.com/thread/170859?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 12:05:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3662796-e0e8-49c4-966c-f0efe8c33eda</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Alright, I found one which is able to do 100 MHz. Otherwise, I do not want to believe this.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the capture:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4555.cap3.png" /&gt;&lt;/p&gt;
&lt;p&gt;The order is the same with the previous logic analyzer capture.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>