<?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 clock stretching nRF54L / Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128578/i2c-clock-stretching-nrf54l-zephyr</link><description>This is nRF54L10 with Zephyr, SDK &amp;amp; toolchain both v3.02 on a custom board. 
 I am investigating I2C crashing on the 54L10. This happens during writing data to a MAX41462 radio IC via 12c, this involves writing a packet of 25 bytes @10kbps. I am sending</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Jul 2026 12:45:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128578/i2c-clock-stretching-nrf54l-zephyr" /><item><title>RE: I2C clock stretching nRF54L / Zephyr</title><link>https://devzone.nordicsemi.com/thread/569343?ContentTypeID=1</link><pubDate>Wed, 22 Jul 2026 12:45:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9dde222-198a-4846-88b7-de3758263b85</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;Sorry for the delay. No, I&amp;#39;m good thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock stretching nRF54L / Zephyr</title><link>https://devzone.nordicsemi.com/thread/569166?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2026 16:59:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c3c826b-2aeb-4c1f-bcaf-206501b75249</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Do you have any more queries I can help?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock stretching nRF54L / Zephyr</title><link>https://devzone.nordicsemi.com/thread/569128?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2026 17:39:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9882e06-77c8-4ddf-b97c-de00b35c28e7</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;OK, great. Looks like suspend/resume will do the trick for me. It&amp;#39;s only a one-off to toggle the SDA pin after powering up the chip (I control power using PMIC load switches).&lt;/p&gt;
&lt;p&gt;(PS Your system took a funny turn Monday, I had something like 8 consecutive &amp;quot;An engineer has been assigned&amp;quot; notifications to this ticket)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock stretching nRF54L / Zephyr</title><link>https://devzone.nordicsemi.com/thread/569127?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2026 17:30:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:914e95d4-e889-418b-b0fa-a625376f7a34</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;According to datasheet &amp;#39;&amp;#39;&lt;/p&gt;
&lt;p&gt;These registers and their configurations are only used when TWIM is enabled, and retained while the device is in System ON mode. When the peripheral is disabled, the pins behave as regular GPIOs and are configured according to their respective OUT bit field and PIN_CNF[n] register. Configure registers PSEL.SCL and PSEL.SDA when TWIM is disabled.&lt;/p&gt;
&lt;p&gt;Only one peripheral can be assigned to drive a GPIO pin at a time. If more than one peripheral is assigned to a GPIO pin, it could result in unpredictable behavior.&lt;/p&gt;
&lt;p&gt;When TWIM is in System OFF mode or disabled, the pins using TWIM must be configured by the GPIO peripheral according to the following table to ensure correct pin behavior.&amp;#39;&amp;#39; it&amp;#39;s possible to control manually SDA and SCL line while interface is configured for i2c/twi.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can read this case &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/127371/nrf54l15-i2c-and-gpio-sharing-pin-control"&gt;(+) nRF54L15 I2C and GPIO sharing pin control - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone&lt;/a&gt;to get idea how to initiate this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock stretching nRF54L / Zephyr</title><link>https://devzone.nordicsemi.com/thread/568753?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2026 08:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d634567a-8ae9-4539-84eb-0bdeea9d614d</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;It was the peripheral holding the clock line. I have rewritten my code to use burst writes&amp;nbsp;instead of individual register writes and it&amp;#39;s a lot happier now. I can see the clock stretching working on the LA so all good.&lt;/p&gt;
&lt;p&gt;I do still need to explore the possibility of manually controlling the SDA&amp;nbsp; and/or SCL lines whilst the interface is configured for i2c/twi. Would you prefer I raised a separate ticket for that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock stretching nRF54L / Zephyr</title><link>https://devzone.nordicsemi.com/thread/568566?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2026 16:54:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ffa9b9d-9b4a-4af6-a98e-196854a94056</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;#39;&amp;#39;Run at&amp;nbsp;&lt;/span&gt;&lt;strong&gt;100 kbps minimum&lt;/strong&gt;&lt;span&gt;&amp;nbsp;with the TWIM peripheral&amp;#39;&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The supported bit rate of TWIM is 100kbos, 400kbps, 100 kbps, which I mentioned in my previous reply with the source link. This frequency is enforced at the Zephyr driver level. You will configure this in the device tree file(overlay file). For example:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;i2c20 {
    status = &amp;quot;okay&amp;quot;;
    pinctrl-0 = &amp;lt;&amp;amp;i2c20_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;i2c20_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
    clock-frequency = &amp;lt;I2C_BITRATE_STANDARD&amp;gt;;  /* 100 kbps */

    /* Example sensor device */
    my_sensor: sensor@48 {
        compatible = &amp;quot;vendor,sensor&amp;quot;;
        reg = &amp;lt;0x48&amp;gt;;
        status = &amp;quot;okay&amp;quot;;
    };
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When we set &amp;#39;&amp;#39;I2C_BITRATE_STANDARD&amp;#39;&amp;#39; as clock frequency, we set it as 100kbps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;#39;&amp;#39;&lt;strong&gt;Do you mean enabled as in kconfig/devicetree, or enabled by running&amp;nbsp; i2c_configure()? Also, I&amp;#39;d rather not be talking directly to registers if possible while using Zephyr.&amp;#39;&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;No, these&amp;nbsp;&lt;span&gt;PSEL.SCL and PSEL.SDA registers are not configured in the kconfig or not by running i2c_configure(). This is set in the pincntrl file of board file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;for example:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
    /omit-if-no-ref/ i2c21_default: i2c21_default {
        group1 {
            psels = &amp;lt;NRF_PSEL(TWIM_SCL, 1, 11)&amp;gt;,
                    &amp;lt;NRF_PSEL(TWIM_SDA, 1, 12)&amp;gt;;
            bias-pull-up;
        };
    };

    /omit-if-no-ref/ i2c21_sleep: i2c21_sleep {
        group1 {
            psels = &amp;lt;NRF_PSEL(TWIM_SCL, 1, 11)&amp;gt;,
                    &amp;lt;NRF_PSEL(TWIM_SDA, 1, 12)&amp;gt;;
            low-power-enable;
        };
    };
};

