<?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>repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16454/repeated-start-for-twi-master-rx-operation</link><description>Hi, 
 I am using nRF52 as a twi mater to read some data from a touch sensor, I want to perform below operation: 
 twi start 
 twi rx register_a for few bytes 
 repeated start 
 twi rx register_c for few bytes 
 repeated start 
 ... ... 
 twi rx</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Jun 2020 09:01:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16454/repeated-start-for-twi-master-rx-operation" /><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/252654?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 09:01:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:118da1ab-b8c6-48f4-bf3f-b7ef39251517</guid><dc:creator>Aurele</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m also facing the same issue since i want to interface with the azotech IQS263. The sensor reacts on the first stop condition it detects&amp;nbsp;and close its communication window so i absolutly need to make a restart after a I2C read if i want to read several registers within a communication window.&lt;/p&gt;
&lt;p&gt;For now, i&amp;#39;m stuck !&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/140187?ContentTypeID=1</link><pubDate>Mon, 16 Jul 2018 11:23:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad18abd7-9760-4710-9ce2-622b6b82f8ae</guid><dc:creator>JW de Wit</dc:creator><description>&lt;p&gt;I have got the same problem (azoteq IQS360A touch chip).&lt;/p&gt;
&lt;p&gt;I got it solved by using the PPI to generate a STARTTX tastk on an BB event.&lt;/p&gt;
&lt;p&gt;PS. I don&amp;#39;t use the SDK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/62979?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2017 23:28:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a925016-ce39-4f0b-914b-8dc0afa35e31</guid><dc:creator>Yu Peng</dc:creator><description>&lt;p&gt;In short, after retrieving the last rxd byte you should run
NRF_TWI0-&amp;gt;TASKS_SUSPEND = 1;&lt;/p&gt;
&lt;p&gt;Then reset the twi hardware
nrf_drv_twi_uninit(&amp;amp;m_twi);&lt;/p&gt;
&lt;p&gt;and reconfigure it through
nrf_drv_twi_init(&amp;amp;m_twi, &amp;amp;twi_zeus2_config, NULL, NULL);
nrf_drv_twi_enable(&amp;amp;m_twi);&lt;/p&gt;
&lt;p&gt;lastly
NRF_TWI0-&amp;gt;TASKS_RESUME = 1;	&lt;/p&gt;
&lt;p&gt;before starting the next rx transaction&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/62974?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2016 15:06:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8501422-80e1-4d20-81aa-a876646f8384</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;maybe trough direct manipulation of registers/ppi tasks but AFAIK there&amp;#39;s no &amp;#39;easy way&amp;#39; of doing that in SDK11 via  library or driver code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/62976?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2016 14:33:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eae48837-227b-4a87-8817-4ee034dc1a9a</guid><dc:creator>George Leung</dc:creator><description>&lt;p&gt;It may be unusual but that is what I want, instead of a stop, I need a repeated start for next read sequence. Is that any tricks I can do that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/62975?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2016 14:10:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9e3f49d-9ce9-4342-bd78-5c499f1c753e</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;As far as I know SDK doesn&amp;#39;t support &amp;quot;no stop RX&amp;quot;. Also I haven&amp;#39;t seen use case for such feature in real life and I do quite a lot of I2C peripheral drivers. Are you sure that no stop condition after rx is really what you want?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/62977?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2016 13:46:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b6d4d53-77b5-4b23-aba4-a6f720950490</guid><dc:creator>George Leung</dc:creator><description>&lt;p&gt;don&amp;#39;t care too much about the term &amp;quot;register&amp;quot;, it just one byte memory address of the touch sensor which I am going to read.
nrf_drv_twi_tx with no_stop is good but how about nrf_drv_twi_rx? I don&amp;#39;t want any stop between each read operation. As I send a stop the sensor chip will perform next measurement which is not desire.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/62972?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2016 12:44:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6012563-9655-4028-8b61-b115294a6663</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;I2C protocol doesn&amp;#39;t have a concept of registers. All bytes you transmit are raw data and peripheral interprets them according to its specification. Unless your I2C device is very weird and uncommon, You really want to do following seq:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;TX: register 1 OPcode
Repeated start
RX: register 1 contents
STOP
repeat for register 2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for info how to do it consult &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/hardware_driver_twi.html?cp=4_0_0_2_18"&gt;infocenter.nordicsemi.com/.../hardware_driver_twi.html&lt;/a&gt; and use either blocking calls of &lt;code&gt;nrf_drv_twi_tx&lt;/code&gt; with &lt;code&gt;no_stop&lt;/code&gt; set to true + &lt;code&gt;nrf_drv_twi_rx&lt;/code&gt; or async &lt;code&gt;NRF_DRV_TWI_XFER_TXRX&lt;/code&gt;. There are SDK examples which show this in more detail.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/62978?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2016 12:17:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68bd330c-6b46-4a5f-8084-54b38baba747</guid><dc:creator>George Leung</dc:creator><description>&lt;p&gt;Let&amp;#39;s me provide some more detail about the operation, the sequence should be that:
Start Addr+W ACK registerA ACK Start Addr+R ACK data1 ACK datan NACK Start Addr+W ACK registerC ACK Start Addr+R ACK data1 ACK data...n NACK .... Start Addr+W ACK registerX ACK Start Addr+R ACK data1 ACK datan NACK Stop
The major issue is I don&amp;#39;t want to send a stop when last byte of current register read. Is it possible?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: repeated start for twi master rx operation</title><link>https://devzone.nordicsemi.com/thread/62973?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2016 08:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:823dae89-914a-4db7-8ba1-53efe5cdacc0</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;if &lt;code&gt;register X&lt;/code&gt; means that you have to send some opcode to the I2C slave then you are actually making a write operation so just use TX_RX xfer in either app_twi of nrf_drv_twi_xfer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>