<?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>Help me understand TWI/M and its API</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78103/help-me-understand-twi-m-and-its-api</link><description>Hello everyone I&amp;#39;m doing my first steps so as to get things right from the start with a device based on the nRF52833 chip. My setup: PC &amp;lt;USB&amp;gt; nRF52840-DK &amp;lt;JTAG&amp;gt; CustomBoard (nRF52833) I am struggling to understand the TWI workflows and keep getting hard</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Aug 2021 08:07:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78103/help-me-understand-twi-m-and-its-api" /><item><title>RE: Help me understand TWI/M and its API</title><link>https://devzone.nordicsemi.com/thread/322800?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 08:07:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a0a9ba5-2db8-483a-8a88-3745c6c189af</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Correct&lt;/li&gt;
&lt;li&gt;Correct&lt;/li&gt;
&lt;li&gt;Looking at the part of the datasheet that you included this seems very correct. If you&amp;#39;re using the twi driver then you can either do a &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__drv__twi.html?cp=8_1_6_8_0_38_1_29#ga6c83eac2d358bc8fb5b53c53f22506b6"&gt;nrf_drv_twi_tx()&lt;/a&gt;&lt;span&gt;&amp;nbsp;with the no_stop parameter as true, and then follow with a read with &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__drv__twi.html?cp=8_1_6_8_0_38_1_26#gab135f4b02e2f7dcd8db59f17063617ff"&gt;nrf_drv_twi_rx()&lt;/a&gt;. Or you can do both with one function call &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__drv__twi.html?cp=8_1_6_8_0_38_1_31#ga44215084d42d6a29aa4044c3c2792fc0"&gt;nrf_drv_twi_xfer()&lt;/a&gt;. Similar&amp;nbsp;functions are available&amp;nbsp;for the TWIM driver.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;Also, try probing the SCL and SDA line with a oscilloscope or a logic analyzer and see if the correct data is outputted from the nRF.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>