<?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 read data from slave via TWI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49702/how-to-read-data-from-slave-via-twi</link><description>Hi, 
 I am trying to use GPIOTE_PIN_HANDLER in the master nrf52. What is the correct way to read data from slave? 
 Slave device is sending data using nrfx_twis_tx_prepare() and in master device, I am trying to receive data like below: 
 
 
 I could not</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Jul 2019 12:29:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49702/how-to-read-data-from-slave-via-twi" /><item><title>RE: how to read data from slave via TWI</title><link>https://devzone.nordicsemi.com/thread/198454?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2019 12:29:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d26eec5-ee87-46a2-87bd-da275008b653</guid><dc:creator>awneil</dc:creator><description>[quote userid="81289" url="~/f/nordic-q-a/49702/how-to-read-data-from-slave-via-twi/198445"]How to put buffer in RAM[/quote]
&lt;p&gt;By default, it will be.&lt;/p&gt;
&lt;p&gt;The point is not to try to put it anywhere &lt;em&gt;other than&lt;/em&gt; RAM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read data from slave via TWI</title><link>https://devzone.nordicsemi.com/thread/198453?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2019 12:28:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6edbee2-bdc0-4e69-95ad-7840caafa9f7</guid><dc:creator>awneil</dc:creator><description>[quote userid="81289" url="~/f/nordic-q-a/49702/how-to-read-data-from-slave-via-twi/198445"]Any code examples on how to communicate between 2 nRF52 devices[/quote]
&lt;p&gt;Again, as said in your previous thread, the way to approach this is &lt;span style="text-decoration:underline;"&gt;&lt;em&gt;&lt;strong&gt;not&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt; to try to do both ends at once!&lt;/p&gt;
&lt;p&gt;Start by getting your Master thoroughly working, debugged, and instrumented&amp;nbsp; with a standard Slave.&lt;/p&gt;
&lt;p&gt;Then you can move onto your own slave.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read data from slave via TWI</title><link>https://devzone.nordicsemi.com/thread/198445?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2019 12:11:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad1d7c62-4554-4b10-aa53-ee3b5fa20f5e</guid><dc:creator>Anisa</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Thanks for the reply. So the state of slave device (nrf52) must be checked with&amp;nbsp;&lt;span&gt;(NRFX_TWIS_SUBSTATE_IDLE, and when state is idle them Master (nrf52) sends the buffer using nrf_drv_twi_tx to slave. Slave fills this buffer with data. Master again reads it via nrf_drv_twi_rx().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is above understanding correct? Any code examples on how to communicate between 2 nRF52 devices?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;SDK documentation says:&lt;/p&gt;
&lt;p&gt;Note:Peripherals using EasyDMA (including TWIS) require the transfer buffers to be placed in the Data RAM region. If this condition is not met, this function will fail with the error code NRFX_ERROR_INVALID_ADDR.&lt;/p&gt;
&lt;p&gt;How to put buffer in RAM?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read data from slave via TWI</title><link>https://devzone.nordicsemi.com/thread/198379?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2019 09:35:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7be32559-b9a8-4b40-afb6-f47cec93e367</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Anisa&lt;/p&gt;
&lt;p&gt;You can see that the TWIS_EVT_READ_REQ and WRITE_REQ functions are called in nrfx_twis.c when the TWI peripheral is idle (NRFX_TWIS_SUBSTATE_IDLE). For more details please check your SDK. in this path ....\modules\nrfx\drivers\src\nrfx_twis.c&lt;/p&gt;
&lt;p&gt;Due to the summer holidays in Norway, our support team is understaffed this week, and delayed replies must be expected. Sorry for the inconvenience!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read data from slave via TWI</title><link>https://devzone.nordicsemi.com/thread/198198?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 13:37:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:691cd1cf-5ca3-49ec-85ea-4c968c45edfc</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;We&amp;#39;ve been through all this before.&lt;/p&gt;
&lt;p&gt;See my reply in your original thread:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49316/twi-communication-between-two-nrf52-device/196292#196292"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/49316/twi-communication-between-two-nrf52-device/196292#196292&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read data from slave via TWI</title><link>https://devzone.nordicsemi.com/thread/198177?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 12:59:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49ca9a66-343d-4855-93ac-c9448628df60</guid><dc:creator>Anisa</dc:creator><description>&lt;p&gt;Can you tell me how &lt;a class="el" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.0.0/group__nrf__drv__twis.html#gga63538a473b8225a57950dd4cc438d9afa057c9fb7fa342a64559e05ef5dbb1c2d"&gt;TWIS_EVT_READ_REQ&lt;/a&gt;&lt;span&gt;&amp;nbsp;event and&amp;nbsp;&lt;a class="el" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.0.0/group__nrf__drv__twis.html#gga63538a473b8225a57950dd4cc438d9afa057c9fb7fa342a64559e05ef5dbb1c2d"&gt;TWIS_EVT_WRITE_REQ&lt;/a&gt;&lt;/span&gt;&amp;nbsp;is called? Does master calls it?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Nordic SDK documentation is not clear.&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: how to read data from slave via TWI</title><link>https://devzone.nordicsemi.com/thread/198120?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 10:56:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02670ca2-2c8a-4da5-a979-769a8cc5d923</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;So what does this have to do with TWI?&lt;/p&gt;
&lt;p&gt;Your question doesn&amp;#39;t make sense!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read data from slave via TWI</title><link>https://devzone.nordicsemi.com/thread/198116?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 10:48:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81d3d060-54cc-4b3a-9595-0246ffce74b0</guid><dc:creator>Anisa</dc:creator><description>&lt;p&gt;yes, Connection between master and slave works&amp;nbsp;and slave device is detected as well. Now trying to use GPIOTE pin handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read data from slave via TWI</title><link>https://devzone.nordicsemi.com/thread/198113?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 10:44:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86683446-56d0-4331-b076-d45f40d32184</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;So are you still trying to connect two nRF52s together via I2C - one nRF52 as a Master, the other&amp;nbsp;&lt;span&gt;nRF52 as a&amp;nbsp;Slave?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49316/twi-communication-between-two-nrf52-device"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/49316/twi-communication-between-two-nrf52-device&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>