<?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>Need to change I2C bus speed to 50KHz</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113432/need-to-change-i2c-bus-speed-to-50khz</link><description>Hi Folks, I’m working with an I2C LCD rated for up to 50KHz and it is showing a fair number of glitches. Can anyone tell me how to lower the I2C speed from the default values, which I understand to be 100KHz, minimum? The platform is the nRF Feather,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 Jul 2024 19:47:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113432/need-to-change-i2c-bus-speed-to-50khz" /><item><title>RE: Need to change I2C bus speed to 50KHz</title><link>https://devzone.nordicsemi.com/thread/496478?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 19:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fddb845-f81e-49f9-bd18-ca3d93ca556c</guid><dc:creator>JFC</dc:creator><description>&lt;p&gt;Got it - thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to change I2C bus speed to 50KHz</title><link>https://devzone.nordicsemi.com/thread/496116?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2024 05:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70b4ebd6-5c2f-4aef-bd6a-4b787da912d9</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Look for i2c_bitbang and i2c_gpio in the driver sources.Needs to be configured via devicetree as &amp;quot;gpio-i2c&amp;quot;.&lt;/p&gt;
&lt;p&gt;I only see an example for spi bitbang in the samples.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to change I2C bus speed to 50KHz</title><link>https://devzone.nordicsemi.com/thread/496083?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 19:02:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79d5c377-1e19-4341-988b-3fa376a725fb</guid><dc:creator>JFC</dc:creator><description>&lt;p&gt;Thanks for the suggestion, Turbo J.&amp;nbsp; I didn&amp;#39;t find the software-only driver. If you can share a pointer to it, I&amp;#39;ll look it over. A supported option would be nice to have.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Jim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to change I2C bus speed to 50KHz</title><link>https://devzone.nordicsemi.com/thread/496082?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 19:01:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1e6a9c0-11d4-4f4b-acc8-e1f69c4cd04a</guid><dc:creator>JFC</dc:creator><description>&lt;p&gt;Thanks for those helpful tips. I reverted the hack and added the code and the display is stable. Very helpful. I also sent a note to the manufacturer asking why the device was limited to 50KHz.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks again for your quick help.&lt;/p&gt;
&lt;p&gt;Jim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to change I2C bus speed to 50KHz</title><link>https://devzone.nordicsemi.com/thread/496039?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 14:07:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eceb3e96-f595-404c-91fe-9af78991fc43</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;After i2c_configure(), try adding this line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_TWIM1-&amp;gt;FREQUENCY = 0x00C80000;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You will have to change the TWIM instance number if you are using a different instance (e.g. NRF_TWIM2 for instance 2).&lt;/p&gt;
[quote user="JFC"]On a side note, why not make sub-100K frequencies available via the SDK? Can that be a feature request?[/quote]
&lt;p&gt;The chip HW have not been designed to support other frequencies and they are not tested/verified. Most I2C devices supports 100kHz or above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to change I2C bus speed to 50KHz</title><link>https://devzone.nordicsemi.com/thread/495869?ContentTypeID=1</link><pubDate>Sat, 27 Jul 2024 06:03:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6e98641-6f5d-43d3-96cf-fea641ab8d39</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Zephyr (nRF connect SDK) ships a software I&amp;sup2;C driver that only requires two GPIO ports, try using that when you need to run this slow.&lt;/p&gt;
&lt;p&gt;IIRC it does not support clock stretching out-of-the-box.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to change I2C bus speed to 50KHz</title><link>https://devzone.nordicsemi.com/thread/495863?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2024 20:58:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8df591e-4e38-4315-b740-6eb9d0cc9b35</guid><dc:creator>JFC</dc:creator><description>&lt;p&gt;Thanks &lt;span&gt;J&amp;oslash;rgen.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I confirmed that bus speed is the problem with this peripheral after changing the 100KHz value in nrf9160_bitfields.h from&amp;nbsp;0x01980000 to 0x00C80000. It&amp;#39;s rock-steady with this change.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m afraid I don&amp;#39;t know how to access the FREQUENCY register - can you point me to an example? I&amp;#39;ve got minimal interaction with the device in my LCD interface:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;static const struct i2c_dt_spec i2c_dev = I2C_DT_SPEC_GET(I2C_INST);&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That&amp;#39;s all I have that references the I2C driver. Unfortunately, I don&amp;#39;t know how to follow this reference all the way to the FREQUENCY register.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;On a side note, why not make sub-100K frequencies available via the SDK? Can that be a feature request?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jim&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to change I2C bus speed to 50KHz</title><link>https://devzone.nordicsemi.com/thread/495795?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2024 10:57:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69c76706-0372-479a-9f58-6f0929aa4647</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.6.99-ncs2/drivers/i2c/i2c_nrfx_twim.c#L230-L260"&gt;I2C driver&lt;/a&gt; will throw an error if you try to configure anything else than the supported speeds. It will not be possible to configure this through the APIs in nRF Connect SDK or Zephyr. If you need to try out different speeds, you will have to write directly to the &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf9160/page/twim.html#ariaid-title42"&gt;FREQUENCY register&lt;/a&gt; of the TWI(M) peripheral, after configuration and before transmits. Note that only the defined speeds mentioned in the register documentation (100K/250K/400K) is supported and tested, all other values are used at your own risk. We do not provide register values for other speeds.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>