<?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>I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48910/i2c-clock-frequency-problem</link><description>Hi, 
 
 I am using NRF52832 development board , to which i have interfaced LIS3DSH accelerometer sensor(3.3V i2c) 
 
 when i configure it for 1600 sampling rate and all the axis enabled , i am not able to get any data . 
 could anyone help with this problem</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Sep 2022 21:50:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48910/i2c-clock-frequency-problem" /><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/384873?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 21:50:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58c15fb2-42ca-4e42-b1c9-d42da5a2396e</guid><dc:creator>dbouchie</dc:creator><description>&lt;p&gt;I think I have the answer see my reply here: &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/60516/twi-speed-not-correct"&gt;TWI speed not correct&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;quot;I&amp;#39;ve had a similar issue. I think I found the source of the issue: the chip&amp;#39;s TWIM clock stretching. I&amp;#39;m unfamilar of how the internal chip circuitry works, but I noticed when I added a longer wire to my circuit, all of a sudden the clock rate went from 250kHZ to 125kHz (with the master frequency set to 250kHz). Just by adding a wire! The additional capacitance must have some effect on the clock stretching circuit. &lt;br /&gt;&lt;br /&gt;Just speculating, but the theory would be the slow rise times fool the TWIM into thinking a peripheral is clock stretching, so the TWI skips a clock cycle until the clock line rises back again.&lt;br /&gt;&lt;br /&gt;For workarounds, try using a larger pull-up resistor.&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195884?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 09:06:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e92d03b9-c04b-4863-a19f-6a8585635938</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;But we didn&amp;#39;t know that, and we can&amp;#39;t see the results - can we?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195876?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 08:49:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:719bb393-782e-4a57-a034-d6a7eeed0a70</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;hi &lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt; certainly , i have tested in oscilloscope before too , which also showed the same result as logic analyzer, in that i didn&amp;#39;t check the parameters&amp;nbsp; such as rise time and etc., and it was done on pin 27 &amp;amp; 26 as a reference , i will redo it and will check again.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank You&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195816?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 07:22:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8d53c5c-b42e-4c94-a699-a998205be169</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;As always - there&amp;#39;s no point try to suggest cures before we know what the actual problem is!&lt;/p&gt;
