<?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>How to prevent STOP bit after a TWI rx command?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81683/how-to-prevent-stop-bit-after-a-twi-rx-command</link><description>I am working with an IQS572 capacitive touch IC, and when communicating with this IC, the communication window will shut down if it receives a STOP bit. 
 I am writing a lot of configs to the IC registers, and want to do a variety of register reads and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jun 2024 15:22:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81683/how-to-prevent-stop-bit-after-a-twi-rx-command" /><item><title>RE: How to prevent STOP bit after a TWI rx command?</title><link>https://devzone.nordicsemi.com/thread/489357?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2024 15:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0fea7e6-7bae-4be6-a18f-3d91dbb7c0a3</guid><dc:creator>bearsh</dc:creator><description>&lt;p&gt;a little bit late to the party&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/cor10"&gt;cor10&lt;/a&gt;&amp;nbsp;did the suggestion of &lt;a href="https://devzone.nordicsemi.com/members/kme"&gt;Kenneth&lt;/a&gt;&amp;nbsp;work for you? I have a similar problem to solve...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent STOP bit after a TWI rx command?</title><link>https://devzone.nordicsemi.com/thread/339314?ContentTypeID=1</link><pubDate>Wed, 17 Nov 2021 00:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b2ee379-6a0d-43a9-b146-db5128d2d693</guid><dc:creator>cor10</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;Thank you for your response! I will look into setting this up, much appreciated.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have one last question to address for this project I am starting on, and although it is still related to I2C/TWI, it is a different topic, so I created a new ticket:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/81811/i2c-reads-writes-how-to-communicate-with-a-7bit-i2c-slave-that-has-a-16bit-memory-map"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/81811/i2c-reads-writes-how-to-communicate-with-a-7bit-i2c-slave-that-has-a-16bit-memory-map&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Any feedback on this new ticket would be super appreciated. Thanks again&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent STOP bit after a TWI rx command?</title><link>https://devzone.nordicsemi.com/thread/339031?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 13:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e65b68b0-c38f-4bc7-835e-fe19063715da</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have tried to look at the driver, but I can&amp;#39;t find that your use case is supported. It looks like all defined macros that show usage of twi transfer all ends with a stop condition and a stop interrrupt.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My suggestion would be to create a new macro, for instance based on the implementation of NRFX_TWIM_XFER_RX:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    case NRFX_TWIM_XFER_RX:
        nrf_twim_rx_buffer_set(p_twim, p_xfer_desc-&amp;gt;p_primary_buf, p_xfer_desc-&amp;gt;primary_length);
        nrf_twim_shorts_set(p_twim, NRF_TWIM_SHORT_LASTRX_STOP_MASK);
        p_cb-&amp;gt;int_mask = NRF_TWIM_INT_STOPPED_MASK;
        start_task = NRF_TWIM_TASK_STARTRX;
        nrf_twim_task_trigger(p_twim, NRF_TWIM_TASK_RESUME);
        break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But instead you should not enable the STOPPED&amp;nbsp;interrupt mask and not enable the lastrx to stop shortcut. Likely you should instead enable the&amp;nbsp;LASTRX interrupt mask, and not have any shortcuts enabled. Then in the&amp;nbsp;twim_irq_handler() you would want to add handling of the LASTRX interrupt, this should be similiar to handling the STOPPED interrupt (;check and clear event, disable interrupt, and possible call the callback handler).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>