<?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>nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87260/nrf91-how-to-use-twi-i2c</link><description>ncs v1.9.1 
 Reference nrf\applications\serial_lte_modem\src\twi 
 This example does not see how to configure the pin.so how to config SCK and SDA Pin? 
 Thanks!!!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Apr 2022 12:02:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87260/nrf91-how-to-use-twi-i2c" /><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/365172?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 12:02:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d16c0fe7-9062-4d4f-af21-b5134c3bea86</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The overlay file will not be added just because you have it in the same folder.&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/guides/dts/howtos.html#set-devicetree-overlays"&gt;Set devicetree overlays&lt;/a&gt; for how to set it.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/365072?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 04:01:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e1b6301-4afc-446a-bd59-a446535e7089</guid><dc:creator>john.liu</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Sigurd Hellesvik:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is the project I built, and it seems that I2C is not working after running.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/JohnLiu-cloud/nrf91_i2c"&gt;https://github.com/JohnLiu-cloud/nrf91_i2c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/365068?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2022 02:26:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa59ffaa-a9cb-46ed-86ae-cbf4616df2cd</guid><dc:creator>john.liu</dc:creator><description>&lt;p&gt;thank you.&lt;/p&gt;
&lt;p&gt;I tried the following.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1651025783076v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Either i2c0 or i2c1 is enabled but i2c2 is enabled.Am I still wrong somewhere?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1651026299765v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/364933?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 11:29:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e835ce7-15e9-438f-a123-83a7f7e1da5f</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;See &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/240c7b9a691f6bcee824d1b26a40a368a916bb05/scripts/kconfig/kconfigfunctions.py#L124-L136"&gt;zephyr/scripts/kconfig/kconfigfunctions.py#L124-L136&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You enable it by setting the &amp;quot;okay&amp;quot; as from my last post.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = &amp;quot;okay&amp;quot;;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/364893?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 10:03:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64dec43e-4fc4-4e37-b0b2-cec366921cf4</guid><dc:creator>john.liu</dc:creator><description>&lt;p&gt;Thank you very much!!! I now understand how it works.I have one more question.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;config SLM_TWI
	bool &amp;quot;Access TWI interface with SLM AT command&amp;quot;
	select I2C
	default y if &amp;quot;$(dt_nodelabel_enabled,i2c0)&amp;quot; || \
		     &amp;quot;$(dt_nodelabel_enabled,i2c1)&amp;quot; || \
		     &amp;quot;$(dt_nodelabel_enabled,i2c2)&amp;quot; || \
		     &amp;quot;$(dt_nodelabel_enabled,i2c3)&amp;quot;&lt;/pre&gt;&lt;span&gt;How to enable &amp;quot;dt_nodelabel_enabled,i2c0 &amp;quot;.I didn&amp;#39;t find a reference.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/364878?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 09:15:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56f56e50-1c59-4d58-8e2e-8f8e452902ad</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You can set the pins for i2c0 and/or i2c1 by using &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/guides/dts/howtos.html#set-devicetree-overlays"&gt;Devicetree overlays&lt;/a&gt;. &lt;br /&gt;Here is an example for an overlay file setting the pins for one of the i2c devices:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c1 {
    status = &amp;quot;okay&amp;quot;;
    sda-pin = &amp;lt; 12 &amp;gt;;
    scl-pin = &amp;lt; 13 &amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/364762?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 15:03:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:338ca53e-eba3-4a6c-b0dd-ffeb7316ea8c</guid><dc:creator>john.liu</dc:creator><description>&lt;p&gt;It seems that the i2c of this is not used. Is there any other examples I can refer to.(Examples that seem easier to understand.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/364760?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 14:54:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c189e5bc-3733-4ca1-bbd7-b8daae7d8818</guid><dc:creator>john.liu</dc:creator><description>&lt;p&gt;thank you.I wank to know i2c0,i2c1...which pin is used and why can&amp;#39;t it be found.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/364683?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 11:13:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb2410f1-427a-4239-b91c-fb0725f01d6c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You can add them yourself, using the syntax seen in zephyr.dts for i2c2:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;            i2c2: arduino_i2c: i2c@a000 {
                compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
                #address-cells = &amp;lt; 0x1 &amp;gt;;
                #size-cells = &amp;lt; 0x0 &amp;gt;;
                reg = &amp;lt; 0xa000 0x1000 &amp;gt;;
                clock-frequency = &amp;lt; 0x186a0 &amp;gt;;
                interrupts = &amp;lt; 0xa 0x1 &amp;gt;;
                status = &amp;quot;disabled&amp;quot;;
                label = &amp;quot;I2C_2&amp;quot;;
                sda-pin = &amp;lt; 0x1e &amp;gt;;
                scl-pin = &amp;lt; 0x1f &amp;gt;;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf91 how to use twi(i2c)?</title><link>https://devzone.nordicsemi.com/thread/364591?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 03:07:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e6aa22c-8088-428e-a5d8-a94c046cc9f5</guid><dc:creator>john.liu</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; Reference zephyr.dts&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &amp;nbsp; &lt;/span&gt;&lt;span&gt;i2c0:&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;i2c&lt;/span&gt;&lt;span&gt;@&lt;/span&gt;&lt;span&gt;8000&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;compatible&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&amp;quot;nordic,nrf-twim&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;#address-cells&lt;/span&gt;&lt;span&gt; = &amp;lt; &lt;/span&gt;&lt;span&gt;0x1&lt;/span&gt;&lt;span&gt; &amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;#size-cells&lt;/span&gt;&lt;span&gt; = &amp;lt; &lt;/span&gt;&lt;span&gt;0x0&lt;/span&gt;&lt;span&gt; &amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;reg&lt;/span&gt;&lt;span&gt; = &amp;lt; &lt;/span&gt;&lt;span&gt;0x8000&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x1000&lt;/span&gt;&lt;span&gt; &amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;clock-frequency&lt;/span&gt;&lt;span&gt; = &amp;lt; &lt;/span&gt;&lt;span&gt;0x186a0&lt;/span&gt;&lt;span&gt; &amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;interrupts&lt;/span&gt;&lt;span&gt; = &amp;lt; &lt;/span&gt;&lt;span&gt;0x8&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0x1&lt;/span&gt;&lt;span&gt; &amp;gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&amp;quot;disabled&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;label&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&amp;quot;I2C_0&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;But no define SCK and SDA pin.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>