<?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>NCS SDK 2.7.0 uses I2C(SCL P0.10, SDA P0.09 ) failed</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116858/ncs-sdk-2-7-0-uses-i2c-scl-p0-10-sda-p0-09-failed</link><description>1. dts config file, I2C_SDA is configed GPIO P0.09/NFC1 , I2C_SCL is configed GPIO P0.10/NFC1, months ago, I&amp;#39;m using the old SDK, I also found that these pins configed as I2C function can not work, now the NCS SDK has the same problem, Could you help</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Dec 2024 15:18:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116858/ncs-sdk-2-7-0-uses-i2c-scl-p0-10-sda-p0-09-failed" /><item><title>RE: NCS SDK 2.7.0 uses I2C(SCL P0.10, SDA P0.09 ) failed</title><link>https://devzone.nordicsemi.com/thread/513258?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 15:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76f96a2a-577d-4063-b2e9-c3b182a41d49</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see. If you use the exact same configuration that worked on another board just with different pins, that should work here as well not that you have configures the NFC pins to function as GPIOs.. Can you measure the SDA and SCL lines with a logic analyzer so that we see the&amp;nbsp;signals (if there is any clock and data, and if so, what it looks like)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS SDK 2.7.0 uses I2C(SCL P0.10, SDA P0.09 ) failed</title><link>https://devzone.nordicsemi.com/thread/513030?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 15:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7df7fbdb-9cd2-4d39-9385-ccf985f8a4bc</guid><dc:creator>hugh512</dc:creator><description>&lt;p&gt;I got same error, below is the schematic about I2C, It&amp;#39;s&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
	i2c0_default: i2c0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SCL, 0, 10)&amp;gt;, &amp;lt;NRF_PSEL(TWIM_SDA, 0, 9)&amp;gt;;
			bias-pull-up;
		};
	};

	spi1_default: spi1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_MISO, 0, 14)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 15)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIM_SCK, 0, 17)&amp;gt;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1733153234815v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Another project, I uses P0.07 &amp;amp; P0.08, I2C works properly&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c0 {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;i2c0_default&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;;
	clock-frequency = &amp;lt;I2C_BITRATE_STANDARD&amp;gt;;
	max77734:max77734@48 {
		compatible = &amp;quot;i2c-device&amp;quot;;
		reg = &amp;lt;0x48&amp;gt;;
	};
};

&amp;amp;pinctrl {
	i2c0_default: i2c0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SCL, 0, 7)&amp;gt;, &amp;lt;NRF_PSEL(TWIM_SDA, 0, 8)&amp;gt;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS SDK 2.7.0 uses I2C(SCL P0.10, SDA P0.09 ) failed</title><link>https://devzone.nordicsemi.com/thread/513018?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 15:02:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58c326c3-f58a-40dd-ad95-bfb76f89be4c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see. It look slike you are also missing pullup configurations, unless you have external pull resistors? See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/102173/custom-52832-board-nrf-connect-2-4-0---twim-doesn-t-work-twi---does/438337"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS SDK 2.7.0 uses I2C(SCL P0.10, SDA P0.09 ) failed</title><link>https://devzone.nordicsemi.com/thread/513008?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 14:45:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40c3fce9-aba1-4028-803b-66476fa3847f</guid><dc:creator>hugh512</dc:creator><description>&lt;p&gt;I still get below exception:&lt;br /&gt;&lt;pre class="ui-code" data-mode="bat"&gt;Process: JLink.exe
[00:00:00.000,793] &amp;lt;inf&amp;gt; PHOENIX_IS31Fl3235A: I2C bus i2c@40003000 is ready!

[00:00:00.001,037] &amp;lt;err&amp;gt; PHOENIX_IS31Fl3235A: Could not write to I2C device mcu1

[00:00:00.001,098] &amp;lt;inf&amp;gt; main: Battery value: 9464
[00:00:00.001,159] &amp;lt;inf&amp;gt; main: MCU1 value: 404
[00:00:00.001,190] &amp;lt;inf&amp;gt; main: MCU2 value: 392&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;my dts file&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c0 {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;i2c0_default&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;;
	clock-frequency = &amp;lt;I2C_BITRATE_STANDARD&amp;gt;;
	is31fl3235a_part1: is31fl3235a_part1@78 {
		compatible = &amp;quot;i2c-device&amp;quot;;
		reg = &amp;lt;0x78&amp;gt;;
		status = &amp;quot;okay&amp;quot;;
	};
	// is31fl3235a_part2: is31fl3235a_part2@7B {
	// 	compatible = &amp;quot;i2c-device&amp;quot;;
	// 	reg = &amp;lt;0x7B&amp;gt;;
	// 	status = &amp;quot;okay&amp;quot;;
	// };
};

