<?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>How to change the pwm duty every period in nrf52 connect?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103106/how-to-change-the-pwm-duty-every-period-in-nrf52-connect</link><description>Hi, I want to save the pwm duty values in the array and then set the duty separately for each period by reading the array one by one, is there a way?? 
 thank you</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Aug 2023 13:51:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103106/how-to-change-the-pwm-duty-every-period-in-nrf52-connect" /><item><title>RE: How to change the pwm duty every period in nrf52 connect?</title><link>https://devzone.nordicsemi.com/thread/442998?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2023 13:51:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:315bd306-53d2-4736-b951-765384472475</guid><dc:creator>JILUNGIE</dc:creator><description>&lt;p&gt;Thank you for letting me know!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change the pwm duty every period in nrf52 connect?</title><link>https://devzone.nordicsemi.com/thread/442971?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2023 12:15:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd80925e-997f-4503-8d38-1ecfaa1af1d1</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;Hello - That sample he linked is a Zephyr project. We&amp;#39;re using a very similar approach for our motor and display drivers. NRFX is supported in Zephyr and that&amp;#39;s what you need to use to get the functionality you&amp;#39;re after. However, if you&amp;#39;re looking for a pure native Zephyr API example, then&amp;nbsp;you can take a look at the blinky_pwm example&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/basic/blinky_pwm"&gt;https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/basic/blinky_pwm&lt;/a&gt;. That example shows the limitation of the Zephyr PWM as you can only set the period for all channels at once and not individual channels. The Zephyr PWM driver does use the same NRFX API that&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/jared"&gt;Jared&lt;/a&gt;&amp;nbsp;linked to, you can see the driver code here&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/pwm/pwm_nrfx.c"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/pwm/pwm_nrfx.c&lt;/a&gt;. If you want to set the period for individual channels, then you need to use NRFX directly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change the pwm duty every period in nrf52 connect?</title><link>https://devzone.nordicsemi.com/thread/442953?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2023 11:26:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a3db33a-7180-4120-b677-ba7ba264e658</guid><dc:creator>JILUNGIE</dc:creator><description>&lt;p&gt;Thank you, do you have a sample using zephyr api??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change the pwm duty every period in nrf52 connect?</title><link>https://devzone.nordicsemi.com/thread/442932?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2023 10:23:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de38079c-9d81-4240-8619-ff9155c12a52</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_pwm/common_mode"&gt;Here &lt;/a&gt;is sample that saves duty cycles in an array and then play it as a PWM sequence,&lt;/p&gt;
&lt;p&gt;You can use that sample as a reference,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>