<?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>TWIS (I2C slave) no IRQ</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80128/twis-i2c-slave-no-irq</link><description>Hi 
 I&amp;#39;m trying to use the nrfx TWI Slave function with IRQ (No Poll), but there is no clean code available I found. 
 I&amp;#39;m using the following code: 
 
 But even if I can see the data on the oscilloscoipe with the address 0x08, the function 
 static void</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Sep 2021 16:47:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80128/twis-i2c-slave-no-irq" /><item><title>RE: TWIS (I2C slave) no IRQ</title><link>https://devzone.nordicsemi.com/thread/332002?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 16:47:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fe71ac6-fb53-4584-873b-e716c8e20c34</guid><dc:creator>Dominik Eugster</dc:creator><description>&lt;p&gt;I got it worked now, after days. Maybe it would be a good idea to provide some nrfx examples for the TWI and TWIS on the same port with IRQ, I didn&amp;#39;t found some example code and its not really clear how the implementation should be. I think other people will have the same problems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWIS (I2C slave) no IRQ</title><link>https://devzone.nordicsemi.com/thread/331942?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 13:13:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4814d6d8-d843-46fc-bb1f-c0ecbcc7ed87</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The driver should ensure that interrupts are enabled and that the event handler is called as long as an event handler is provided when you call&amp;nbsp;nrfx_twis_init(), which I see you do here. There may be some complications when you use peripheral resource sharing (PRS), though. Can you share the PRS related configurations from your sdk_config.h?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWIS (I2C slave) no IRQ</title><link>https://devzone.nordicsemi.com/thread/331876?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 10:12:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:377e2d0a-3118-421e-b0d2-e1e023b4d7cc</guid><dc:creator>Dominik Eugster</dc:creator><description>[quote userid="107899" url="~/f/nordic-q-a/80128/twis-i2c-slave-no-irq/331831#331831"]conclusion: TWIS and TWI (master and slave) at the same time on different peripherals are not possible?!?[/quote]
&lt;p&gt;correction, when I use he same NRFX instance, its worgking, but still missing the IRQ... Do I have to enable some flags which IRQ is acive or anything else?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;const nrfx_twi_t m_twi_1_master = NRFX_TWI_INSTANCE(1);     /**&amp;lt; TWI master 1 instance */
const nrfx_twis_t m_twis_1_slave = NRFX_TWIS_INSTANCE(1);    /**&amp;lt; TWIS slave 1 instance */&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWIS (I2C slave) no IRQ</title><link>https://devzone.nordicsemi.com/thread/331831?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 06:49:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94243224-7d3d-4f0c-a7a5-eaf6ba581191</guid><dc:creator>Dominik Eugster</dc:creator><description>&lt;p&gt;I just recognized, that the NRF_ERROR_BUSY is in realtion with the TWI instance 0.&lt;/p&gt;
&lt;p&gt;const nrfx_twi_t m_twi_0_master = NRFX_TWI_INSTANCE(0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; TWI master 0 instance */&lt;br /&gt;const nrfx_twi_t m_twi_1_master = NRFX_TWI_INSTANCE(1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&amp;lt; TWI master 1 instance */&lt;/p&gt;
&lt;p&gt;I need the TWI instance 0 and 1 as master in normal oiperation. After this, I need the TWI 0 as master and TWI1 as slave (TWIS). When I call nrfx_twi_disable(&amp;amp;m_twi_0_master) and nrfx_twi_uninit (&amp;amp;m_twi_0_master) before calling the init for the TWIS i have ret = success.&lt;/p&gt;
&lt;p&gt;conclusion: TWIS and TWI (master and slave) at the same time on different peripherals are not possible?!?&lt;/p&gt;
&lt;p&gt;-&amp;gt; please confirm&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ret = nrfx_twis_init(&amp;amp;m_twis_1_slave, &amp;amp;twis_config_1, twi_slave_event_handler);

    /* Init TWIS */
    if (NRFX_SUCCESS == ret)
    {
        nrfx_twis_enable(&amp;amp;m_twis_1_slave);
    }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWIS (I2C slave) no IRQ</title><link>https://devzone.nordicsemi.com/thread/331776?ContentTypeID=1</link><pubDate>Wed, 29 Sep 2021 15:40:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d03b472c-5e50-4a8e-8345-317c170de744</guid><dc:creator>Dominik Eugster</dc:creator><description>&lt;p&gt;In the debug Log I got the output:&lt;/p&gt;
&lt;p&gt;&amp;lt;warning&amp;gt; PRS: Function: nrfx_prs_acquire, error code: NRF_ERROR_BUSY.&lt;/p&gt;
&lt;p&gt;I use the same TWI port as master before, then I call twi_master_uninit and after this nrfx_twis_init which is causing the error, but why?&lt;/p&gt;
&lt;p&gt;I tried with nrfx_prs_release(&amp;amp;m_twi_1_master);, but this is not solving the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>