<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Tool to access hardware PWM]]></title><description><![CDATA[<p dir="auto">Just created tool to access hawdware PWM on Omega2: <a href="https://github.com/ClusterM/omega2-pwm" rel="nofollow">https://github.com/ClusterM/omega2-pwm</a></p>
<p dir="auto">For some reason Omega2 has not any util to control hardware PWM. There is only fast-gpio tool, it uses software PWM which is awful for sound generation.</p>
<p dir="auto"><strong>Usage</strong></p>
<p dir="auto">Channel #0 is pin #18, channel #1 is pin #19. Channels #2 and #3 are available on Omega2S only (UART2 pins).</p>
<p dir="auto">Before usage you must set GPIO muxing using omega2-ctrl tool:</p>
<pre><code>omega2-ctrl gpiomux set pwm0 pwm
</code></pre>
<p dir="auto">or</p>
<pre><code>omega2-ctrl gpiomux set pwm1 pwm
</code></pre>
<p dir="auto">Then use this tool:</p>
<pre><code>pwm &lt;channel&gt; &lt;frequency&gt; [duty]
</code></pre>
<p dir="auto">Example to generate 3000Hz on channel #1 with 50% duty:</p>
<pre><code>pwm 1 3000 50</code></pre>
]]></description><link>http://community.onion.io/topic/2229/tool-to-access-hardware-pwm</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 11:04:48 GMT</lastBuildDate><atom:link href="http://community.onion.io/topic/2229.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 Jul 2017 23:08:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Tool to access hardware PWM on Fri, 21 Jul 2017 23:11:57 GMT]]></title><description><![CDATA[<p dir="auto">Just created tool to access hawdware PWM on Omega2: <a href="https://github.com/ClusterM/omega2-pwm" rel="nofollow">https://github.com/ClusterM/omega2-pwm</a></p>
<p dir="auto">For some reason Omega2 has not any util to control hardware PWM. There is only fast-gpio tool, it uses software PWM which is awful for sound generation.</p>
<p dir="auto"><strong>Usage</strong></p>
<p dir="auto">Channel #0 is pin #18, channel #1 is pin #19. Channels #2 and #3 are available on Omega2S only (UART2 pins).</p>
<p dir="auto">Before usage you must set GPIO muxing using omega2-ctrl tool:</p>
<pre><code>omega2-ctrl gpiomux set pwm0 pwm
</code></pre>
<p dir="auto">or</p>
<pre><code>omega2-ctrl gpiomux set pwm1 pwm
</code></pre>
<p dir="auto">Then use this tool:</p>
<pre><code>pwm &lt;channel&gt; &lt;frequency&gt; [duty]
</code></pre>
<p dir="auto">Example to generate 3000Hz on channel #1 with 50% duty:</p>
<pre><code>pwm 1 3000 50</code></pre>
]]></description><link>http://community.onion.io/post/13842</link><guid isPermaLink="true">http://community.onion.io/post/13842</guid><dc:creator><![CDATA[Alexey Avdyukhin]]></dc:creator><pubDate>Fri, 21 Jul 2017 23:11:57 GMT</pubDate></item></channel></rss>