<?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>nRF52 PWM / Stepper Motor</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92627/nrf52-pwm-stepper-motor</link><description>The article has most of what I need. The unfortunate thing is that the solution is written for a version of the SDK that I do not know. I am new to the nRF52* platform, and have come up to speed with using nRFConnect V2.1.0 with VSCode. The solution does</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Nov 2022 15:50:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92627/nrf52-pwm-stepper-motor" /><item><title>RE: nRF52 PWM / Stepper Motor</title><link>https://devzone.nordicsemi.com/thread/393732?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2022 15:50:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0fa1688-7eb0-45de-8871-bc10ab8c2ff7</guid><dc:creator>msedlak</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did&amp;nbsp;anybody try to use a single PWM (eg. PWM0), and use multiple channels to control multiple PWM outputs?&lt;br /&gt;&lt;br /&gt;I couldn&amp;#39;t any relevant answer on how to setup the pinctrl. They always specify pinctrl-0, which is used for the PWM output, but they never expect to use another channel for the same PWM.&lt;br /&gt;&lt;br /&gt;The question is &amp;quot;simple&amp;quot; - how to write pinctr, for a single PWM, using multiple channels?&lt;br /&gt;&lt;br /&gt;Thanks.&lt;/p&gt;
&lt;div id="WidgetFloaterPanels" class="LTRStyle" style="direction:ltr;display:none;text-align:left;"&gt;
&lt;div id="WidgetFloater" style="display:none;"&gt;
&lt;div id="WidgetLogoPanel"&gt;&lt;span id="WidgetTranslateWithSpan"&gt;&lt;span&gt;TRANSLATE with &lt;/span&gt;&lt;/span&gt; &lt;span id="WidgetCloseButton" title="Exit Translation"&gt;x&lt;/span&gt;&lt;/div&gt;
&lt;div id="LanguageMenuPanel"&gt;
&lt;div class="DDStyle_outer"&gt;&lt;span id="__LanguageMenu_header" class="DDStyle"&gt;English&lt;/span&gt;
&lt;div style="left:0;position:relative;text-align:left;"&gt;
&lt;div style="position:absolute;"&gt;
&lt;div id="__LanguageMenu_popup" class="DDStyle" style="display:none;"&gt;
&lt;table id="LanguageMenu" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#ar"&gt;Arabic&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#he"&gt;Hebrew&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#pl"&gt;Polish&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#bg"&gt;Bulgarian&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#hi"&gt;Hindi&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#pt"&gt;Portuguese&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#ca"&gt;Catalan&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#mww"&gt;Hmong Daw&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#ro"&gt;Romanian&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#zh-CHS"&gt;Chinese Simplified&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#hu"&gt;Hungarian&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#ru"&gt;Russian&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#zh-CHT"&gt;Chinese Traditional&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#id"&gt;Indonesian&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#sk"&gt;Slovak&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#cs"&gt;Czech&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#it"&gt;Italian&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#sl"&gt;Slovenian&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#da"&gt;Danish&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#ja"&gt;Japanese&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#es"&gt;Spanish&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#nl"&gt;Dutch&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#tlh"&gt;Klingon&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#sv"&gt;Swedish&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#en"&gt;English&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#ko"&gt;Korean&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#th"&gt;Thai&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#et"&gt;Estonian&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#lv"&gt;Latvian&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#tr"&gt;Turkish&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#fi"&gt;Finnish&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#lt"&gt;Lithuanian&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#uk"&gt;Ukrainian&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#fr"&gt;French&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#ms"&gt;Malay&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#ur"&gt;Urdu&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#de"&gt;German&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#mt"&gt;Maltese&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#vi"&gt;Vietnamese&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#el"&gt;Greek&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#no"&gt;Norwegian&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#cy"&gt;Welsh&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="#ht"&gt;Haitian Creole&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="#fa"&gt;Persian&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="CTFLinksPanel"&gt;&lt;span id="ExternalLinksPanel"&gt;&lt;a id="HelpLink" title="Help" href="https://go.microsoft.com/?linkid=9722454" rel="noopener noreferrer" target="_blank"&gt; &lt;/a&gt; &lt;a id="EmbedLink" title="Get this widget for your own site"&gt;&lt;/a&gt;  &lt;a id="ShareLink" title="Share translated page with friends"&gt;&lt;/a&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div id="FloaterProgressBar"&gt;&lt;span id="ProgressFill"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div id="WidgetFloaterCollapsed" style="display:none;"&gt;&lt;span&gt;TRANSLATE with &lt;/span&gt;&lt;/div&gt;
&lt;div id="FloaterSharePanel" style="display:none;"&gt;
&lt;div id="ShareTextDiv"&gt;&lt;span id="ShareTextSpan"&gt; COPY THE URL BELOW &lt;/span&gt;&lt;/div&gt;
&lt;div id="ShareTextboxDiv"&gt;&lt;!--a id="TwitterLink" title="Share on Twitter"&gt; &lt;img id="TwitterImg" /&gt;&lt;/a&gt; &lt;a--&gt;  &lt;a id="EmailLink" title="Email this translation"&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div id="ShareFooter"&gt;&lt;span id="ShareHelpSpan"&gt;&lt;a id="ShareHelpLink"&gt;&lt;/a&gt; &lt;/span&gt; &lt;span id="ShareBackSpan"&gt;&lt;a id="ShareBack" title="Back To Translation"&gt;&lt;/a&gt; Back&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div id="FloaterEmbed" style="display:none;"&gt;
&lt;div id="EmbedTextDiv"&gt;&lt;span id="EmbedTextSpan"&gt;EMBED THE SNIPPET BELOW IN YOUR SITE&lt;/span&gt; &lt;a id="EmbedHelpLink" title="Copy this code and place it into your HTML."&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div id="EmbedTextboxDiv"&gt;&lt;/div&gt;
&lt;div id="EmbedNoticeDiv"&gt;&lt;span id="EmbedNoticeSpan"&gt;Enable collaborative features and customize widget: &lt;a href="http://www.bing.com/widget/translator" rel="noopener noreferrer" target="_blank"&gt;Bing Webmaster Portal&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div id="EmbedFooterDiv"&gt;&lt;span id="EmbedBackSpan"&gt;Back&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 PWM / Stepper Motor</title><link>https://devzone.nordicsemi.com/thread/390158?ContentTypeID=1</link><pubDate>Tue, 11 Oct 2022 07:05:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21846207-6126-476d-aa9e-e8ed90866e28</guid><dc:creator>pixelstand</dc:creator><description>&lt;p&gt;I edited the above to use pins P1.03 and P1.04.... these are unused on the nRF52840DK board.&amp;nbsp; Also, my prj.conf file is here:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_STDOUT_CONSOLE=y&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_PRINTK=y&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_PWM=y&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_LOG=y&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_LOG_PRINTK=y&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_LOG_MODE_IMMEDIATE=y&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_PWM_LOG_LEVEL_DBG=y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The key thing being the CONFIG_LOG_MODE_IMMEDIATE=y&lt;/p&gt;
&lt;p&gt;This slows down the processing enough for you to experience the physical device changing speeds with the different PWM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 PWM / Stepper Motor</title><link>https://devzone.nordicsemi.com/thread/389924?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 06:08:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e810a8d-f924-4247-bacd-3a9895c953db</guid><dc:creator>pixelstand</dc:creator><description>&lt;p&gt;Thank you for these;&amp;nbsp; in going through them, and the documentation, I gained a better understanding of the hardware and how it is setup. It also helped setup the overlay needed for the PWM example in this thread.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 PWM / Stepper Motor</title><link>https://devzone.nordicsemi.com/thread/389923?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 05:51:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2c66aa4-166b-41c9-8c31-14202bd60031</guid><dc:creator>pixelstand</dc:creator><description>&lt;p&gt;I misread the spec. I see now that the nRF52840 chip&amp;nbsp;contains&amp;nbsp;Four PWM hardware modules that have 4 PWM outputs with a common frequency per module. I was able to get two motors running, each at a different frequency.&amp;nbsp; &amp;nbsp;It took me a bit of time to get the overlay file setup correctly, as this is still a bit foreign to me.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I modeled the PWM1 and PWM2 after the PWM0/LED setup as described for the nRF52840DK board.&amp;nbsp; So in the end, I now have 3 PWM modules: PWM0 for LEDs, PWM1 for Motor0, PWM2 for Motor1.&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;The source of what I&amp;#39;ve created is below.&amp;nbsp; It only contains the PWM step setup and drive.&amp;nbsp; The question I have now, is....&lt;/p&gt;
&lt;p&gt;should I be modeling the pwmmotors node as a pwm-leds compatible entity?&amp;nbsp; or should it be something else?&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre class="ui-code" data-mode="text"&gt;//nrf52840_nrf52840.overlay