&lt;p&gt;Scoping the signal is certainly not something that is &amp;quot;not required&amp;quot; - it should have been one of the very &lt;em&gt;&lt;strong&gt;first&lt;/strong&gt;&lt;/em&gt; things you did!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195813?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 07:16:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c7894df-8619-40e8-94a2-be43e56cfcbc</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;Thanks &lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt; i know that i only have to do that , just asking your suggestion regarding that before i do anything which is not required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195808?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 07:13:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07f8a124-c8c4-47ff-af95-c9290b434548</guid><dc:creator>awneil</dc:creator><description>[quote userid="78194" url="~/f/nordic-q-a/48910/i2c-clock-frequency-problem/195797"]will pulling up the line help[/quote]
&lt;p&gt;Who knows?&lt;/p&gt;
&lt;p&gt;It&amp;#39;s &lt;em&gt;&lt;strong&gt;your&lt;/strong&gt; &lt;/em&gt;hardware - &lt;em&gt;&lt;strong&gt;you&lt;/strong&gt; &lt;/em&gt;need to do the debugging!&lt;/p&gt;
&lt;p&gt;Again, &lt;em&gt;&lt;strong&gt;you&lt;/strong&gt; &lt;/em&gt;need to use an oscilloscope to see what&amp;#39;s actually happening in your hardware.&lt;/p&gt;
&lt;p&gt;Nobody else can do that for you.&lt;/p&gt;
&lt;p&gt;Your oscilloscope will show you if the rise time is too slow - ie, your pullups are not strong enough.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195797?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 06:35:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f442aabd-ebf4-4e1e-8728-848fe3ed9dab</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;thanks &lt;a href="https://devzone.nordicsemi.com/members/haakonsh"&gt;haakonsh&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt; , i will check with them and let you know their response,&lt;/p&gt;
&lt;p&gt;tell me one more thing will pulling up the line help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195736?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 15:04:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6695f73-2001-4cce-87b8-b180515341e2</guid><dc:creator>awneil</dc:creator><description>[quote userid="13562" url="~/f/nordic-q-a/48910/i2c-clock-frequency-problem/195727"]some form of loading on the I2C lines[/quote]
&lt;p&gt;Which reminds me of the question&amp;nbsp;asked several times&amp;nbsp;early on in this thread - but I don&amp;#39;t recall it ever being answered:&lt;/p&gt;
[quote userid="13562" url="~/f/nordic-q-a/48910/i2c-clock-frequency-problem/194311"]Why have you enabled pulldowns on your IO pins[/quote]
&lt;p&gt;Pulling-down the line is exactly what a Slave would do to stretch the clock ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195727?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 14:56:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fd4067e-4950-4c94-ba0c-9dea36e8f9d4</guid><dc:creator>haakonsh</dc:creator><description>[quote user="awneil"]The&amp;nbsp;&lt;span&gt;LIS3DSH is an &lt;strong&gt;ST&lt;/strong&gt; Product - so you probably need to go back to &lt;strong&gt;ST&lt;/strong&gt; to ask &lt;em&gt;&lt;strong&gt;them&lt;/strong&gt;&lt;/em&gt; what might cause &lt;em&gt;&lt;strong&gt;their&lt;/strong&gt; &lt;/em&gt;product to behave like this.&lt;/span&gt;[/quote]
&lt;p&gt;We sit&amp;nbsp;on one-half of the resources needed to solve this issue, ST sits on the other. You need to ask them for inputs as well, as their I2C slave seems to be stretching the clock.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;It could still be the nRF52832 that causes the issue as it is currently set to use clk of 410kHz. Try setting the&amp;nbsp;FREQUENCY register to&amp;nbsp;&lt;span&gt;0x06400000 prior to starting the I2C bus. &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="awneil"]Have you looked at the clock with an oscilloscope - to see if there are any weird &lt;em&gt;analogue&lt;/em&gt; effects going on?[/quote]
&lt;p&gt;&amp;nbsp;What appears to be clock stretching might be some &amp;quot;weird analogue effects&amp;quot;, some form of loading on the I2C lines.&lt;br /&gt;&lt;br /&gt;You can also try enabling high drive strength on the GPIOs.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195708?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 14:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73fe9bd8-5b5a-4a03-aef2-7e08f507e8d0</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;So far, I think you&amp;#39;ve only shown logic analyser (ie, digital) traces ?&lt;/p&gt;
&lt;p&gt;Have you looked at the clock with an oscilloscope - to see if there are any weird &lt;em&gt;analogue&lt;/em&gt; effects going on?&lt;/p&gt;
&lt;p&gt;eg, if you have extremely long rise times ... ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195692?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 13:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8a3c8f5-f6a6-41ac-b26a-2d19bbd19199</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Indeed - and you can refer them to this thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195690?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 13:53:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d4e2d47-d205-475d-944a-ece76c6a8649</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;if it is working in other 3 boards and not in Nordic , they will surely ask me to check with you people , to ask whether there is any problem with code or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195642?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 12:43:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecd2d3ec-22ec-491b-9318-c7232e3262a4</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;The&amp;nbsp;&lt;span&gt;LIS3DSH is an &lt;strong&gt;ST&lt;/strong&gt; Product - so you probably need to go back to &lt;strong&gt;ST&lt;/strong&gt; to ask &lt;em&gt;&lt;strong&gt;them&lt;/strong&gt;&lt;/em&gt; what might cause &lt;em&gt;&lt;strong&gt;their&lt;/strong&gt; &lt;/em&gt;product to behave like this.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195626?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 12:09:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68f97a96-99c8-467d-b379-5663143a6e0a</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/haakonsh"&gt;haakonsh&lt;/a&gt;&amp;nbsp;, but same slave i am using withother development kit /microcontroller eg: Renesas S5D9 and stm32eval board , also raspberry pi , while it is working in all those environment for same code and configuration giving expected clock frequency in the logic analyzer , that&amp;#39;s the reason i came to you people.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195599?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 11:17:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b20cfa5-e2dc-430f-bdc4-67484dd8b323</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;The GPIO expander is connected to P0.13 - P0.20:&amp;nbsp;&lt;a title="I/O expander for buttons and LEDs" href="https://infocenter.nordicsemi.com/topic/ug_nrf52832_dk/UG/nrf52_DK/hw_io_ext_btns_leds.html?cp=3_1_4_5_4_0"&gt;I/O expander for buttons and LEDs&lt;/a&gt;. And&amp;nbsp;I believe they&amp;nbsp;should work at 400kHzthrough the IO expander.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="awneil"]Does your peripheral default to 200kHz, and need to be configured to change to 400 ... ?[/quote]
&lt;p&gt;I&amp;#39;ve not found anything in the&amp;nbsp;&lt;span&gt;LIS3DSH&amp;#39;s specs that hints to a configurable I2C clock.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Paraphrased from its spec, &amp;quot;The &lt;span&gt;LIS3DSH&lt;/span&gt;&amp;nbsp;supports fast I2C mode with clock speeds up to 400kHz&amp;quot;, but, it does not say anywhere in its specification that its I2C slave runs at 400kHz, rather it supports &amp;#39;fast mode I2C&amp;#39;.&lt;br /&gt; &lt;br /&gt;&lt;strong&gt;What you&amp;#39;re seeing on SCL is the I2C slave clock stretching down to 200kHz.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is most likely the expected behavior of this device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195584?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 10:30:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9a2b19e-cd22-46e9-8e37-27df7f830de6</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/1663.twi-GVR.png" /&gt;&lt;/p&gt;
&lt;p&gt;By default lis3dsh peripheral will support 400K fast mode, it was working in other development kit(also clock in other dk was also reflected) like renesas and stm eval board.&lt;/p&gt;
&lt;p&gt;that&amp;#39;s&amp;nbsp; y i didn&amp;#39;t get to know the actual problem and asking for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195561?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 08:59:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05c02b47-4a98-4a72-859b-b3414cf32d2b</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;But your test demonstrates that the issue is not to do with your software configuration, or an SDK bug, in the nRF chip?&lt;/p&gt;
&lt;p&gt;Does your peripheral default to 200kHz, and need to be configured to change to 400 ... ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195549?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 08:51:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5a3b034-a207-408d-828f-70d51e0d1eac</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;tqs&amp;nbsp; &lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt; but peripheral supports 400K clock&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195523?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 07:56:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c10d8b3-8a74-4274-902a-caeee575f00c</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;It is a standard feature of the I2C bus that it operates at the speed of the slowest attached peripheral&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195506?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 06:49:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:050efc22-6965-4259-8ede-ef91776defbd</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;without slave device about 400 k clock i am able to see, when i connect a slave device its dropping to 200 k&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195502?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 05:47:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:096c28e0-6279-417c-98e7-526ff8cf69dd</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;&lt;a class="internal-link view-user-profile" style="background-attachment:scroll;background-color:transparent;background-image:none;background-repeat:repeat;background-size:auto;color:#30c6da;font-style:normal;font-weight:600;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;" href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt; yes it is from nrf52832&amp;nbsp;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt; (pca10040)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="ui-userpresence ui-tip " style="background-color:#aaaaaa;color:#bcccd4;display:inline-block;font-style:normal;font-weight:600;height:8px;letter-spacing:normal;overflow:hidden;text-align:left;text-decoration:none;text-indent:100%;text-transform:none;white-space:nowrap;width:8px;"&gt;Offline&lt;/span&gt;&lt;span style="background-color:transparent;color:#bcccd4;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:600;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt; &lt;/span&gt;&lt;a class="internal-link view-user-profile" style="background-attachment:scroll;background-color:transparent;background-image:none;background-repeat:repeat;background-size:auto;color:#5bd2e2;font-style:normal;font-weight:600;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;" href="https://devzone.nordicsemi.com/members/haakonsh"&gt; haakonsh&lt;/a&gt; : presently 26 &amp;amp; 27 are used which is by default u have said in the documents, is there any problem with those pins, any way i will change and check and will let you know the results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195402?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2019 14:22:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6422244-d9d8-4d17-bce3-3cafa2abfe9f</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Yeah, that&amp;#39;s true. Try pin 11 for the clock signal and 12 for the data line.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195337?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2019 10:43:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77a6bc13-0656-4d5c-8935-a4840ebfe828</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/manjunath-k-s"&gt;Manjunath K S&lt;/a&gt; -&amp;nbsp;and that&amp;#39;s on the Nordic n&lt;span&gt;RF52832 DK (pca10040) ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/members/haakonsh"&gt;haakonsh&lt;/a&gt;&amp;nbsp;- the&amp;nbsp;nRF52832 DK has an I2C IO expander, doesn&amp;#39;t it ... ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195334?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2019 10:41:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c69b476b-a607-47a9-8a4c-ad45ec1eb84c</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;sorry i couldn&amp;#39;t take the frequency info while taking snapshot , clock was still 200, if u want i can retake and send&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock frequency problem</title><link>https://devzone.nordicsemi.com/thread/195331?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2019 10:33:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd8214f7-8b93-48e7-8bff-d575c2ac476d</guid><dc:creator>Manjunath K S</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * Copyright (c) 2016 - 2018, Nordic Semiconductor ASA
 * 
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 * 
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 * 
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 * 
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 * 
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 * 
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 */
/** @file
 * @defgroup tw_scanner main.c
 * @{
 * @ingroup nrf_twi_example
 * @brief TWI Sensor Example main file.
 *
 * This file contains the source code for a sample application using TWI.
 *
 */

