<?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>TWI scan no device found</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72074/twi-scan-no-device-found</link><description>Hello, I&amp;#39;ve been trying to setup TWI with 3 sensors and so far I had no luck (custom board). Here&amp;#39;s the situation: 1) 3 sensors are connected to nrf52820, SCL to P0.15, SDA to P0.14 
 2) External pull up resistors, 10k 
 3) Sensors are powered up using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Feb 2021 22:38:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72074/twi-scan-no-device-found" /><item><title>RE: TWI scan no device found</title><link>https://devzone.nordicsemi.com/thread/296396?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 22:38:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b968f7d-5f8c-48d7-8d1f-15e7a1d6ddde</guid><dc:creator>pouyae</dc:creator><description>&lt;p&gt;Found the issue. One of the sensors was mounted upside down on the PCB. Sorry for taking your time!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI scan no device found</title><link>https://devzone.nordicsemi.com/thread/296392?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 21:22:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af61bdd6-0945-4aa7-b6f1-0fc3ef35ff72</guid><dc:creator>pouyae</dc:creator><description>[quote userid="18935" url="~/f/nordic-q-a/72074/twi-scan-no-device-found/296391#296391"]&lt;p&gt;Bad sign. On an idle I²C bus, &lt;em&gt;both&lt;/em&gt; lines need to be high, or rather pulled up by the pullup resistor.&lt;/p&gt;
&lt;div class="quote-header"&gt;&lt;/div&gt;&lt;blockquote class="quote"&gt;&lt;div class="quote-user"&gt;&lt;/div&gt;&lt;/blockquote&gt;[/quote]
&lt;p&gt;I have pull up resistors on both SCL and SDA. Do I need to disable internal pull ups for this to function correctly? I&amp;#39;ve tried&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_gpio_cfg_input(SDA_PIN, NRF_GPIO_PIN_NOPULL);
NRF_GPIO-&amp;gt;PIN_CNF[SDA_PIN] |= (GPIO_PIN_CNF_DRIVE_H0H1 &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos);
NRF_GPIO-&amp;gt;PIN_CNF[SDA_PIN] |= ((GPIO_PIN_CNF_PULL_Disabled &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos));

nrf_gpio_cfg_input(SCL_PIN, NRF_GPIO_PIN_NOPULL);
NRF_GPIO-&amp;gt;PIN_CNF[SCL_PIN] |= (GPIO_PIN_CNF_DRIVE_H0H1 &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos);
NRF_GPIO-&amp;gt;PIN_CNF[SCL_PIN] |= ((GPIO_PIN_CNF_PULL_Disabled &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And also&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define TWI_PIN_INIT(_pin) nrf_gpio_cfg((_pin),                     \
                                        NRF_GPIO_PIN_DIR_INPUT,     \
                                        NRF_GPIO_PIN_INPUT_CONNECT, \
                                        NRF_GPIO_PIN_NOPULL,        \
                                        NRF_GPIO_PIN_S0D1,          \
                                        NRF_GPIO_PIN_NOSENSE)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And also&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define SCL_PIN_INIT_CONF     ( (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_Pullup    &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))&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but they didn&amp;#39;t make any difference.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="18935" url="~/f/nordic-q-a/72074/twi-scan-no-device-found/296391#296391"]Those GPIO pins are current limited - do you reach the voltage for correct sensor operation?[/quote]
&lt;p&gt;The sensors I&amp;#39;m using require microamps to function, and I&amp;#39;ve set&amp;nbsp;&lt;span&gt;GPIO_PIN_CNF_DRIVE_H0H1 on&amp;nbsp;&lt;/span&gt;P0.08.&amp;nbsp;The output voltage is 2.98 which is in range for the sensors.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI scan no device found</title><link>https://devzone.nordicsemi.com/thread/296391?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 21:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97f0699a-07e8-49d5-8ab7-6c5c0fa1de3c</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="101922" url="~/f/nordic-q-a/72074/twi-scan-no-device-found"]Checking SCL and SDA after TWI init, SCL is high, and SDA is low.[/quote]
&lt;p&gt;Bad sign. On an idle I&amp;sup2;C bus, &lt;em&gt;both&lt;/em&gt; lines need to be high, or rather pulled up by the pullup resistor.&lt;/p&gt;
[quote userid="101922" url="~/f/nordic-q-a/72074/twi-scan-no-device-found"]Sensors are powered up using P0.08[/quote]
&lt;p&gt;Those GPIO pins are current limited - do you reach the voltage for correct sensor operation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>