&amp;amp;pwm1 {
    status = &amp;quot;okay&amp;quot;;
    pinctrl-0 = &amp;lt;&amp;amp;pwm1_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;pwm1_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;pwm2 {
    status = &amp;quot;okay&amp;quot;;
    pinctrl-0 = &amp;lt;&amp;amp;pwm2_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;pwm2_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};


&amp;amp;pinctrl {
    pwm1_sleep: pwm1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT0, 1, 3)&amp;gt;;
			low-power-enable;
		};
	};
    pwm1_default: pwm1_default {
        group1 {
            psels = &amp;lt;NRF_PSEL(PWM_OUT0, 1, 3)&amp;gt;;
            nordic,invert;
        };
    };
    pwm2_sleep: pwm2_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT0, 1, 4)&amp;gt;;
			low-power-enable;
		};
	};
    pwm2_default: pwm2_default {
        group1 {
            psels = &amp;lt;NRF_PSEL(PWM_OUT0, 1, 4)&amp;gt;;
            nordic,invert;
        };
    };
};

/ {
    pwmmotors {
        compatible = &amp;quot;pwm-leds&amp;quot;;
        pwm_motor0: pwm_motor_0 {
            pwms = &amp;lt;&amp;amp;pwm1 0 PWM_MSEC(20) PWM_POLARITY_INVERTED&amp;gt;;
        };
        pwm_motor1: pwm_motor_1 {
            pwms = &amp;lt;&amp;amp;pwm2 0 PWM_MSEC(20) PWM_POLARITY_INVERTED&amp;gt;;
        };
    };
    aliases {
        pwm-motor0 = &amp;amp;pwm_motor0;
        pwm-motor1 = &amp;amp;pwm_motor1;
    };
};&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;pre class="ui-code" data-mode="text"&gt;//main.c

