<?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>Generate PWM frequency smaller than 4Hz.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118197/generate-pwm-frequency-smaller-than-4hz</link><description>Hi everybody, I&amp;#39;m looking to build a PWM generator with 2 outputs from 1-100Hz. Unfurtunately the current PWM API examples with Zephyr works only for 4-100Hz. 
 I&amp;#39;ve tried the sw_pwm but I&amp;#39;m not able to generate the PWM signals for 2 custom outputs. Other</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Jan 2025 15:38:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118197/generate-pwm-frequency-smaller-than-4hz" /><item><title>RE: Generate PWM frequency smaller than 4Hz.</title><link>https://devzone.nordicsemi.com/thread/519832?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2025 15:38:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d6a2497-0c7e-4bc4-af65-c5c04684219f</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The hardware does not support this low frequency.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The zephyr driver unfortunately doesn’t iterate through all possible software PWM nodes in the device tree and just works off of the 0th one.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a title="https://github.com/zephyrproject-rtos/zephyr/blob/e60da1bd640a37370870a83277142dd560f1fb8d/drivers/pwm/pwm_nrf_sw.c#l428" href="https://github.com/zephyrproject-rtos/zephyr/blob/e60da1bd640a37370870a83277142dd560f1fb8d/drivers/pwm/pwm_nrf_sw.c#L428" rel="noopener noreferrer" target="_blank"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/e60da1bd640a37370870a83277142dd560f1fb8d/drivers/pwm/pwm_nrf_sw.c#L428&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate PWM frequency smaller than 4Hz.</title><link>https://devzone.nordicsemi.com/thread/519379?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2025 16:50:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf925709-778d-4df7-80b6-91af5005232f</guid><dc:creator>SnaiderBG</dc:creator><description>&lt;p&gt;With the sw_pwm, we are having issues mainly with the device tree, it works for the predefined node pwm_led0 but when we try to use another it doesn&amp;#39;t work. In the case we use the nrfx_pwm what considerations should we have, with the device tree and configurations. Can we still use other pwms with the zephyr pwm API?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generate PWM frequency smaller than 4Hz.</title><link>https://devzone.nordicsemi.com/thread/519273?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2025 11:56:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e18dd5a5-58ff-4775-b4c1-512d203d57b8</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Have not tried this myself with sw_pwm, but what is the the error you are getting if you try to do this for 2 custom outputs? I am assuming that you have it working to get 1 Hz for 1 custom output?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Maybe use of nrfx_pwm API can be give you more control on configurations of what prescalar you want to put for timing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>