<?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 bus spikes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81006/i2c-bus-spikes</link><description>Hi Team, 
 
 These are the SDA and SCL lines of nRF52832 connected to a sensor. the clock frequency defined in the code is 400 KHz, but its coming as 200 KHz on oscilloscope. I think this is due to the weak internal pull up resistors. I believe this should</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Oct 2021 11:54:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81006/i2c-bus-spikes" /><item><title>RE: I2C bus spikes</title><link>https://devzone.nordicsemi.com/thread/335712?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 11:54:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48595986-7d82-4610-b9de-10853fc17498</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]1) I know that the poor shape of the signals are due to weak internal pullup resistors. &lt;span style="text-decoration:underline;"&gt;Can I ask you if this poor shape can cause reading wrong data ?&lt;/span&gt; For the first square (marked red), shows that the data is changing during the rising edge of clock. We are currently reading correct values, &lt;span style="text-decoration:underline;"&gt;but is this prone to errors ?&lt;/span&gt;&amp;nbsp;[/quote]
&lt;p&gt;Yes, this can cause errors in communication. You should consider either going to 100 kHz mode, or add stronger pull-up resistors.&lt;/p&gt;
[quote user=""]2) I sometimes notice noise on SDA line as shown in the above figure. Is it okay to notice such spikes during the negative cycle of clock ? Can this cause wrong data ? How can I avoid this ?[/quote]
&lt;p&gt;You should add proper pull-ups and redo the scoping. This&amp;nbsp;could be a edge detection on the slave side (ie. ACKing of the packet).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>