#include &amp;lt;zephyr/zephyr.h&amp;gt;
#include &amp;lt;zephyr/sys/printk.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/drivers/pwm.h&amp;gt;

static const struct pwm_dt_spec pwm_led0 = PWM_DT_SPEC_GET(DT_ALIAS(pwm_led0));
static const struct pwm_dt_spec pwm_motor0 = PWM_DT_SPEC_GET(DT_ALIAS(pwm_motor0));
static const struct pwm_dt_spec pwm_motor1 = PWM_DT_SPEC_GET(DT_ALIAS(pwm_motor1));

#define FREQUENCY_MIN (512U)
#define FREQUENCY_MAX (16384U)
#define FREQUENCY_DELTA (512U)

void main(void)
{
	int ret;

	printk(&amp;quot;PWM1-based motor control\n&amp;quot;);

	if (!device_is_ready(pwm_led0.dev)) {
		printk(&amp;quot;Error: PWM0 device %s is not ready\n&amp;quot;,
		       pwm_led0.dev-&amp;gt;name);
		return;
	}
	if (!device_is_ready(pwm_motor0.dev)) {
		printk(&amp;quot;Error: PWM1 device %s is not ready\n&amp;quot;,
		       pwm_motor0.dev-&amp;gt;name);
		return;
	}
	if (!device_is_ready(pwm_motor1.dev)) {
		printk(&amp;quot;Error: PWM2 device %s is not ready\n&amp;quot;,
		       pwm_motor1.dev-&amp;gt;name);
		return;
	}
	while(1) {
		for(int i = FREQUENCY_MIN; i &amp;lt;= FREQUENCY_MAX; i+=FREQUENCY_DELTA) {
			printk(&amp;quot;%i:&amp;quot;,i);
			if (pwm_set_dt(&amp;amp;pwm_motor0, PWM_HZ(i), PWM_HZ(i) / 2U))
				printk(&amp;quot;Error %d: failed to set pulse width\n&amp;quot;, ret);
			
			printk(&amp;quot;%i:&amp;quot;, FREQUENCY_MAX-i+FREQUENCY_MIN);
			if (pwm_set_dt(&amp;amp;pwm_motor1, PWM_HZ(FREQUENCY_MAX-i+FREQUENCY_MIN),
				PWM_HZ(FREQUENCY_MAX-i+FREQUENCY_MIN)/2U))
					printk(&amp;quot;Error %d: failed to set motor0 pulse width\n&amp;quot;, ret);
		}

		for(int i = FREQUENCY_MAX; i &amp;gt;= FREQUENCY_MIN; i-=FREQUENCY_DELTA) {
			printk(&amp;quot;%i:&amp;quot;,i);
			if (pwm_set_dt(&amp;amp;pwm_motor0, PWM_HZ(i), PWM_HZ(i) / 2U))
				printk(&amp;quot;Error %d: failed to set pulse width\n&amp;quot;, ret);

			printk(&amp;quot;%i:&amp;quot;, FREQUENCY_MAX-i+FREQUENCY_MIN);
			if (pwm_set_dt(&amp;amp;pwm_motor1, PWM_HZ(FREQUENCY_MAX-i+FREQUENCY_MIN),
				PWM_HZ(FREQUENCY_MAX-i+FREQUENCY_MIN)/2U))
					printk(&amp;quot;Error %d: failed to set motor0 pulse width\n&amp;quot;, ret);
		}
		
	}
}
&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 PWM / Stepper Motor</title><link>https://devzone.nordicsemi.com/thread/389630?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 12:47:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a90b8dd5-b132-403a-88b0-26a9138ba043</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have a few repositories that may be interesting for you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The bare metal PPI implementation was ported for a side project, and you can find it here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/edvinand/ppi_pwm_hands_on"&gt;https://github.com/edvinand/ppi_pwm_hands_on&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please see the file: &lt;a href="https://github.com/edvinand/ppi_pwm_hands_on/blob/main/src/suggested_solution_main.c"&gt;suggested_solution_main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to go with this approach, and you&amp;nbsp;&lt;strong&gt;need&lt;/strong&gt; different PWM frequencies, I believe you need to use two separate timer instances for this, since this PPI implementation resets the timer counter register when the PWM period is reached.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to use the PWM peripheral, and you want the two PWM signals to have different periods, you would need to use two instances of the PWM. As you can see &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/pwm.html?cp=4_0_0_5_16_4#topic"&gt;here&lt;/a&gt;, the nRF52840 has 4 PWM instances, which can be set with their own countertops (which will give different frequencies).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have not played too much around with the PWM peripheral in NCS, but I suggest that you try to use the nrfx pwm drivers directly in case you want to test this. That gives you better control of the peripherals than if you use the generic Zephyr drivers.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 PWM / Stepper Motor</title><link>https://devzone.nordicsemi.com/thread/389563?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 09:44:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5aa84fe2-4a62-439d-9410-39b8dea56b1c</guid><dc:creator>mrono</dc:creator><description>[quote userid="120222" url="~/f/nordic-q-a/92627/nrf52-pwm-stepper-motor"]According to the&amp;nbsp;nRF52840 spec, the same PWM frequency is shared with all the PWM outputs.[/quote]
&lt;p&gt;All the outputs of a single PWM peripheral share a frequency. But there are several PWM peripherals in the nRF52840. You should be able to use two PWM peripherals independently.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>