&amp;amp;uicr {
	nfct-pins-as-gpios;
};

&amp;amp;pinctrl {
	i2c0_default: i2c0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SCL, 0, 10)&amp;gt;, &amp;lt;NRF_PSEL(TWIM_SDA, 0, 9)&amp;gt;;
		};
	};

	spi1_default: spi1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_MISO, 0, 14)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 15)&amp;gt;,
					&amp;lt;NRF_PSEL(SPIM_SCK, 0, 17)&amp;gt;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;my c file&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
#define IS31FL3235A_REG_SHUTDOWN 0x00
#define IS31FL3235A_REG_GBL_CTL 0x4A
#define IS31FL3235A_REG_OUT_FREQ 0x4B
#define IS31FL3235A_REG_RST 0x4F

#define MCU1_NODE DT_NODELABEL(is31fl3235a_part1)

static const struct i2c_dt_spec mcu1_i2c = I2C_DT_SPEC_GET(MCU1_NODE);

// init
int is31fl3235a_init();

int is31fl3235a_init() {
    int err;
    if (!device_is_ready(mcu1_i2c.bus)) {
        LOG_ERR(&amp;quot;I2C bus %s is not ready!\n\r&amp;quot;, mcu1_i2c.bus-&amp;gt;name);
        return -1;
    } else {
        LOG_INF(&amp;quot;I2C bus %s is ready!\n\r&amp;quot;, mcu1_i2c.bus-&amp;gt;name);
    }

    uint8_t config[2] = {IS31FL3235A_REG_SHUTDOWN, 0x01};
    err = i2c_write_dt(&amp;amp;mcu1_i2c, config, sizeof(config));
    if (err &amp;lt; 0) {
        LOG_ERR(&amp;quot;Could not write to I2C device %s\n\r&amp;quot;, &amp;quot;mcu1&amp;quot;);
        return -1;
    }


    return 0;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS SDK 2.7.0 uses I2C(SCL P0.10, SDA P0.09 ) failed</title><link>https://devzone.nordicsemi.com/thread/512999?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 14:10:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31eca77e-a972-4350-85ac-87a65067ae71</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;To use the NFCT pins as GPIO&amp;#39;s without needing additional steps you can add this to&amp;nbsp; your board files or an overlay file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	  &amp;amp;uicr {
	      nfct-pins-as-gpios;
	  };&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS SDK 2.7.0 uses I2C(SCL P0.10, SDA P0.09 ) failed</title><link>https://devzone.nordicsemi.com/thread/512842?ContentTypeID=1</link><pubDate>Sat, 30 Nov 2024 13:23:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e692252d-b6a7-41af-9aba-c5fac9e12758</guid><dc:creator>hugh512</dc:creator><description>&lt;p&gt;I uses below commands to set NFCPINS to gpio, but I still got the I2C write exception, Any other things need to configure?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="bat"&gt;&amp;gt; nrfjprog --memrd 0x1000120C
0x1000120C: FFFFFFFF                              |....|
&amp;gt; nrfjprog --memwr 0x4001E504 --val 1
Parsing parameters.
Writing.
&amp;gt; nrfjprog --memwr 0x1000120C --val 0
Parsing parameters.
Writing.
&amp;gt; nrfjprog --reset
Applying system reset.
Run.
&amp;gt; nrfjprog --memrd 0x1000120C
0x1000120C: 00000000                              |....|
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1732972796195v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1732972823256v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS SDK 2.7.0 uses I2C(SCL P0.10, SDA P0.09 ) failed</title><link>https://devzone.nordicsemi.com/thread/512841?ContentTypeID=1</link><pubDate>Sat, 30 Nov 2024 12:25:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:326ed1f1-4667-48c2-a963-fe56746248e6</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Read the PS. Those pins need to be configured in UICR in order to allow them to work as GPIOs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>