<?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>Generating 8MHz clock signal using compatible = &amp;quot;pwm-clock&amp;quot; node on Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117039/generating-8mhz-clock-signal-using-compatible-pwm-clock-node-on-zephyr</link><description>Hi guys, 
 I&amp;#39;m working on a project with a custom board around nrf52832 chip and I&amp;#39;m trying to generate an 8MHz clock signal using the compatible &amp;quot;pwm-clock&amp;quot; on Zephyr. 
 I found little information on how to get this working but so far I&amp;#39;ve this on the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Dec 2024 11:35:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117039/generating-8mhz-clock-signal-using-compatible-pwm-clock-node-on-zephyr" /><item><title>RE: Generating 8MHz clock signal using compatible = "pwm-clock" node on Zephyr</title><link>https://devzone.nordicsemi.com/thread/514481?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 11:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f06f8e0-db22-45d0-8c93-22842a81866c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Fernando,&lt;/p&gt;
&lt;p&gt;I was incorrect in my previous reply. You cannot generate an 8 MHz output using the PWM peripheral (the maximum is limted to&amp;nbsp;5.3333 MHz as explaiend in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/66157/what-is-the-maximum-frequency-of-the-pwm-operating-with-the-bel"&gt;this post&lt;/a&gt;). It is possible to generate an 8 MHz putput though, by using a timer and GPIOTE connected via PPI. That can be done as shown in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/79755/nrf5340dk-8hmz-clock-output-to-gpio-pin-example-via-gpiote-ppi-timer/329976"&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating 8MHz clock signal using compatible = "pwm-clock" node on Zephyr</title><link>https://devzone.nordicsemi.com/thread/513863?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 14:39:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab88c35b-a8bd-47f1-9909-76b925949ada</guid><dc:creator>Fernando Fontes</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thank you for the reply.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I don&amp;#39;t have the oscilloscope with me right now but declaring&amp;nbsp;&lt;span&gt;tdc_clk_in as&amp;nbsp;compatible&amp;nbsp;=&amp;nbsp;&amp;quot;pwm-clock&amp;quot; only allows me to reach frequencies up to 1MHz.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve used the function&amp;nbsp;&lt;span class="line"&gt;pwm_set_dt(&amp;amp;tdc_clk_in,PWM_HZ(1000000),PWM_HZ(1000000) / 2); and it worked. However with&amp;nbsp;pwm_set_dt(&amp;amp;tdc_clk_in,PWM_HZ(8000000),PWM_HZ(8000000) / 2); it does not.&lt;br /&gt;&lt;br /&gt;In the&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/build/dts/api/bindings/clock/pwm-clock.html"&gt;Zephyr pwm-clock&lt;/a&gt;&amp;nbsp;documentation they mention a 1MHz internal clock signal, not sure if that is the maximum that I can reach. They also mention that I might need to change&amp;nbsp;prescaler options for different settings.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="line"&gt;Thanks in advance,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="line"&gt;Fernando&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generating 8MHz clock signal using compatible = "pwm-clock" node on Zephyr</title><link>https://devzone.nordicsemi.com/thread/513859?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 14:30:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c434fbe-7dcc-4926-9fc6-3c49fe556eef</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There should not be any problems using 8 MHz PWM. How are you measuring the output signal? Can you share the plot? Using the PWM is also covered in a DevAcademy course, &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-4-pulse-width-modulation-pwm/topic/exercise-1-12/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>