&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now getting back to the clock stretching of TWIM again, since it is supported in TWIM, it may possible to set the bit rate below 100kbps according to this old case&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/95455/i2c-frequencies-below-100kbps"&gt;(+) I2C frequencies below 100kbps - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone&lt;/a&gt;. I will talk to team to be sure.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;#39;&amp;#39;&lt;span&gt;The MAX41462 has a 4 byte FIFO buffer and implements flow control by I2C clock stretching which seems to be causing the crash - using a logic analyser I can see the clock signal being held low after 8 bits of data transfer.&amp;nbsp;&amp;#39;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Could you please share the error log and the output from logic analyser?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;BR&lt;br /&gt;Kazi&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock stretching nRF54L / Zephyr</title><link>https://devzone.nordicsemi.com/thread/568562?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2026 15:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba6a9f26-8f73-4a1a-9c67-158eba6e1ed0</guid><dc:creator>Nick_RA</dc:creator><description>[quote userid="108933" url="~/f/nordic-q-a/128578/i2c-clock-stretching-nrf54l-zephyr/568543"]You can try at least 100kbps as a first try to see if that helps.[/quote]
&lt;p&gt;OK, but I don&amp;#39;t want to blindly try things, I want to understand what&amp;#39;s what.&lt;/p&gt;
&lt;p&gt;Is I2C clock stretching supported? Can I configure a timeout by code, kconfig etc?&lt;/p&gt;
[quote userid="108933" url="~/f/nordic-q-a/128578/i2c-clock-stretching-nrf54l-zephyr/568543"]These registers and their configurations are only used when TWIM is enabled[/quote]
&lt;p&gt;Do you mean enabled as in kconfig/devicetree, or enabled by running&amp;nbsp; i2c_configure()? Also, I&amp;#39;d rather not be talking directly to registers if possible while using Zephyr.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C clock stretching nRF54L / Zephyr</title><link>https://devzone.nordicsemi.com/thread/568543?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2026 12:37:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dd0ef49-a100-4988-a619-c78a433893fc</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;#39;&amp;#39;&lt;span&gt;I am investigating I2C crashing on the 54L10. This happens during writing data to a MAX41462 radio IC via 12c, this involves writing a packet of 25 bytes @10kbps.&amp;#39;&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The supported baudrate for nRF54l05/10/15 is&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;#39;&amp;#39;&lt;/span&gt;The main features of TWIM are the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I&lt;sup&gt;2&lt;/sup&gt;C compatible&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;for 100 kbps and 400 kbps&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;1000 kbps bit rate support for selected pull-up resistor/bus capacitance combinations&lt;/li&gt;
&lt;li&gt;Supported baud rates:
&lt;ul&gt;
&lt;li&gt;100 kbps&lt;/li&gt;
&lt;li&gt;400 kbps&lt;/li&gt;
&lt;li&gt;1000 kbps&amp;#39;&amp;#39;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;source:&lt;a href="https://docs.nordicsemi.com/r/bundle/ps_nrf54l15/page/twim.html"&gt;TWIM — I2C compatible two-wire interface controller with EasyDMA • nRF54L15 | nRF54L10 | nRF54L05 Datasheet • Technical Documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can try at least 100kbps as a first try to see if that helps.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;#39;&amp;#39;&lt;span&gt;Incidentally the MAX41462 requires SDA to be toggled after power up. Is it OK to configure the line as a GPIO output and toggle before running i2c_configure() ?&amp;#39;&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It should be possible to implement if TWIM is disabled. &amp;#39;&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The SCL and SDA signals are mapped to physical pins using the PSEL.SCL and PSEL.SDA registers.&lt;/p&gt;
&lt;p&gt;These registers and their configurations are only used when TWIM is enabled, and retained while the device is in System ON mode. When the peripheral is disabled, the pins behave as regular GPIOs and are configured according to their respective OUT bit field and PIN_CNF[n] register. Configure registers PSEL.SCL and PSEL.SDA when TWIM is disabled.&amp;#39;&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/r/bundle/ps_nrf54l15/page/twim.html-concept_x2r_gxp_xr"&gt;TWIM pin configuration • nRF54L15 | nRF54L10 | nRF54L05 Datasheet • Technical Documentation&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;br /&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>