<?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 delay between address and read</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21241/twi-delay-between-address-and-read</link><description>Hi,
I am using TWI on a 52832 (sdk12.2) and am having problems with reading data. The slave chip that can take up to 60uS (8 bus clock cycles) between to set up data after receiving the address of a read request. Currently, this delay is about 27uS.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Sep 2020 11:28:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21241/twi-delay-between-address-and-read" /><item><title>RE: TWI delay between address and read</title><link>https://devzone.nordicsemi.com/thread/268268?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2020 11:28:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:982b2c60-eedb-4a83-b7fc-2e9a6c1a763c</guid><dc:creator>Sridhar Jonnavittula</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I integrated my project in eddystone and TWI read work with out delay but if I integrate into HTS delay of 1sec after TWI init.&lt;/p&gt;
&lt;p&gt;Can you please tell this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI delay between address and read</title><link>https://devzone.nordicsemi.com/thread/83121?ContentTypeID=1</link><pubDate>Fri, 20 Oct 2017 20:58:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7faf04e-b51c-4a5a-ace6-e261811808bc</guid><dc:creator>a.o.</dc:creator><description>&lt;p&gt;I don&amp;#39;t have a logic analyzer trace handy.    I ended up retrying the read, and later found reference to the sensor chip not really supporting 100KHz clock.    Can I go slower on this one port?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI delay between address and read</title><link>https://devzone.nordicsemi.com/thread/83116?ContentTypeID=1</link><pubDate>Mon, 10 Apr 2017 20:56:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e4c788a-1bc6-479e-ae4d-d871e49a6789</guid><dc:creator>a.o.</dc:creator><description>&lt;p&gt;I added some bit flipping to see if I had software control in the appropriate part of the transfer, but I couldn&amp;#39;t find a spot where the delay could be inserted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI delay between address and read</title><link>https://devzone.nordicsemi.com/thread/83117?ContentTypeID=1</link><pubDate>Mon, 10 Apr 2017 15:42:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17484e0e-7590-4b93-8ef1-36b860d1641b</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;Interesting. Perhaps I will have to rework my own TWI code once I integrate it to a BLE project...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI delay between address and read</title><link>https://devzone.nordicsemi.com/thread/83115?ContentTypeID=1</link><pubDate>Mon, 10 Apr 2017 13:34:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fa6d738-1486-41b7-ba44-079c8c6277a9</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I would say never play with &lt;code&gt;nrf_delay_ms&lt;/code&gt; or &lt;code&gt;nrf_delay_us&lt;/code&gt; (or any other busy-loop function calling NOP instructions) in real nRF5x FW outside some auxiliary debug code because that can kill timing which is absolute key for BLE stack and other fueatures...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI delay between address and read</title><link>https://devzone.nordicsemi.com/thread/83114?ContentTypeID=1</link><pubDate>Mon, 10 Apr 2017 13:28:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2ef6365-e905-4463-8fec-a6b1bdf5c959</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;Try adding an &lt;code&gt;nrf_delay_ms()&lt;/code&gt; command in between the TWI write and read commands. I had a similar problem to this before and adding a few delays in and around these function calls fixed it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI delay between address and read</title><link>https://devzone.nordicsemi.com/thread/83120?ContentTypeID=1</link><pubDate>Sun, 09 Apr 2017 17:35:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e48256af-616e-463a-ba1e-8a7fe57dd9d4</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;It doesn&amp;#39;t make much sense. If TWI (I2C) Slave issues ACK and doesn&amp;#39;t stretch SCL then it should be ready to process next character. Do you have any trace from logical analyzer showing what is the timing on both lines, what is SCL frequency during character transport etc.?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI delay between address and read</title><link>https://devzone.nordicsemi.com/thread/83119?ContentTypeID=1</link><pubDate>Sun, 09 Apr 2017 16:13:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:375b3a2a-e761-4e00-8776-96adf280f698</guid><dc:creator>a.o.</dc:creator><description>&lt;p&gt;Thanks for the quick response.&lt;/p&gt;
&lt;p&gt;Yes, the TWI is the master.    Both the slave and the master (Nordic) claim to be clock stretching, but after an application engineer for the slave looked at the waveforms on a scope, he suspects that the timing is too short, causing intermittent incorrect reads of the slave&amp;#39;s registers.    What is interesting, is that the cases I have caught are the same value, independent of the register address.    The suggestion was to add an artificial delay between ack and the data.&lt;/p&gt;
&lt;p&gt;I added some bit flipping of an I/O pin to see where I had software control, and did not find a place where there was software access between the address/ack of the read, and the clock.&lt;/p&gt;
&lt;p&gt;Thoughts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI delay between address and read</title><link>https://devzone.nordicsemi.com/thread/83118?ContentTypeID=1</link><pubDate>Sun, 09 Apr 2017 13:15:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:923eef17-a6f4-4deb-b124-171a2a48bcff</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;nRF52 is TWI master? If slave needs more time to process/prepare data then it should use clock stretching (hold it low), nRF52 TWI master peripheral block supports it and transport of next character should be delayed until slave releases SCL line. Also do both master and slave use same clock frequency?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>