<?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>TWIM suspend after single byte</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77512/twim-suspend-after-single-byte</link><description>On the nRF 52840, is there a way to have the TWIM peripheral suspend a transfer after transmission of a single byte? The TWI peripheral provides the BB_SUSPEND short, but that particular bit is undefined for TWIM. 
 Relatedly, if the CPU triggers the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Jul 2021 13:02:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77512/twim-suspend-after-single-byte" /><item><title>RE: TWIM suspend after single byte</title><link>https://devzone.nordicsemi.com/thread/320267?ContentTypeID=1</link><pubDate>Thu, 15 Jul 2021 13:02:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04190f53-9c74-47da-82fb-237c9c4e2238</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]On the nRF 52840, is there a way to have the TWIM peripheral suspend&amp;nbsp;a transfer after transmission of a single byte? The TWI peripheral provides the BB_SUSPEND short, but that particular bit&amp;nbsp;is undefined for TWIM.[/quote]
&lt;p&gt;Suspension of the transaction in the TWIM module happens through the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Ftwim.html&amp;amp;anchor=register.TASKS_SUSPEND"&gt;TASKS_SUSPEND&lt;/a&gt;&amp;nbsp;task. Triggering this tasks will suspend the transaction, and produce &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Ftwim.html&amp;amp;anchor=register.EVENTS_SUSPENDED"&gt;the SUSPENDED event&lt;/a&gt;. If you are looking to short the byte boundry event to the SUSPEND task, you could do so in the TWIM module through &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Ftwim.html&amp;amp;anchor=register.SHORTS"&gt;the LASTTX_SUSPEND short&lt;/a&gt;.&lt;/p&gt;
[quote user=""]Relatedly, if the CPU triggers the SUSPEND task immediately following the START task, will the peripheral transmit both the address and the first data byte, or is it possible that the transmission will be suspended before transmitting the first data byte?[/quote]
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Ftwim.html"&gt;Any ongoing byte transfer is allowed to complete before the suspend is enforced&lt;/a&gt;, so in this case the address byte should be transferred completely, and then the suspension will be enforced before the next byte is transferred.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>