#include &amp;lt;stdio.h&amp;gt;
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;app_util_platform.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;nrf_drv_twi.h&amp;quot;



#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;

/* TWI instance ID. */
#if TWI0_ENABLED
#define TWI_INSTANCE_ID     0
#elif TWI1_ENABLED
#define TWI_INSTANCE_ID     1
#endif

 /* Number of possible TWI addresses. */
 #define TWI_ADDRESSES      127

/* TWI instance. */
static const nrf_drv_twi_t m_twi = NRF_DRV_TWI_INSTANCE(TWI_INSTANCE_ID);


/**
 * @brief TWI initialization.
 */
void twi_init (void)
{
    ret_code_t err_code;

    const nrf_drv_twi_config_t twi_config = {
       .scl                = ARDUINO_SCL_PIN,
       .sda                = ARDUINO_SDA_PIN,
       .frequency          = NRF_DRV_TWI_FREQ_400K,
       .interrupt_priority = APP_IRQ_PRIORITY_HIGH,
       .clear_bus_init     = false
    };

    err_code = nrf_drv_twi_init(&amp;amp;m_twi, &amp;amp;twi_config, NULL, NULL);
    APP_ERROR_CHECK(err_code);

    nrf_drv_twi_enable(&amp;amp;m_twi);
}


