<?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>2 devices on a single TWI instance + PPI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35359/2-devices-on-a-single-twi-instance-ppi</link><description>Do you have any sample code that shows how to retrieve data via i2c from 2 different device addresses using PPI?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Aug 2018 13:54:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35359/2-devices-on-a-single-twi-instance-ppi" /><item><title>RE: 2 devices on a single TWI instance + PPI</title><link>https://devzone.nordicsemi.com/thread/146341?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2018 13:54:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e679ea9-0ca2-4fec-98ce-ffd7b3a863e9</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You will need two buses. &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/twim.html?cp=2_1_0_32#concept_scx_f5p_xr"&gt;Multi-master is not supported&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This TWIM is only able to operate as a single master on the TWI bus. Multi-master bus configuration is not supported.&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 devices on a single TWI instance + PPI</title><link>https://devzone.nordicsemi.com/thread/146335?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2018 13:43:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2912a6ba-6565-401e-959c-5821a2135a2d</guid><dc:creator>mraposo1</dc:creator><description>&lt;p&gt;Sorry. I meant in the same i2c bus, two different instances.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 devices on a single TWI instance + PPI</title><link>https://devzone.nordicsemi.com/thread/146238?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2018 08:02:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3135a986-a701-4ba6-b76e-1c7ba8a77a22</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You can trigger transfers from two TWIM instances using PPI, but the max transfer size will depend on&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52/dita/nrf52/nrf52_series.html?cp=2"&gt;which chip you are using&lt;/a&gt;. nRF52832 support only 8-bit MAXCNT register for the TWIM peripheral. nRF52810 support 10 bit and nRF52840 support 16 bits. On nRF52832 you can use the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/twim.html?cp=2_1_0_32_1_0#topic"&gt;EasyDMA Arraylist feature&lt;/a&gt; to transmitt/receive more data without CPU intervention (not bigger chunks, but more chunks).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 devices on a single TWI instance + PPI</title><link>https://devzone.nordicsemi.com/thread/146163?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 16:27:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:460f8032-90e4-421e-98ec-f45f797e05c7</guid><dc:creator>mraposo1</dc:creator><description>&lt;p&gt;Can you do this with 2 TWI instances?&lt;br /&gt;In other words, can I have device 1 in TWI0 and device 2 in TWI1 and use EasyDMA + PPI, so I can do the direct transfer from each device without CPU intervention with, let&amp;#39;s say, each device having a MAXCNT = 4096 bytes?&lt;/p&gt;
&lt;p&gt;if not, what would be the ideal solution for collecting large chunks of data from 2 devices using TWI simultaneously without CPU intervention?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 devices on a single TWI instance + PPI</title><link>https://devzone.nordicsemi.com/thread/136045?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 06:58:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3227640-692c-4187-9108-8714dfa77a97</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This will only be possible to achieve&amp;nbsp;if you have identical read and write buffer sizes for both devices. You will need to use the&amp;nbsp;&lt;a title="EasyDMA list" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/twim.html?cp=2_1_0_32_1_0#topic"&gt;EasyDMA array list&lt;/a&gt;&amp;nbsp;feature, and fill the array with alternating read and write commands for the two devices. You can then write the TASKS_START register to start a transfer to one device. When you trigger TASKS_START again, the RXD and TXD buffers will jump to the next buffer in the list (by adding the MAXCNT size to the buffer pointer).&lt;/p&gt;
&lt;p&gt;You can enable the EasyDMA list feature in the driver by setting the flag &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.0.0/group__nrf__drv__twi.html#gaf9478737821a433be6a5c72710fc224c"&gt;NRFX_TWIM_FLAG_TX_POSTINC&lt;/a&gt;/&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.0.0/group__nrf__drv__twi.html#ga59e94b68b60d5ec28fd4410d5b507065"&gt;NRFX_TWIM_FLAG_RX_POSTINC&lt;/a&gt;, but you will have to reserve/fill the consecutive data in the RAM buffers manually. Unfortunately, we do not have any sample code apart from the code in the above linked TWIM peripheral documentation.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>