<?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[Topics tagged with i2c scl]]></title><description><![CDATA[A list of topics that have been tagged with i2c scl]]></description><link>http://community.onion.io/tags/i2c scl</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 08:18:55 GMT</lastBuildDate><atom:link href="http://community.onion.io/tags/i2c scl.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 17 Nov 2020 20:00:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[FAQ: What is the default I2C bus clock speed? Can I change it to 400kHz?]]></title><description><![CDATA[<h2>Default Clock Speed: 100kHz</h2>
<p dir="auto">The hardware I2C bus on the Omega2 family has a default clock speed of <strong>100kHz</strong>, the standard clock speed for I2C:</p>
<p dir="auto"><img src="/assets/uploads/files/1605642653199-omega2-i2c-bus-standard-100khz.png" alt="omega2-i2c-bus-standard-100khz.png" class="img-responsive img-markdown" /></p>
<h2>How is the I2C Clock Set?</h2>
<p dir="auto">The clock speed is governed by the clock divider in the I2C <code>SM0CTL0</code> register.</p>
<p dir="auto">The register's default value is <code>0x8190 800F</code>, with <code>0x190</code> set for the clock divider.</p>
<ul>
<li>0x190 = 400</li>
<li>The master clock is 40 MHz</li>
<li>40 MHz / 400 = 100 kHz</li>
</ul>
<h2>Changing to Fast Mode: 400kHz</h2>
<p dir="auto">It is <strong>possible to change the I2C bus clock speed to 400kHz (fast mode)</strong> by writing to the <code>SM0CTL0</code> register using devmem to change the clock divider:</p>
<pre><code>devmem 0x10000940 32 0x8064800F
</code></pre>
<blockquote>
<p dir="auto">This changes the clock divider to <code>0x64</code> (100), 40MHz / 100 = 400 kHz</p>
</blockquote>
<p dir="auto">To optionally confirm, read the register:</p>
<pre><code>devmem 0x10000940
0x8064800F
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1605642861528-omega2-i2c-bus-fast-mode-400khz.png" alt="omega2-i2c-bus-fast-mode-400khz.png" class="img-responsive img-markdown" /></p>
<blockquote>
<p dir="auto">Tested on firmware v0.3.2</p>
</blockquote>
<p dir="auto">Credit goes to <a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/2619">@György-Farkas</a> from <a href="https://community.onion.io/topic/2312/i2c-detect-slave-method/18" rel="nofollow">this post from 2018</a>.</p>
<h2>More Info</h2>
<p dir="auto">Check out the <a href="http://docs.onion.io/omega2-docs/omega2s.html#datasheet" rel="nofollow">MT7688 SoC datasheet</a> to see the full register definition.</p>
]]></description><link>http://community.onion.io/topic/4332/faq-what-is-the-default-i2c-bus-clock-speed-can-i-change-it-to-400khz</link><guid isPermaLink="true">http://community.onion.io/topic/4332/faq-what-is-the-default-i2c-bus-clock-speed-can-i-change-it-to-400khz</guid><dc:creator><![CDATA[Lazar Demin]]></dc:creator><pubDate>Tue, 17 Nov 2020 20:00:34 GMT</pubDate></item></channel></rss>