/**
 * @brief Function for main application entry.
 */
int main(void)

{
    ret_code_t err_code;
    uint8_t address;
    uint8_t sample_data;
    bool detected_device = false;

    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
    NRF_LOG_DEFAULT_BACKENDS_INIT();

    NRF_LOG_INFO(&amp;quot;TWI scanner started.&amp;quot;);
    NRF_LOG_FLUSH();
    twi_init();
    while(1)
    {

    for (address = 1; address &amp;lt;= TWI_ADDRESSES; address++)
    {
        err_code = nrf_drv_twi_rx(&amp;amp;m_twi, address, &amp;amp;sample_data, sizeof(sample_data));
        
        if (err_code == NRF_SUCCESS)
        {
            detected_device = true;
            NRF_LOG_INFO(&amp;quot;TWI device detected at address 0x%x.&amp;quot;, address);
        }
        NRF_LOG_FLUSH();
    }
}
    if (!detected_device)
    {
        NRF_LOG_INFO(&amp;quot;No device was found.&amp;quot;);
        NRF_LOG_FLUSH();
    }

    while (true)
    {
        /* Empty loop. */
    }
}

/** @} */
&lt;/pre&gt;&lt;img alt="NAK" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/nakfromdk.png" /&gt;&lt;/p&gt;
&lt;p&gt;Thank You&amp;nbsp;&lt;span class="user-name" style="background-color:transparent;color:#bcccd4;font-style:normal;font-weight:600;letter-spacing:normal;padding-right:5px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;&lt;a class="internal-link view-user-profile" style="background-attachment:scroll;background-color:transparent;background-image:none;background-repeat:repeat;background-size:auto;color:#30c6da;text-decoration:none;" href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil and&amp;nbsp;&lt;span class="ui-userpresence ui-tip present" style="background-color:#7bc93d;color:#bcccd4;display:inline-block;font-style:normal;font-weight:600;height:8px;letter-spacing:normal;overflow:hidden;text-align:left;text-decoration:none;text-indent:100%;text-transform:none;white-space:nowrap;width:8px;"&gt;On &lt;/span&gt;&lt;/a&gt;&lt;a class="internal-link view-user-profile" style="background-attachment:scroll;background-color:transparent;background-image:none;background-repeat:repeat;background-size:auto;color:#30c6da;font-style:normal;font-weight:600;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;" href="https://devzone.nordicsemi.com/members/haakonsh"&gt;haakonsh&lt;/a&gt;&lt;a class="internal-link view-user-profile" style="background-attachment:scroll;background-color:transparent;background-image:none;background-repeat:repeat;background-size:auto;color:#30c6da;text-decoration:none;" href="https://devzone.nordicsemi.com/members/awneil"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;attached is the code snippet and logic analyzer scope as u have requested, by not connecting to any devices to development kit.&lt;/p&gt;
&lt;p&gt;As u can see still the clock is 200K.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>