<?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/I2C interrupt problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89340/twi-i2c-interrupt-problem</link><description>Hi every body. 
 I have trying without success to attach an event handler function to the TWI. 
 I am reading a temperature and humidity sensor using I2C. In polling mode everything is working perfectly but when I try to attach a callback function, that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Jun 2022 13:06:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89340/twi-i2c-interrupt-problem" /><item><title>RE: TWI/I2C interrupt problem</title><link>https://devzone.nordicsemi.com/thread/374745?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 13:06:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4431caf9-53ce-4e4b-8ea4-0c2d6f0b2f43</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;I see. Good!!&lt;/p&gt;
&lt;p&gt;Could you verify the answer that helped you, so that others that are wondering the same could&amp;nbsp;find it?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/I2C interrupt problem</title><link>https://devzone.nordicsemi.com/thread/374737?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 12:40:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45c612fc-5c1c-41fa-9cb6-862e79307a51</guid><dc:creator>LeoSanta</dc:creator><description>&lt;p&gt;No, I meant that TWIM0 now is working with&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/55305292a2a8e4149869951451311452f4566e9a/soc/nrfx_irqs_nrf52833.h#L73"&gt;nrfx_twim_0_irq_handler&lt;/a&gt;&amp;nbsp;and TWIM1 with&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/55305292a2a8e4149869951451311452f4566e9a/soc/nrfx_irqs_nrf52833.h#L73"&gt;nrfx_twim_1_irq_handler&lt;/a&gt;, just to be expected.&lt;/p&gt;
&lt;p&gt;Thanks again for your help. I really was quite useful to solve this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/I2C interrupt problem</title><link>https://devzone.nordicsemi.com/thread/374671?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 07:18:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dfb06ab-cfc2-4a8b-bfa0-31c79a4ab412</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;You can use both peripherals but TWIM0 use another IRQ handler, namely&amp;nbsp;&lt;span&gt;nrfx_twim_0_irq_handler. If you see that&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/55305292a2a8e4149869951451311452f4566e9a/soc/nrfx_irqs_nrf52833.h#L73"&gt;nrfx_twim_1_irq_handler&lt;/a&gt;&amp;nbsp;works for both of them then maybe the IRQ for&amp;nbsp;&lt;span&gt;nrfx_twim_0_irq_handler has already been enabled somewhere else in your code?&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/I2C interrupt problem</title><link>https://devzone.nordicsemi.com/thread/374561?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 13:39:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:274fc292-38b9-4d12-8d29-2b1c6a51d137</guid><dc:creator>LeoSanta</dc:creator><description>&lt;p&gt;Hi Jared. Thank you for your help and for your quick reply.&lt;/p&gt;
&lt;p&gt;The doubt was if is only possible to use TWIM1, but I was trying with TWIM0 and 1 and it works for both of them. The problem was that I did not put the&amp;nbsp;&lt;span&gt;IRQ_DIRECT_CONNECT line.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/I2C interrupt problem</title><link>https://devzone.nordicsemi.com/thread/374559?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 13:35:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcff795f-fe1d-4a61-84d0-738916fd1c70</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did the suggested solution work? I checked the IRQ list for nRF52833 in nrfx and that handler was assigned for that peripheral. Is there any reason for your doubt?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/I2C interrupt problem</title><link>https://devzone.nordicsemi.com/thread/374546?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 12:57:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bd7c5af-f8ad-4d42-8a6a-3ce99ac7ec49</guid><dc:creator>LeoSanta</dc:creator><description>&lt;p&gt;Thank you a lot Jared. That was the problem.&lt;/p&gt;
&lt;p&gt;I have a doubt: where do you check that for the NRF52833 I should use&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/55305292a2a8e4149869951451311452f4566e9a/soc/nrfx_irqs_nrf52833.h#L73"&gt;nrfx_twim_1_irq_handler&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/I2C interrupt problem</title><link>https://devzone.nordicsemi.com/thread/374354?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2022 13:26:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fd4e3bf-ae5a-4fb1-981c-5f3673cef307</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see that you pass the callback handler to the init function, but where do you connect the IRQ to the callback handler by calling&amp;nbsp;&lt;span&gt;IRQ_DIRECT_CONNECT(), see &lt;a href="https://github.com/too1/ncs-nrfx-pwm-simple-example/blob/84980c85523e38fc32050521ae85ff0a600544ec/src/main.c#L40"&gt;this&lt;/a&gt;&amp;nbsp;example. For the nRF52833, you should use &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/55305292a2a8e4149869951451311452f4566e9a/soc/nrfx_irqs_nrf52833.h#L73"&gt;nrfx_twim_1_irq_handler&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>