<?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 SDA PIN input current</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64670/i2c-sda-pin-input-current</link><description>Is there any way to reduce the TWIM SDA line input current? We use a 1.8V I2C sensor (connected via level shifter) that can sink 2mA max. So, the communication will fail because the sensor can&amp;#39;t pull the SDA line to LOW level. The current (measured between</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Aug 2020 12:24:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64670/i2c-sda-pin-input-current" /><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264465?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2020 12:24:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59890ff7-8278-4c5a-accc-76e26cf6c891</guid><dc:creator>AD1170</dc:creator><description>&lt;p&gt;Yes, the communication works perfect now. Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264452?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2020 11:53:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94a2f305-f13e-4668-8f16-7db0a130fe89</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Did the issue disappear after you removed this macro?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264305?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 14:22:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84592c15-076a-4990-be30-9a83078e362a</guid><dc:creator>AD1170</dc:creator><description>&lt;p&gt;Many thanks, i have seen that register was changed to disconnect and S0S1 drive after the 1st initialization. This was done in a macro related to control the I2C level shifter. The macro was a left over from a former state of development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264290?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 13:42:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52eac607-6cc4-4ff7-948b-c6ab87060128</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I need you to halt the cpu after a transfer has started and read out the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/gpio.html?cp=4_1_0_5_7_1_9#register.PIN_CNF-0-31"&gt;PIN_CNF[n]&lt;/a&gt;&amp;nbsp;register for p0.20.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;This will tell us if the GPIO configuration is overridden somewhere else in the&amp;nbsp;SW.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264214?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 09:55:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6b09b2d-1fed-4925-9b03-530918d94f27</guid><dc:creator>AD1170</dc:creator><description>&lt;p&gt;I&amp;#39;m sure the the SDA Pin (P0.20) is only initialized on start up, before the I2C peripheral is initialized and only controlled by the I2C peripheral.&lt;/p&gt;
&lt;p&gt;Here are the I2C related initialization code.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//! GPIO pin for TWI
#define GPIO_PIN_IN_TWI 	((GPIO_PIN_CNF_SENSE_Disabled &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos) | \
                       	 	 (GPIO_PIN_CNF_DRIVE_S0D1 &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos) | \
                         	 (GPIO_PIN_CNF_PULL_Disabled &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos) | \
                         	 (GPIO_PIN_CNF_INPUT_Connect &amp;lt;&amp;lt; GPIO_PIN_CNF_INPUT_Pos) | \
                         	 (GPIO_PIN_CNF_DIR_Input &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos))


// GPIO initialization

  //
  // I2C
  //
  NRF_P0-&amp;gt;OUTSET = BitP0_SCL;
  NRF_P0-&amp;gt;PIN_CNF[PinP0_SCL] = GPIO_PIN_IN_TWI; // GPIO_PIN_OUT;
  NRF_P0-&amp;gt;PIN_CNF[PinP0_SDA] = GPIO_PIN_IN_TWI; // GPIO_PIN_IN_DISCON;

// I2C Initialization (later in the code)

  I2C_IF-&amp;gt;PSEL.SCL = PinP0_SCL;
  I2C_IF-&amp;gt;PSEL.SDA = PinP0_SDA;

  I2C_IF-&amp;gt;ADDRESS = 0;
  I2C_IF-&amp;gt;FREQUENCY = TWIM_FREQUENCY_FREQUENCY_K390 &amp;lt;&amp;lt; TWIM_FREQUENCY_FREQUENCY_Pos; // see Errata 219
  I2C_IF-&amp;gt;SHORTS = 0;

  I2C_IF-&amp;gt;INTENSET = TWIM_INTENSET_STOPPED_Msk | TWIM_INTENSET_ERROR_Msk;

  sd_nvic_SetPriority(TWIM0_IRQ, APP_IRQ_PRIORITY_HIGH);
  sd_nvic_ClearPendingIRQ(TWIM0_IRQ);
  sd_nvic_EnableIRQ(TWIM0_IRQ);

  I2C_IF-&amp;gt;ENABLE = TWIM_ENABLE_ENABLE_Enabled &amp;lt;&amp;lt; TWIM_ENABLE_ENABLE_Pos;

  nrf_mtx_init(&amp;amp;I2C_mtx);


