<?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>Get TWI event address ( TWI + PPI)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67367/get-twi-event-address-twi-ppi</link><description>Hello all. 
 I need to detect when data is received on RX. I am planning to use it with PPI channel so i could instantiate a task to it. 
 I tried to use nrf_twi_event_address_get to get the address of event so i could assign to a PPI channel. But Kiel</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Oct 2020 18:08:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67367/get-twi-event-address-twi-ppi" /><item><title>RE: Get TWI event address ( TWI + PPI)</title><link>https://devzone.nordicsemi.com/thread/276021?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 18:08:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:933f0603-3816-4f3e-bb36-b35132db78a0</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;You&amp;#39;re trying to mix driver and HAL layers - nrf_twi_event_address_get expects an address of TWI peripheral, not an instance structure. It&amp;#39;s possible to use an address of TWI peripheral directly (NRF_TWI0 for instance 0 and&amp;nbsp; so on), but the right way is to work only with HAL functions if you need a low-level access to twi registers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get TWI event address ( TWI + PPI)</title><link>https://devzone.nordicsemi.com/thread/275894?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 11:58:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4665c02-e6ce-43dc-890a-92a7fec69149</guid><dc:creator>Alanarf</dc:creator><description>&lt;p&gt;I tried both commands&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;     uint32_t *twi_evt = nrf_twi_event_address_get(&amp;amp;m_twi,NRF_TWI_EVENT_BB);

     uint32_t twi_event_addr = nrf_drv_twi_event_address_get(&amp;amp;m_twi,NRF_TWI_EVENT_RXDREADY);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;In both i got warnings.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;..\..\..\main.c(499): error:&amp;nbsp; #167: argument of type &amp;quot;const nrf_drv_twi_t *&amp;quot; is incompatible with parameter of type &amp;quot;NRF_TWI_Type *&amp;quot;&amp;nbsp; -&amp;gt;&amp;nbsp; first line&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Implicity declaration of&amp;nbsp;&lt;span&gt;nrf_drv_twi_event_address_get&amp;nbsp; is invalid in c99 -&amp;gt; second line&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get TWI event address ( TWI + PPI)</title><link>https://devzone.nordicsemi.com/thread/275851?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 10:37:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:431679c2-875b-492e-9e70-cec37abd5d66</guid><dc:creator>Alanarf</dc:creator><description>&lt;p&gt;Also this is the line that i am using in ppi_init to then assign&amp;nbsp; event and tasks:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;span&gt; &lt;/span&gt;uint32_t *twi_evt&amp;nbsp; =&amp;nbsp; nrf_twi_event_address_get(&amp;amp;m_twi,NRF_TWI_EVENT_BB);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get TWI event address ( TWI + PPI)</title><link>https://devzone.nordicsemi.com/thread/275840?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 10:17:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ecad93d-1c02-4b16-9d26-c0b9fb7a8aa8</guid><dc:creator>Alanarf</dc:creator><description>&lt;p&gt;Hello Dmitry, thanks for reply.&lt;br /&gt;&lt;br /&gt;My bad, replaced&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;nrf_drv_twi_event_address_get&lt;/em&gt;&amp;nbsp;to&amp;nbsp;&lt;em&gt;nrf_twi_event_address_get&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and got new errors&lt;/p&gt;
&lt;p&gt;Any help?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;..\..\..\main.c(499): error: #167: argument of type &amp;quot;const nrf_drv_twi_t *&amp;quot; is incompatible with parameter of type &amp;quot;NRF_TWI_Type *&amp;quot;&lt;br /&gt;uint32_t *twi_evt = nrf_twi_event_address_get(&amp;amp;m_twi,NRF_TWI_EVENT_BB);&lt;br /&gt;..\..\..\main.c(540): error: #167: argument of type &amp;quot;uint32_t *&amp;quot; is incompatible with parameter of type &amp;quot;uint32_t&amp;quot;&lt;br /&gt;err_code = nrf_drv_ppi_channel_assign(ppi_channel_5, twi_evt,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get TWI event address ( TWI + PPI)</title><link>https://devzone.nordicsemi.com/thread/275715?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 19:20:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16d7c3f7-de63-46fc-88d9-68446ce1c1a7</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;it seems you&amp;#39;re mistyping&amp;nbsp;&lt;em&gt;nrf_&lt;strong&gt;drv_&lt;/strong&gt;twi_event_address_get (should be&amp;nbsp;&lt;strong&gt;nrf_twi_event_address_get&lt;/strong&gt;)&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>