<?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>PWM drive: how to generate PWM signals that are phase shifted 90 degree</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43597/pwm-drive-how-to-generate-pwm-signals-that-are-phase-shifted-90-degree</link><description>Hi 
 
 I want to generate two PWM signals that are phase shifted with 90 degree, with similar duty cycle. I have the following pwm configuration, but I don&amp;#39;t know how to proceed further. I would be more than happy if someone could give me some help. I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Feb 2019 14:38:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43597/pwm-drive-how-to-generate-pwm-signals-that-are-phase-shifted-90-degree" /><item><title>RE: PWM drive: how to generate PWM signals that are phase shifted 90 degree</title><link>https://devzone.nordicsemi.com/thread/171430?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 14:38:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6172d495-6151-4cdd-aa62-6163530963af</guid><dc:creator>t_m</dc:creator><description>&lt;p&gt;That is right!&lt;/p&gt;
&lt;p&gt;Thank you Hakon.&lt;/p&gt;
&lt;p&gt;But I still want to understand how to set my duty cycle correctly for any other value than the usual 25%, 50%, 75%..etc. If I understood it correctly, the 0x8000 HEX value is the max. value of the CCR register (2^15).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM drive: how to generate PWM signals that are phase shifted 90 degree</title><link>https://devzone.nordicsemi.com/thread/171393?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 13:02:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64c51c0d-57d4-45f8-a97c-f395a361730f</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static nrf_pwm_values_individual_t /*const*/ seq_values[] =
{
    { 0x8000, 0x8000, 0x8000,      0 },
    { 0x8000, 0x8000,      0, 0x8000 },
    { 0x8000,      0, 0x8000, 0x8000 },
    {      0, 0x8000, 0x8000, 0x8000 }
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;With this matrix, all the channels will be phase shifted 90 degrees to each other and have 25 % duty cycle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM drive: how to generate PWM signals that are phase shifted 90 degree</title><link>https://devzone.nordicsemi.com/thread/171364?ContentTypeID=1</link><pubDate>Fri, 15 Feb 2019 12:13:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68a4d011-649c-4301-a810-869067ef365a</guid><dc:creator>t_m</dc:creator><description>&lt;p&gt;Hi Thanks...&lt;/p&gt;
&lt;p&gt;I just checked that using the oscilloscope and they look 90 degree shifted. But, I just realized that I am not getting a 25% duty cycle that I desired. I tried to put the following in the seq_values[]:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; static nrf_pwm_values_individual_t /*const*/ seq_values[] =
    {
        { 0x2000,      0,      0,      0 },
        {      0, 0x2000,      0,      0 },
        {      0,      0, 0x2000,      0 },
        {      0,      0,      0, 0x2000 }
    };&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM drive: how to generate PWM signals that are phase shifted 90 degree</title><link>https://devzone.nordicsemi.com/thread/171149?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 13:22:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e23ecb71-052a-4667-83dc-761608e3b3a1</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello, you should look at the pwm driver example. In the demo5 function there are four channels that are shifted 90 degrees to each other. This can be seen in the seq_values[] matrix.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>