<?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>TWI easy DMA parallel channels</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27249/twi-easy-dma-parallel-channels</link><description>Hi, 
 assuming I have an IMU sensor with 3 different interrupt lines. And I want to start a TWI DMA transfer for each interrupt line in parallel. Is this possible since there is only one memory?
This would mean to choose for each interrupt line one</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Nov 2017 15:25:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27249/twi-easy-dma-parallel-channels" /><item><title>RE: TWI easy DMA parallel channels</title><link>https://devzone.nordicsemi.com/thread/107567?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2017 15:25:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0949c0c-ea66-4096-94c0-8347f4ff7eac</guid><dc:creator>Constantin</dc:creator><description>&lt;p&gt;That’s what I was looking for. Thanks great support again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI easy DMA parallel channels</title><link>https://devzone.nordicsemi.com/thread/107566?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2017 15:18:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f2c3d08-b396-4e05-a06a-8968416d9ff7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, you have parallel DMA channels. &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/twim.html?cp=2_1_0_32_1#concept_cfw_vtp_xr"&gt;TWI master&lt;/a&gt; have 2 channels, one for reading and one for writing.
and &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/spim.html?cp=2_1_0_30_1#concept_svj_wt2_wr"&gt;SPI master&lt;/a&gt; also have 2 channels, one for reading and one for writing. This means that you can read data from RAM into the peripheral at the same time as you write data to the RAM from the peripheral.&lt;/p&gt;
&lt;p&gt;On the nRF52832 you have 8 GPIOTE channels. So you can have 8 interrupts coming in at the same time, that can trigger different tasks. E.g. with 2 interrupts at the same time, you will get 2 GPIOTE events generated at the same time, if GPIOTE event 1 is configured to trigger a START_TX for the TWI master, and GPIOTE event 2 is configured to trigger a START_TX for the SPI, then this will happen in parallel.&lt;/p&gt;
&lt;p&gt;I also recommend you to read the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/hardware_driver_twi.html?cp=4_0_0_2_16"&gt;TWI master driver&lt;/a&gt; documentation and &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/group__nrf__drv__twi.html?cp=4_0_0_6_9_24_3"&gt;API&lt;/a&gt;, as it gives a good overview over the capabilities not only of the driver, but the TWIM peripheral it self, and how it can be used with DMA and controlled by &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/hardware_driver_ppi.html?cp=4_0_0_2_7"&gt;PPI&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI easy DMA parallel channels</title><link>https://devzone.nordicsemi.com/thread/107565?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 17:25:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c97d7e46-059e-4977-a5ee-cf0220c025e2</guid><dc:creator>Constantin</dc:creator><description>&lt;p&gt;So this means I can have two parellel channels for dma? And what happens if both interrupts come at the same time?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI easy DMA parallel channels</title><link>https://devzone.nordicsemi.com/thread/107563?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 16:32:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adf781bb-44b7-48b8-bb55-59642cdbaff9</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, this is possible using PPI. Use a PPI fork to trigger the &lt;code&gt;TASKS_STARTRX&lt;/code&gt; task for both the SPI and I2C peripheral when you get a GPIOTE event(data ready line). If you are using the driver, see &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/hardware_driver_spi_master.html?cp=4_0_3_2_12_2_0#hardware_driver_spi_ppi"&gt;this page&lt;/a&gt; and &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/hardware_driver_twi.html?cp=4_0_3_2_16_2_0#hardware_driver_twi_ppi"&gt;this&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI easy DMA parallel channels</title><link>https://devzone.nordicsemi.com/thread/107564?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 15:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cd5c07b-7e16-4293-8c53-5050c97a5fc5</guid><dc:creator>Constantin</dc:creator><description>&lt;p&gt;okay this does not realy answer my question. So maybe I try to get more precise. Maybe with a different use case:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If I have one sensor connected via SPI and one connected via I2C&lt;/li&gt;
&lt;li&gt;Now I want to start on both a DMA transfer which gets triggered by the data ready line.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI easy DMA parallel channels</title><link>https://devzone.nordicsemi.com/thread/107562?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2017 10:23:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0a5f834-6ec1-4664-9e09-7a43fcf9bcd7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Ok. TWI is a serial protocol, so you can&amp;#39;t start these transfers completely in parallel. I see in one of you other post that you work directly on the register level. Depending on what abstraction layer you need, I would recommend that you either use the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/lib_app_twi.html?cp=4_0_3_3_41"&gt;TWI transaction manager (app_twi)&lt;/a&gt; or the underlying &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/hardware_driver_twi.html?cp=4_0_3_2_16"&gt;TWI driver (nrf_drv_twi.c/h)&lt;/a&gt;. With app_twi the transfers will be scheduled, and can be run either in the background or in blocking mode.&lt;/p&gt;
&lt;p&gt;In the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/twi_transaction_mgr_example.html?cp=4_0_3_4_5_37"&gt;TWI Transaction Manager Example&lt;/a&gt;, asynchronous data transfer requests are generated with button presses, you can easily change this so that the interrupt line is the one that is triggering the asynchronous data transfer requests. Both app_twi and nrf_drv_twi can be configured to use EasyDMA. With nrf_drv_twi you can also start transfers from PPI.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.1.0/twi_sensor_example.html?cp=4_0_3_4_5_36"&gt;TWI Sensor Example&lt;/a&gt; shows you how the nrf_drv_twi driver is used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI easy DMA parallel channels</title><link>https://devzone.nordicsemi.com/thread/107561?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 20:58:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9eb82fd5-34d7-44d3-bd36-ab3d69a209ee</guid><dc:creator>Constantin</dc:creator><description>&lt;ol&gt;
&lt;li&gt;It is the nrf52&lt;/li&gt;
&lt;li&gt;It is the BMX055 from Bosch it has even more interrupt lines and there are configurable.&lt;/li&gt;
&lt;li&gt;For each sensor gyro, acc, mag I would get a different interrupt&lt;/li&gt;
&lt;li&gt;Depending on the configuration they might come at the same time.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI easy DMA parallel channels</title><link>https://devzone.nordicsemi.com/thread/107560?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2017 20:47:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90cb5916-6c4a-411b-97fd-a0aa41cc4dbe</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What chip are you using here? nRF51 or nRF52?&lt;/li&gt;
&lt;li&gt;What IMU sensor is this ?&lt;/li&gt;
&lt;li&gt;The sensor have 3 different interrupt lines that are used to signal to the master device(nRF5x) that the sensor have data in the FIFO buffer waiting to be read by the master?&lt;/li&gt;
&lt;li&gt;Do you get these interrupt at the same time?&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>