<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I3C1 in Zephyr on MIMXRT595S in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/I3C1-in-Zephyr-on-MIMXRT595S/m-p/2330719#M5018</link>
    <description>&lt;P&gt;The workaround is just configuring the SKEW to 1, which I tried before already. This did not work.&lt;BR /&gt;&lt;BR /&gt;I ended up playing a bit more with the clock dividers and baud rate dividers. It appears that the I3C1 is more sensitive to frequencies above 400kHz. My previous dividers lead to a frequency of 412.5kHz which works on I3C0 but does not work on I3C1. Now I changed the dividers to achieve exactly 400kHz and both are working fine now.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Mar 2026 13:42:47 GMT</pubDate>
    <dc:creator>mhummels</dc:creator>
    <dc:date>2026-03-11T13:42:47Z</dc:date>
    <item>
      <title>I3C1 in Zephyr on MIMXRT595S</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/I3C1-in-Zephyr-on-MIMXRT595S/m-p/2327262#M4972</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently trying to get I3C1 running in I2C mode on a custom board with Zephyr. The custom board uses the MIMXRT595SFFOC. If I configure the same pins (PIO3_1 and PIO3_2) to Flexcomm0 as I2C, the bus works fine and the sensor (LPS22HH) with ST zephyr driver responds successfully. It works also fine when I attach the same sensor to the I3C0 bus and configure it in Zephyr like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;sensor_i3c: &amp;amp;i3c0 {
	status = "okay";
	pinctrl-0 = &amp;lt;&amp;amp;pinmux_i3c0&amp;gt;;
	pinctrl-names = "default";
	i2c-scl-hz = &amp;lt;400000&amp;gt;;
	i3c-scl-hz = &amp;lt;8250000&amp;gt;;
	i3c-od-scl-hz = &amp;lt;2500000&amp;gt;;
	zephyr,disabling-power-states = &amp;lt;&amp;amp;suspend&amp;gt;;

	lps22hh: lps22hh@5c0000000000000050 {
		compatible = "st,lps22hh";
		status = "okay";
		reg = &amp;lt;0x5c 0x0 0x50&amp;gt;;
		odr = &amp;lt;LPS22HH_DT_ODR_25HZ&amp;gt;;
	};
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The pinmux looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;pinmux_i3c0: pinmux_i3c0 {
	group0 {
		pinmux = &amp;lt;I3C0_SCL_PIO2_29&amp;gt;,
		         &amp;lt;I3C0_SDA_PIO2_30&amp;gt;;
		input-enable;
		slew-rate = "normal";
		drive-strength = "high";
	};
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;With that setup working, I attached the same sensor to the I3C1 Pins again (where it works successfully when configured as Flexcomm0). Then I added this configuration to the device tree:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;amp;peripheral {
	i3c1: i3c@37000 {
		compatible = "nxp,mcux-i3c";
		reg = &amp;lt;0x37000 0x1000&amp;gt;;
		interrupts = &amp;lt;67 0&amp;gt;;
		clocks = &amp;lt;&amp;amp;clkctl1 MCUX_I3C_CLK&amp;gt;;
		clk-divider = &amp;lt;2&amp;gt;;
		clk-divider-slow = &amp;lt;1&amp;gt;;
		clk-divider-tc = &amp;lt;1&amp;gt;;
		status = "disabled";
		#address-cells = &amp;lt;3&amp;gt;;
		#size-cells = &amp;lt;0&amp;gt;;
	};
};

sensor_i3c1: &amp;amp;i3c1 {
	status = "okay";
	pinctrl-0 = &amp;lt;&amp;amp;pinmux_i3c1&amp;gt;;
	pinctrl-names = "default";
	i2c-scl-hz = &amp;lt;400000&amp;gt;;
	i3c-scl-hz = &amp;lt;8250000&amp;gt;;
	i3c-od-scl-hz = &amp;lt;2500000&amp;gt;;
	zephyr,disabling-power-states = &amp;lt;&amp;amp;suspend&amp;gt;;

	lps22hh: lps22hh@5c0000000000000050 {
		compatible = "st,lps22hh";
		status = "okay";
		reg = &amp;lt;0x5c 0x0 0x50&amp;gt;;
		odr = &amp;lt;LPS22HH_DT_ODR_25HZ&amp;gt;;
	};
};&lt;/LI-CODE&gt;&lt;P&gt;Pinmux:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;pinmux_i3c1: pinmux_i3c1 {
	group0 {
		pinmux = &amp;lt;I3C1_SCL_PIO3_1&amp;gt;,
			 &amp;lt;I3C1_SDA_PIO3_2&amp;gt;;
		input-enable;
		slew-rate = "normal";
		drive-strength = "high";
	};
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this configuration, the sensor is still responding on the bus, as the scope shows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="tek00000.png" style="width: 800px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/378453i5A971F7CA3334D8D/image-size/large?v=v2&amp;amp;px=999" role="button" title="tek00000.png" alt="tek00000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the I3C1 peripheral does not receive any byte on the bus, though the response from sensor is there. This leads to a timeout in&amp;nbsp;mcux_i3c_do_one_xfer_read as the RXPEND interrupt is not firing.&lt;/P&gt;&lt;P&gt;What I already did to debug this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I checked the NVIC configuration for the I3C1 IRQ. This is correct, as during initialization of the I3C driver the ISR is called multiple times because of the MERRWARN OREAD flag.&lt;/LI&gt;&lt;LI&gt;I checked all relevant I3C1 registers (MCONFIG, MCTRL, MSTATUS, MINTSET, MERRWARN, MDMACTRL) during init, write and read. It looks the same as on I3C0 when sensor is working. DMA is not used, so received bytes should be available in the peripherals FIFO.&lt;/LI&gt;&lt;LI&gt;I also played with the SKEW setting as the ERRATA was mentioning it may be necessary for I2C in some cases.&lt;/LI&gt;&lt;LI&gt;I also checked the IOPCTL registers for the 2 Pins to make sure they are right. Looks exactly the same as on I3C1, too.&lt;/LI&gt;&lt;LI&gt;Then I thought, what if the interrupt anyway does not work. So I modified the i3c_mcux.c driver like this. This way it does not use the interrupt for receiving and just reads what it gets in the FIFO. There is not a single byte getting received.&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="c"&gt;static int mcux_i3c_do_one_xfer_read(I3C_Type *base, struct mcux_i3c_data *data, uint8_t *buf,
				     uint8_t buf_sz, bool ibi)
{
	int ret = 0;
	int offset = 0;

	while (offset &amp;lt; buf_sz) {
		/*
		 * Transfer data from FIFO into buffer. Read
		 * in a loop until data is unavailable in the FIFO.
		 */
		uint16_t count = 0;
		while (offset &amp;lt; buf_sz &amp;amp;&amp;amp; mcux_i3c_fifo_rx_count_get(base) == 0) {
			k_usleep(10);
			count++;
			if (count &amp;gt; 500) {
				ret = -ETIMEDOUT;
				break;
			}
		}
		buf[offset++] = (uint8_t)base-&amp;gt;MRDATAB;
		/*
		 * If timed out, we abort the transaction.
		 */
		if ((mcux_i3c_has_error(data) &amp;amp; I3C_MERRWARN_TIMEOUT_MASK) || ret) {
			ret = -ETIMEDOUT;

			/* for ibi, ignore timeout err if any bytes were
			 * read, since the code doesn't know how many
			 * bytes will be sent by device.
			 */
			if (ibi &amp;amp;&amp;amp; offset) {
				ret = offset;
			} else {
				LOG_ERR("Timeout error");
			}
			break;
		}
	}

	/* If no errors, then return the number of bytes read */
	if (ret &amp;gt; 0) {
		ret = offset;
	}

	return ret;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As all of this is happening in the init of the sensor driver already, I also do not see any logs on the UART, as the logging module is not initialized at that point. However, the debugger shows that it is just idling in that loop until it breaks because of the count variable getting too high. I also verified that driver changes on I3C0 to ensure it keeps working.&lt;BR /&gt;&lt;BR /&gt;So currently it looks to me that the I3C1 peripheral is plainly not receiving any bytes to the FIFO and I have no clue why. Signal on the scope looks good, and similar to the signal on I3C0. However there are some small delays between each byte on I3C0 which is not present on I3C1.&lt;BR /&gt;&lt;BR /&gt;I hope you have an idea what could prevent the I3C1 peripheral from receiving a byte while the bus signal looks correct.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;mhummels&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 17:38:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/I3C1-in-Zephyr-on-MIMXRT595S/m-p/2327262#M4972</guid>
      <dc:creator>mhummels</dc:creator>
      <dc:date>2026-03-05T17:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: I3C1 in Zephyr on MIMXRT595S</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/I3C1-in-Zephyr-on-MIMXRT595S/m-p/2327369#M4974</link>
      <description>&lt;P&gt;Well, I did some more digging on this one. My journey took me to try the MCUXpresso SDK on the EVK to see if I3C1 is working there. With 100kBaud the I3C1 was doing proper I2C, sensor was responding and the I3C1 was able to read it properly. Then as this worked, I built a minimum Zephyr example with I3C1 to run on the EVK. This surprisingly also worked with a baud rate of 100000 kHz. So I took the next step and ran that example on the custom board. Tada -&amp;gt; Sensor working and receiving on I3C1 is not an issue.&lt;/P&gt;&lt;P&gt;As soon as I tried to bring the Frequency back up to 400kHz, it suddenly stops reading the data, though the sensor is answering correctly, as shown in the scope image. Why is the I3C1 peripheral not able to keep up with the read on I2C mode 400k?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 22:20:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/I3C1-in-Zephyr-on-MIMXRT595S/m-p/2327369#M4974</guid>
      <dc:creator>mhummels</dc:creator>
      <dc:date>2026-03-05T22:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: I3C1 in Zephyr on MIMXRT595S</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/I3C1-in-Zephyr-on-MIMXRT595S/m-p/2328095#M4991</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/260457"&gt;@mhummels&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;There is a known errata (ERR051617) for the I3C peripheral that affects I2C operation. Please ensure that you apply the required workaround to the I3C1 instance; this workaround is described on this&amp;nbsp;&lt;A href="https://www.nxp.com/docs/en/errata/RT500_2P43B.pdf" target="_self"&gt;page&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Additionally, to help determine whether the issue is related to the Zephyr configuration, could you repeat the same test you performed earlier in MCUxpresso but using a 400 kHz I2C frequency?&lt;BR /&gt;&lt;BR /&gt;Finally, the RM provides detailed information on the I3C peripheral. In section 52.3.2.1, it explains the standard method for reading and writing I2C messages. I highly recommend reviewing this section to better understand the module’s operation and identify any potential configuration issues.&lt;BR /&gt;&lt;BR /&gt;BR&lt;BR /&gt;Habib&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 18:59:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/I3C1-in-Zephyr-on-MIMXRT595S/m-p/2328095#M4991</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2026-03-06T18:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: I3C1 in Zephyr on MIMXRT595S</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/I3C1-in-Zephyr-on-MIMXRT595S/m-p/2330719#M5018</link>
      <description>&lt;P&gt;The workaround is just configuring the SKEW to 1, which I tried before already. This did not work.&lt;BR /&gt;&lt;BR /&gt;I ended up playing a bit more with the clock dividers and baud rate dividers. It appears that the I3C1 is more sensitive to frequencies above 400kHz. My previous dividers lead to a frequency of 412.5kHz which works on I3C0 but does not work on I3C1. Now I changed the dividers to achieve exactly 400kHz and both are working fine now.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 13:42:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/I3C1-in-Zephyr-on-MIMXRT595S/m-p/2330719#M5018</guid>
      <dc:creator>mhummels</dc:creator>
      <dc:date>2026-03-11T13:42:47Z</dc:date>
    </item>
  </channel>
</rss>

