<?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 on nrf9160 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93403/pwm-on-nrf9160-dk</link><description>Hi, I am currently trying to use PWM on nrf9160 DK to control a stepper motor. Do you have any sample code for PWM? Also do you have the pin assignment of which pin on the DK to use for PWM? Thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Oct 2022 22:01:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93403/pwm-on-nrf9160-dk" /><item><title>RE: PWM on nrf9160 DK</title><link>https://devzone.nordicsemi.com/thread/393343?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 22:01:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be72dd9d-372d-4a99-98f0-03cf18ec409c</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Daniel,&lt;/p&gt;
&lt;p&gt;If using &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-VS-Code"&gt;nRF Connect for VS Code&lt;/a&gt; you can click &amp;quot;New Application&amp;quot; and then &amp;#39;Browse&amp;#39; next to the Application Template. This will for example let you search for &amp;#39;PWM&amp;#39; and you will see relevant samples, both Zephyr and nRF. The documentation is then also easily available so that you would get an idea which one is relevant for your project.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1667249849218v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;For example, check out the &amp;#39;led_pwm&amp;#39; sample. The list above shows a &amp;#39;servo_motor&amp;#39; sample that I have not yet had a closer look at.&lt;/p&gt;
&lt;p&gt;There is also an unofficial &lt;a href="https://github.com/too1/ncs-nrfx-pwm-simple-example"&gt;NRFX PWM Simple Example&lt;/a&gt; that shows &amp;quot;how to use the nrfx_pwm driver to access the NRF_PWM module in a more direct way compared to using the native Zephyr PWM driver&amp;quot;. This example has been tested for nRF Connect SDK v1.8.0 and nRF52840.&lt;/p&gt;
&lt;p&gt;I also found another DevZone case &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/92627/nrf52-pwm-stepper-motor"&gt;nRF52 PWM / Stepper Motor&lt;/a&gt; that looks relevant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>