<?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>Possible to create PWM phase delay</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48884/possible-to-create-pwm-phase-delay</link><description>Hi, guys. I&amp;#39;m using the PCA10056 and the SDK 15.3&amp;#39;s BLE UART peripheral example. I&amp;#39;m working on a PWM controller using the mobile app. 
 
 I need to create a delayed PWM signal, just like the above picture. A pair (PWM 0, PWM 1 for instance) has the same</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 04 Apr 2020 07:21:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48884/possible-to-create-pwm-phase-delay" /><item><title>RE: Possible to create PWM phase delay</title><link>https://devzone.nordicsemi.com/thread/243473?ContentTypeID=1</link><pubDate>Sat, 04 Apr 2020 07:21:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12354eb3-72bf-4caf-b976-b13ed688bf9d</guid><dc:creator>Matthew K</dc:creator><description>&lt;p&gt;Apologize for my late response; due to the recent pandemic, I left my gadgets outside :/ I&amp;#39;ll try to share this someday.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to create PWM phase delay</title><link>https://devzone.nordicsemi.com/thread/237716?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 12:24:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8158f5e-e0c0-4cd9-9187-a9a0de1b62f7</guid><dc:creator>samuel.zetterlund</dc:creator><description>&lt;p&gt;Hi Matthew. I have the exact same problem. I need to trigger output with the same frequency on three channels in direct sequence. Could you please share some code snippets explaining how you set this up?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Samuel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to create PWM phase delay</title><link>https://devzone.nordicsemi.com/thread/195180?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 13:51:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce938b38-0af4-4923-9ee5-d5d89c9ab987</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;See the&amp;nbsp;&lt;a title="PPI Example" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ppi_example.html?cp=5_1_4_6_20"&gt;PPI Example&lt;/a&gt;, it uses 3 TIMERs.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Again, you can connect any EVENT to any TASK, regardless of what peripherals are used.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;f.ex. The SAADC&amp;#39;s&amp;nbsp;&lt;a title="EVENTS_END" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/saadc.html?cp=3_0_0_5_22_8_5#register.EVENTS_END"&gt;EVENTS_END&lt;/a&gt;&amp;nbsp;can be connected to a SPIM&amp;#39;s&amp;nbsp;&lt;a title="TASKS_START" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/spim.html?cp=3_0_0_5_24_5_0#register.TASKS_START"&gt;TASKS_START&lt;/a&gt;. By connecting a TIMER&amp;#39;s&amp;nbsp;&lt;span&gt;EVENTS_COMPARE to the SAADC&amp;#39;s&amp;nbsp;&lt;a title="TASKS_SAMPLE" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/saadc.html?cp=3_0_0_5_22_8_1#register.TASKS_SAMPLE"&gt;TASKS_SAMPLE&lt;/a&gt;, you&amp;#39;ve set up a self-driven ADC sampler that streams data over SPI, all without invoking the CPU.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;That&amp;#39;s the power of PPI and EasyDMA.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to create PWM phase delay</title><link>https://devzone.nordicsemi.com/thread/195001?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 06:32:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6517500-f739-4dca-9d93-bdedb40be818</guid><dc:creator>Matthew K</dc:creator><description>[quote userid="13562" url="~/f/nordic-q-a/48884/possible-to-create-pwm-phase-delay/194245"]When this is set up you correctly the second PWM will start after a predetermined delay, without invoking the CPU.&amp;nbsp;[/quote]
&lt;p&gt;Wonderful! That is what I needed.&lt;/p&gt;
&lt;p&gt;Can I connect the&amp;nbsp; TIMER &amp;mdash; Timer/counter&amp;#39;s compare match event (EVENTS_COMPARE[n]) with the SDK 15&amp;#39;s timer example?&lt;/p&gt;
&lt;p&gt;It would be great if there are examples which I can refer to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Possible to create PWM phase delay</title><link>https://devzone.nordicsemi.com/thread/194245?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2019 08:16:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e745e86-baf7-40cb-9c15-5ac1bce731e3</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;You&amp;#39;ll need to use&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/ppi.html?cp=3_0_0_5_15"&gt;PPI — Programmable peripheral interconnect&lt;/a&gt;&amp;nbsp;and connect a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/timer.html?cp=3_0_0_5_29"&gt;TIMER — Timer/counter&lt;/a&gt;&amp;#39;s compare match event (&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/timer.html?cp=3_0_0_5_29_4_6#register.EVENTS_COMPARE-0-5"&gt;EVENTS_COMPARE[n]&lt;/a&gt;) to the second PWM&amp;#39;s sequence start task (&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/pwm.html?cp=3_0_0_5_16_4_1#register.TASKS_SEQSTART-0-1"&gt;TASKS_SEQSTART[n]&lt;/a&gt;). I also suggest that you connect the compare match event to the TIMER&amp;#39;s stop and clear tasks(&lt;a title="TASKS_CLEAR" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/timer.html?cp=3_0_0_5_29_4_3#register.TASKS_CLEAR"&gt;TASKS_CLEAR&lt;/a&gt;, &lt;a title="TASKS_STOP" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/timer.html?cp=3_0_0_5_29_4_1#register.TASKS_STOP"&gt;TASKS_STOP&lt;/a&gt;) via the&amp;nbsp;&lt;a title="SHORTS" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/timer.html?cp=3_0_0_5_29_4_7#register.SHORTS"&gt;SHORTS&lt;/a&gt;&amp;nbsp;register or appropriate&amp;nbsp;&lt;a title="TIMER" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrf__timer.html?cp=5_1_6_9_0_35"&gt;TIMER&lt;/a&gt;&amp;nbsp;API calls.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can use the first PWM&amp;#39;s sequence started event to trigger the TIMER&amp;#39;s start task (&lt;a title="TASKS_START" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/timer.html?cp=3_0_0_5_29_4_0#register.TASKS_START"&gt;TASKS_START&lt;/a&gt;).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;When this is set up you correctly the second PWM will start after a predetermined delay, without invoking the CPU.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The nRF52840 has four PWM peripherals instances, each&amp;nbsp;instance has four outputs. In your case, you&amp;#39;ve got two sets of PWM frequencies and you will, therefore, need two PWM instances with two outputs each.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can also create additional PWM signals with a TIMER and the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/gpiote.html?cp=3_0_0_5_9"&gt;GPIOTE&lt;/a&gt;&amp;nbsp;peripheral.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>