<?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 slowdown with bus busy</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89250/twi-slowdown-with-bus-busy</link><description>Hi, 
 in my project I use the nRF52840 microcontroller as the master I2C device. 
 Sometimes the TWI peripheral SDA line is forced to a low value by the slave device. This is a slave device error. 
 I use the functions nrf_drv_twi_tx and nrf_drv_twi_rx</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Jul 2022 09:44:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89250/twi-slowdown-with-bus-busy" /><item><title>RE: TWI slowdown with bus busy</title><link>https://devzone.nordicsemi.com/thread/376158?ContentTypeID=1</link><pubDate>Fri, 08 Jul 2022 09:44:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fdb3b94-bd1c-4f08-b8ce-c62747ca11e0</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Looking at your code snippet, I can not find any timeouts mechanism in the driver. Can you check the logic traces of SDA and SCL pin?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI slowdown with bus busy</title><link>https://devzone.nordicsemi.com/thread/374463?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 07:54:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:890357de-e478-42c1-bddf-6122a7f8a784</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The version of the SDK is 17.1.0. I use the following code to initialize the device:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void ext_twi_init(void)
{
    ret_code_t err_code;

    const nrf_drv_twi_config_t twi_config = {
       .scl                = EXT_SCL_PIN,
       .sda                = EXT_SDA_PIN,
       .frequency          = 0x00520000UL,
       .interrupt_priority = APP_IRQ_PRIORITY_HIGH,
       .clear_bus_init     = false
    };

    err_code = nrf_drv_twi_init(&amp;amp;m_ext_twi, &amp;amp;twi_config, NULL, NULL);
    APP_ERROR_CHECK(err_code);

    nrf_drv_twi_enable(&amp;amp;m_ext_twi);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;then use the following functions to transmit and receive data:&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t TwiTx(uint8_t address, uint8_t const * p_data, uint8_t length)
{
    ret_code_t err_code = nrf_drv_twi_tx(&amp;amp;m_ext_twi, address, p_data, length, false);
    APP_ERROR_CHECK(err_code);

    return err_code;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t ExtTwiRx(uint8_t address, uint8_t * p_data, uint8_t length)
{
    ret_code_t err_code = nrf_drv_twi_rx(&amp;amp;m_ext_twi, address, p_data, length);
    APP_ERROR_CHECK(err_code);

    return err_code;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI slowdown with bus busy</title><link>https://devzone.nordicsemi.com/thread/374421?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2022 22:28:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3fd6fc7-45fd-4cbd-ac4d-17eb6b09a75c</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which SDK version you are using and the code you call from the application? We also prefer to have the information of the logic trace of the pins.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&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;Kazi Afroza Sultana&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI slowdown with bus busy</title><link>https://devzone.nordicsemi.com/thread/374064?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 07:55:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d864e39-b159-4998-a1df-248734f105aa</guid><dc:creator>Stefano1984</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;is it possible to reduce the timeout period?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI slowdown with bus busy</title><link>https://devzone.nordicsemi.com/thread/374052?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 06:19:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:532c34c7-c102-4f0c-83ea-7db89f12d80b</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;TWI (M) peripheral depends on the STOP condition that should be present on the BUS in order to generate the STOPPED event for both read and write condition and to complete the transfer.&amp;nbsp;&lt;br /&gt;When SDA is tied to Ground (GND), it is not possible to generate the STOP condition on the bus. Therefore it causes peripheral to wait for this condition and probable outcome is timeout.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>