<?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>nrf52832 - TWIM vs TWI - Transfer with long FIFOs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75373/nrf52832---twim-vs-twi---transfer-with-long-fifos</link><description>Hello, 
 I am using the nRF52832 in a design where I have to read long buffer (&amp;gt;255 bytes). Using &amp;quot;nrfx_twim_rx&amp;quot; keeps things reliable however with nrfx_twi_rx the transfer becomes inconsistent. I am unable to read beyond a couple of bytes. 
 
 The return</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 May 2021 07:53:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75373/nrf52832---twim-vs-twi---transfer-with-long-fifos" /><item><title>RE: nrf52832 - TWIM vs TWI - Transfer with long FIFOs</title><link>https://devzone.nordicsemi.com/thread/310936?ContentTypeID=1</link><pubDate>Fri, 21 May 2021 07:53:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22bbe252-0cce-4d61-b864-1626df7a5a13</guid><dc:creator>akshaymishra</dc:creator><description>&lt;p&gt;blocking mode nailed it !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 - TWIM vs TWI - Transfer with long FIFOs</title><link>https://devzone.nordicsemi.com/thread/310813?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 14:40:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d1cbda7-d11c-46b2-b41d-21dc1755d64a</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Any difference if you run this in blocking mode instead?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/hardware_driver_twi.html#hardware_driver_twi_basic"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/hardware_driver_twi.html#hardware_driver_twi_basic&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 - TWIM vs TWI - Transfer with long FIFOs</title><link>https://devzone.nordicsemi.com/thread/310749?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 12:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3d5ec75-77f2-4511-862d-8933f1205231</guid><dc:creator>akshaymishra</dc:creator><description>&lt;p&gt;I am, as yet, verifying my twi attempts with less than 255 bytes which does not seem to succeed. Have not attempted &amp;gt;255 bytes - not knowing what else it&amp;#39;ll throw at me. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 - TWIM vs TWI - Transfer with long FIFOs</title><link>https://devzone.nordicsemi.com/thread/310740?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 12:22:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c69c167-9012-4a4d-bd5c-e7ce239c0a2c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The TWIM on nRF52832 only&amp;nbsp;support 255bytes (8-bit), ref MAXCNT register:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/twim.html#register.RXD.MAXCNT"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/twim.html#register.RXD.MAXCNT&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So if you set a value larger than 255bytes, it likely will likely mask bits that are &amp;gt;8-bit, thereby only a few bytes are read.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The actual MAXCNT are different between nRF52 variants, see here:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50513/twi-maximum-data-transfer-size-in-nrf52832/202150#202150"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/50513/twi-maximum-data-transfer-size-in-nrf52832/202150#202150&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However the twi driver should not have such limitation,&amp;nbsp;since each byte will then be handled in interrupt mode. Though the twi driver was made back in the days when 8-bit was what was sufficient, so maybe there is something leftover 8-bit that prevent this to work as intended.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;When using nrfx_twi_rx -- the clock is visible for the duration but the data is not captured.&amp;quot;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does it works when &amp;lt;255bytes?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I could find this case that maybe is related:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/33996/twi-sending-wrong-data---sdk15"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/33996/twi-sending-wrong-data---sdk15&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Maybe check the buffers are static.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 - TWIM vs TWI - Transfer with long FIFOs</title><link>https://devzone.nordicsemi.com/thread/310673?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 09:52:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f3db595-e1f0-4863-a61f-50942efe28d5</guid><dc:creator>akshaymishra</dc:creator><description>&lt;p&gt;The slave is &lt;span style="background-color:#000000;"&gt;transmitted&lt;/span&gt; transmitting correctly. With twim reads the data is latched correct but with twi reads the only first few bytes (8-12) bytes get captured. the SDA line shows valid data.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit: grammar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 - TWIM vs TWI - Transfer with long FIFOs</title><link>https://devzone.nordicsemi.com/thread/310664?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 09:25:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41b6adc2-22c5-40a7-8f62-b174824c6e68</guid><dc:creator>awneil</dc:creator><description>[quote userid="91089" url="~/f/nordic-q-a/75373/nrf52832---twim-vs-twi---transfer-with-long-fifos/310644#310644"]the data is not captured[/quote]
&lt;p&gt;not sure what you mean by that?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the Slave is transmitting correctly on SDA, but your software is not seeing that data?&lt;/li&gt;
&lt;li&gt;there is no activity on SDA?&lt;/li&gt;
&lt;li&gt;other ... ?&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 - TWIM vs TWI - Transfer with long FIFOs</title><link>https://devzone.nordicsemi.com/thread/310644?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 08:58:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61ceb486-cd74-4128-8762-6b8b00a1859a</guid><dc:creator>akshaymishra</dc:creator><description>&lt;p&gt;When using nrfx_twim_rx -- I can read upto 255 bytes without any issue. &lt;/p&gt;
&lt;p&gt;When using nrfx_twi_rx -- the clock is visible for the duration but the data is not captured. No change in hardware/ settings.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am attempting the nrfx_twi_rx since I assume I will be able to eventually read &amp;gt;255 bytes in 1-trasaction.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 - TWIM vs TWI - Transfer with long FIFOs</title><link>https://devzone.nordicsemi.com/thread/310629?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 07:55:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7d9cb10-dc95-4f9a-ae9c-112e58eda549</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;have you used a scope or analyser to check what&amp;#39;s happening on the wires?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>