<?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>Changing GPIOTE out pin level gives hard fault</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72208/changing-gpiote-out-pin-level-gives-hard-fault</link><description>I set up PPI so that it kicks off TWIM (I2C) transfer on GPIOTE pin transition low to high. Everything works great, except that I also setup a fork task to set another GPIOTE out to high during the transaction. I then wanted to clear that pin after the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Mar 2021 18:13:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72208/changing-gpiote-out-pin-level-gives-hard-fault" /><item><title>RE: Changing GPIOTE out pin level gives hard fault</title><link>https://devzone.nordicsemi.com/thread/297305?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 18:13:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e8416f4-afcf-4907-ab30-35e14429ca04</guid><dc:creator>SmallerPond</dc:creator><description>&lt;p&gt;There you go!&amp;nbsp; I didn&amp;#39;t even see that little guy all the way at the bottom of the header :-P&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing GPIOTE out pin level gives hard fault</title><link>https://devzone.nordicsemi.com/thread/297302?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 17:55:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c45bd978-b209-4cda-b9ba-b3e7dd53ffb5</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Can you try to use&amp;nbsp;nrfx_gpiote_clr_task_trigger&lt;span&gt;() instead?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing GPIOTE out pin level gives hard fault</title><link>https://devzone.nordicsemi.com/thread/297298?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 17:40:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5fce871-7873-4dfe-956f-815add25d077</guid><dc:creator>SmallerPond</dc:creator><description>&lt;p&gt;Works for me - I wasn&amp;#39;t sure if I was missing something obvious.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing GPIOTE out pin level gives hard fault</title><link>https://devzone.nordicsemi.com/thread/297291?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 16:57:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6606c13-ed2a-42cb-b6e9-49dee8a4f645</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The GPIOTE peripheral is controlling the pin, so even if you tried calling&amp;nbsp;&lt;span&gt;nrf_gpio_pin_clear/set it would not have any effect. Similar to if the SPI or TWI was controlling the pin, the&amp;nbsp;nrf_gpio_pin_clear/set would have no effect.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="SmallerPond"]So why have &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfx_gpiote_out_clear/set&lt;/span&gt; at all?&amp;nbsp;&amp;nbsp;If I&amp;#39;m not using the TE part of GPIOTE, I would just use &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_gpio_pin_clear/set&lt;/span&gt;.[/quote]
&lt;p&gt;I agree, that is confusing, I think there may be some historic reasons.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing GPIOTE out pin level gives hard fault</title><link>https://devzone.nordicsemi.com/thread/297260?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 15:25:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cf4db03-8755-429b-8c74-2e97b134aaf5</guid><dc:creator>SmallerPond</dc:creator><description>&lt;p&gt;I think the thing that&amp;#39;s so confusing is that if I am using GPIOTE instead of GPIO, then I probably want it for the events system - but then &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfx_gpiote_out_clear&lt;/span&gt; is just &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_gpio_pin_clear&lt;/span&gt; but with an assertion that the pin isn&amp;#39;t using the events system...&amp;nbsp; So why have &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrfx_gpiote_out_clear/set&lt;/span&gt; at all?&amp;nbsp;&amp;nbsp;If I&amp;#39;m not using the TE part of GPIOTE, I would just use &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_gpio_pin_clear/set&lt;/span&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing GPIOTE out pin level gives hard fault</title><link>https://devzone.nordicsemi.com/thread/297257?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 15:19:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:639c5feb-c878-4322-bb67-ed8fe127e8c2</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user=""]Is it to prevent accidentally triggering PPI by manually setting the pin?[/quote]
&lt;p&gt;Looking at the gpiote driver it looks like it has some protection mechanism that prevent using nrf_gpio is not allowed while nrf_gpiote is controlling the pin, which I think make sense, because using nrf_gpio while nrf_gpiote is controlling the pin should have no effect on the output level. So you would need to uninit-init yes, unless you enable toggle task, in which case you could just trigger toggle task to revert the pin back to low level. You can always read the pin level to ensure you don&amp;#39;t invert the level on the pin before calling toggle task.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>