&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please note, there are 4 more I2C devices on the custom board. The communication with devices works w/o issues. Perhaps, this is because the devices can sink at least 10mA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264205?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 09:40:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:271dc4d0-5ab8-4c98-ac9e-ed6f42163224</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Thanks, it&amp;#39;s clear to me now that p0.20 likely sources the excessive current. There are two options, either the GPIO is in the output-high state or the GPIO&amp;#39;s ESD protection diode is blown due to over-voltage (short-circuit). Since you can reproduce this issue on the DK it&amp;#39;s likely not an over-voltage issue.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Does any of your code, other than TWI related, try to control p0.20?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can you share your code?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264192?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 09:00:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddb93765-dbb7-41a6-b5f4-c8bcdb5ee40e</guid><dc:creator>AD1170</dc:creator><description>&lt;p&gt;No, the voltage drop is every time when the sensor try to pull the SDA line LOW. In this case to ACK the I2C device address (9th clock).&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Schematic1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264187?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 08:54:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc1e692a-658b-4a9b-aab7-3efdac8a7d2b</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Then it&amp;#39;s definitely not the level shifter.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m struggling to understand your circuit as the voltage drop over the series resistor only seem to be present at certain times when the SDA line should not be sinked.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can you draw a schematic of the SDA line with the nRF pin, series resistor, external pull-up resistor, probe, and sensor pin?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264156?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 06:40:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83e3f283-8c63-44fa-8374-bf6d8cb4c885</guid><dc:creator>AD1170</dc:creator><description>&lt;p&gt;I have tested the sensor with the PCA10100 with 1.8V Vcc. As you can see in the picture below, the current is still around 5mA.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/SCRN0469.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264023?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 11:41:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a461d87-42b2-40d1-bffe-a74997a77bc4</guid><dc:creator>AD1170</dc:creator><description>&lt;p&gt;I can not test this scenario because the custom board does not run on 1.8V.&lt;/p&gt;
&lt;p&gt;However, i can use the PCA10100 and a separate sensor breakout board, but it will take some time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/264020?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 11:33:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d79d0eeb-0b1a-4eae-9618-613e6eebe030</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Also, what happens if you power the nRF at 1.8V and bypass the level shifter?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/263999?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 10:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:282ce06e-cf76-424b-add7-5107dc1240e0</guid><dc:creator>AD1170</dc:creator><description>&lt;p&gt;Sure, i can do that but i think i will see the same. Because I&amp;#39;ve already tested with a simple pass gate level shifter (2 FET&amp;#39;s, mostly the same as the used TCA9406).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/263996?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 09:53:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab57ba12-bffb-4dd5-a9ee-b5c936ec5a4b</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I suggest you try the same with a 100R between the nRF52 and the level shifter&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/263994?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 09:46:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef150d1e-23ee-48f8-8428-1a3df6b176e3</guid><dc:creator>AD1170</dc:creator><description>&lt;p&gt;As mentioned above, it seems that the current is came from the nRF52833. I have no other idea.&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/SCRN0466.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;I have inserted a 100R resistor between the Sensor SDA and the Level Shifter. Scope Ch 1 and Scope&amp;nbsp; Ch 2 in the picture above show the signal on both side of the resistor. The red signal is the difference, around 970mV (the voltage drop over 100R).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/263973?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 09:01:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf5770af-fd5d-4d5b-af8b-c969a56d1d2d</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Then how are you able to sink 2mA? Where does this current come from?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;With 10k pull-ups at 3V, you should sink 300µA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/263957?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 08:32:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:812a926e-c23c-4d38-9bea-6059c2d3321a</guid><dc:creator>AD1170</dc:creator><description>&lt;p&gt;The pull-up resistors are 10k on both sides of the level shifter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C SDA PIN input current</title><link>https://devzone.nordicsemi.com/thread/263956?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 08:29:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ae77a65-7740-4bf6-8774-de4defd02904</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;What resistance do your pull-up resistors have?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>