<?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>nrf9160 i2c bit-bang driver gives no output</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61949/nrf9160-i2c-bit-bang-driver-gives-no-output</link><description>Hello, 
 I want to implement an SMbus read block function. As this function seems to be not supported by hardware I want to try by modifying the i2c bit bang driver. 
 Unfortunately the stock bitbang driver seems to be unable to output any waveform. The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Feb 2024 23:24:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61949/nrf9160-i2c-bit-bang-driver-gives-no-output" /><item><title>RE: nrf9160 i2c bit-bang driver gives no output</title><link>https://devzone.nordicsemi.com/thread/468494?ContentTypeID=1</link><pubDate>Mon, 12 Feb 2024 23:24:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a82f7c14-d3b2-4554-ba92-2a957b373bb3</guid><dc:creator>Burt</dc:creator><description>&lt;p&gt;On an nRF9160 I did this to get output on the pins&lt;/p&gt;
&lt;p&gt;nrf_gpio_cfg(30/*SDA*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_DIR_OUTPUT/*1*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_INPUT_CONNECT/*0*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_NOPULL/*0*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_S0D1/*0x600*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_NOSENSE/*0*/);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; nrf_gpio_cfg(31/*SCL*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_DIR_OUTPUT/*1*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_INPUT_DISCONNECT/*2*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_NOPULL/*0*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_S0D1/*0x600*/,&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_GPIO_PIN_NOSENSE/*0*/);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 i2c bit-bang driver gives no output</title><link>https://devzone.nordicsemi.com/thread/400786?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2022 10:06:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5efa3c7f-1f44-48a3-ab29-b7bcc11a50c6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is not a driver that is tested to work with Nordic devices, and since most people use the I2C hardware driver providing a working bit banged driver hasn&amp;#39;t really been a priority.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest following Simon&amp;#39;s workaround. If that doesn&amp;#39;t work for some reason please open a new ticket and we can have a look at it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 i2c bit-bang driver gives no output</title><link>https://devzone.nordicsemi.com/thread/400448?ContentTypeID=1</link><pubDate>Tue, 13 Dec 2022 16:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc56b20b-2da0-4cf7-8767-5990ae6fe038</guid><dc:creator>Carlos Solans</dc:creator><description>&lt;p&gt;I am impressed this problem has not been solved yet. I am working with nRF9160-DK and NCS 2.2.0 and have exactly the same problem. There is no output on the I2C pins P0.30 (SCL) and P0.29 (SDA).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 i2c bit-bang driver gives no output</title><link>https://devzone.nordicsemi.com/thread/254551?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 15:11:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6474594e-3553-434f-a722-2c602639e87c</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I tested the sample and I saw the same behavior as you. I connected a BME280 to the SCL and SDA pins and I could not see any activity (If I disconnected the BME280 I saw activity on the pins), but configuring them as output through&amp;nbsp;gpio_pin_configure() in main.c solved the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then I tried to modify &lt;a href="https://github.com/sigurdnev/fw-nrfconnect-nrf/blob/master/samples/nrf9160/i2c_scanner/src/main.c"&gt;this I2C_scanner&lt;/a&gt; example to use bit-banging instead. When looking at the results on the logic analyzer, it seemed to work fine. The BME280 sensor sent an ACK on address 0x76. However, the nR9160 could not read the signal and the code failed, which I believe is because the SDA pin is configured as an output&lt;/p&gt;
&lt;p&gt;Take a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38689/gpiote-in-inout-mode/149425#149425"&gt;this thread&lt;/a&gt;, which&amp;nbsp;shows how to enable the input buffer of a GPIO even if it&amp;#39;s configured to be output. This was for nRF52832, but I&amp;nbsp;assume it will work with&amp;nbsp;the nRF9160 as well. If you have problems implementing this, or it didn&amp;#39;t work, please ask, and I will look into it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 i2c bit-bang driver gives no output</title><link>https://devzone.nordicsemi.com/thread/253919?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2020 06:05:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41ec0797-2ff8-4a7e-8c32-24dbf35526dd</guid><dc:creator>Vlad T</dc:creator><description>[quote userid="72692" url="~/f/nordic-q-a/61949/nrf9160-i2c-bit-bang-driver-gives-no-output/253659"]You said that your code failed at&amp;nbsp;&lt;em&gt;i2c_gpio_set_sda()&amp;nbsp;&lt;/em&gt;and&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;em&gt;i2c_gpio_set_scl()&lt;/em&gt;, what do you mean by that? That the code stops the execution there or that the value written is not output on the SDA and SCL pins?&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;[/quote]
&lt;p&gt;The code seems to run just fine. Those functions do not block/stop or crash. &lt;/p&gt;
[quote userid="72692" url="~/f/nordic-q-a/61949/nrf9160-i2c-bit-bang-driver-gives-no-output/253659"]&lt;span&gt;&lt;/span&gt;&lt;span&gt;Have you checked with a logic analyzer to&amp;nbsp;confirm this?&lt;/span&gt;[/quote]
&lt;p&gt;Yes. There is literary no voltage level change on the pins.&lt;/p&gt;
&lt;p&gt;___&lt;/p&gt;
&lt;p&gt;After some trials I found out that if those pins are configured as OUTPUT, I do get a waveform but it fails to read the ACK. It could be a GPIO config problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 i2c bit-bang driver gives no output</title><link>https://devzone.nordicsemi.com/thread/253659?ContentTypeID=1</link><pubDate>Sun, 07 Jun 2020 21:07:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcf96440-6a0d-461f-a552-0d21772258f2</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;You said that your code failed at&amp;nbsp;&lt;em&gt;i2c_gpio_set_sda()&amp;nbsp;&lt;/em&gt;and&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;em&gt;i2c_gpio_set_scl()&lt;/em&gt;, what do you mean by that? That the code stops the execution there or that the value written is not output on the SDA and SCL pins?&amp;nbsp;&lt;/span&gt;&lt;span&gt;Have you checked with a logic analyzer to&amp;nbsp;confirm this?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 i2c bit-bang driver gives no output</title><link>https://devzone.nordicsemi.com/thread/252618?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 06:37:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e21b68a2-3b6f-430f-ab8c-5c0612912922</guid><dc:creator>Vlad T</dc:creator><description>&lt;p&gt;Thank you for your help!&lt;/p&gt;
&lt;p&gt;I am using NCS 1.2.0&amp;nbsp; installed by the Toolchain Manager.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the project.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/i2c_5F00_fujitsu_5F00_fram.zip"&gt;devzone.nordicsemi.com/.../i2c_5F00_fujitsu_5F00_fram.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vlad&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 i2c bit-bang driver gives no output</title><link>https://devzone.nordicsemi.com/thread/252599?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2020 19:44:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c905ded2-b27d-4746-8b20-bfbf41775f66</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;What version of NCS are you using? Could you upload your project in a zipped format, such that I can test it myself?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>