<?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 reading the same data from registers</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49251/twi-reading-the-same-data-from-registers</link><description>Hi, 
 The problem statement mentioned below. 
 What we are trying to do is Read Light value from the MAX44009 sensor on the TWI interface. 
 Looking at the data sheet for the MAX44009, the device freezes updates of the light value (registers 0x03 and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jul 2019 09:23:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49251/twi-reading-the-same-data-from-registers" /><item><title>RE: TWI reading the same data from registers</title><link>https://devzone.nordicsemi.com/thread/199969?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 09:23:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d544d2d3-73b1-4e0b-8443-91acfe978663</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. I was out of office for a couple of weeks, and we are in general a bit short staffed during the summer.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how to do this exactly, other than using the events and tasks, as described &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Ftwim.html&amp;amp;cp=3_0_0_5_30_3&amp;amp;anchor=concept_ebf_cwp_xr" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;, and using &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Ftwim.html&amp;amp;cp=3_0_0_5_30_3&amp;amp;anchor=concept_ebf_cwp_xr" rel="noopener noreferrer" target="_blank"&gt;PPI&lt;/a&gt; to trigger the next task based on the events.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The PPI may not be too&amp;nbsp; easy to get your head around. You can either use the ppi drivers that are used in the SDK\examples\peripheral\ppi, or you can use the PPI registers directly, like it is done in the example attached in my first reply in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/47140/100us-counter" rel="noopener noreferrer" target="_blank"&gt;this ticket&lt;/a&gt;. Note that this is not TWI, but an example that uses PPI and a timer to generate PWM signals. The timer events triggers the GPIOTE tasks, so in your case, you would want the TWI events to trigger the next TWI tasks.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI reading the same data from registers</title><link>https://devzone.nordicsemi.com/thread/197144?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 12:54:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36ab1c8d-7692-4963-843a-9ffd3151e723</guid><dc:creator>sridharnaidu</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can you give input on implementing the mentioned&amp;nbsp; Master repeated start sequence?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI reading the same data from registers</title><link>https://devzone.nordicsemi.com/thread/196480?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 10:37:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b934223c-c480-4f91-ae90-04371529e86b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It looks like what you are looking for is not a standard NRF_DRV_TWI_XFER_TXRX, but rather a NRF_DRV_TWI_XFER_TXRXTXRX (with no STOP signal in between). This is not supported by the driver by default.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t find any mentions in the drivers regarding NO_STOP flags in&amp;nbsp;TWI RX mode, only in TX, so I am not sure whether it is possible, although it looks like the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Ftwim.html&amp;amp;cp=3_0_0_5_30_3&amp;amp;anchor=concept_ebf_cwp_xr" rel="noopener noreferrer" target="_blank"&gt;TWIM peripheral supports this&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Maybe you can give it a go to use the TWI registeres as described in the link above to see if you can get the behavior that the sensor expects.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>