<?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>External Interrupt to trigger I2C Write Using PPI</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55700/external-interrupt-to-trigger-i2c-write-using-ppi</link><description>Can I use an external edge-triggered (negative edge) interrupt (on a GPIO pin) to trigger an I2C write via PPI? If so, do the I2C registers need to be reloaded each time? It would be great if these could be setup once and remain static. This is an application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Dec 2019 06:51:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55700/external-interrupt-to-trigger-i2c-write-using-ppi" /><item><title>RE: External Interrupt to trigger I2C Write Using PPI</title><link>https://devzone.nordicsemi.com/thread/226016?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 06:51:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ca61251-1ff0-414c-a2e6-fada48b6438f</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Happy to help &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External Interrupt to trigger I2C Write Using PPI</title><link>https://devzone.nordicsemi.com/thread/225972?ContentTypeID=1</link><pubDate>Tue, 17 Dec 2019 18:22:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:363887b8-9e72-434f-b271-f0c83d07034d</guid><dc:creator>Mike</dc:creator><description>&lt;p&gt;Hi Bjorn-&lt;/p&gt;
&lt;p&gt;Thank you, this is exactly the information we needed. I see that Nordic actually has a patent on PPI technology. Brilliant engineering!&lt;/p&gt;
&lt;p&gt;Best Regards-&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: External Interrupt to trigger I2C Write Using PPI</title><link>https://devzone.nordicsemi.com/thread/225932?ContentTypeID=1</link><pubDate>Tue, 17 Dec 2019 14:31:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af361448-9d54-4355-ac16-174f3f3b431a</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Can I use an external edge-triggered (negative edge) interrupt (on a GPIO pin) to trigger an I2C write via PPI?[/quote]
&lt;p&gt;&amp;nbsp;Yes, a GPIOTE event(e.g. &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/gpiote.html?cp=4_0_0_5_9_3#register.EVENTS_IN-0-7"&gt;EVENTS_IN[0]&lt;/a&gt;) can be used to trigger the &amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/twim.html?cp=4_0_0_5_30_6#register.TASKS_STARTTX"&gt;TASKS_STARTTX&lt;/a&gt;&amp;nbsp;of the TWIM peripheral.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user=""]If so, do the I2C registers need to be reloaded each time?[/quote]
&lt;p&gt;If you&amp;#39;re only using the TWIM peripheral on the nRF52 device to send a clear interrupt command, then you will only have to set up the&amp;nbsp;&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/twim.html?cp=4_0_0_5_30_6#register.TXD.PTR"&gt;TXD.PTR&lt;/a&gt;&amp;nbsp;of the TWIM peripheral to point to the data to be sent over the TWI bus. If you&amp;#39;re using the TWIM to send other types of data, then you would have to make sure that the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/twim.html?cp=4_0_0_5_30_6#register.TXD.PTR"&gt;TXD.PTR&lt;/a&gt;&amp;nbsp;always points to the buffer with the&amp;nbsp;&lt;span&gt;clear interrupt command after you finish other transmissions.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user=""]This is an application in which the I2C write is used to clear an interrupt coming from an external chip. Any example code would be appreciated.[/quote]
&lt;p&gt;&amp;nbsp;I am afraid that we do not have any example for this exact scenario, but the&amp;nbsp;&lt;a title="PPI Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ppi_example.html?cp=6_1_4_6_22"&gt;PPI Example&lt;/a&gt;&amp;nbsp;should be good starting point.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>