<?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>How to set GPIO pin DETECT signal with NCS ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80539/how-to-set-gpio-pin-detect-signal-with-ncs</link><description>Hi, 
 I&amp;#39;m trying to put my nRF52840 in System OFF and wake it up by DETECT signal on GPIO. For that I use gpio_pin_configure() with GPIO_INPUT | GPIO_INT_HIGH_1 flags but it doesn&amp;#39;t work. I looked on the code sample nfc/system_off. 
 I guess the chip</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Dec 2021 14:28:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80539/how-to-set-gpio-pin-detect-signal-with-ncs" /><item><title>RE: How to set GPIO pin DETECT signal with NCS ?</title><link>https://devzone.nordicsemi.com/thread/341551?ContentTypeID=1</link><pubDate>Wed, 01 Dec 2021 14:28:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:444490d6-3aa0-4e62-8686-fb34bc8fa7d4</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Romain&lt;/p&gt;
&lt;p&gt;Sorry for the slow response on this case. Håkon is currently unavailable, and I will help out in the mean time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you still having issues with this?&lt;/p&gt;
&lt;p&gt;If so, can you please share the current state of your code, and I will take a look at it right away.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set GPIO pin DETECT signal with NCS ?</title><link>https://devzone.nordicsemi.com/thread/334396?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 14:16:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f49ab8ac-ab4a-4fb6-a3d2-5a99356be07e</guid><dc:creator>Romain</dc:creator><description>&lt;p&gt;I have tested both variants gpio_pin_configure() and nrf_gpio_cfg_sense_input() but only the second one set the correct value in PIN_CNF[myPIN].&lt;/p&gt;
&lt;p&gt;But the nRF still doesn&amp;#39;t wakeup when the pulse comes on the configured pin... The trace shows the level high pulse (~20us) and the nRF never start (LOG in SYSINIT and main don&amp;#39;t show up...).&lt;/p&gt;
&lt;p&gt;My proj.conf (or autoconf.h) has CONFIG_PM=y, CONFIG_PM_DEVICE=y, CONFIG_GPIO=y, the System OFF demo works correctly on my nrf52840dk.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set GPIO pin DETECT signal with NCS ?</title><link>https://devzone.nordicsemi.com/thread/334274?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 07:56:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc67f872-6642-4daf-b5dc-1b14b58b5889</guid><dc:creator>Romain</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;/p&gt;
[quote userid="90815" url="~/f/nordic-q-a/80539/how-to-set-gpio-pin-detect-signal-with-ncs/333931#333931"]How does this fail?[/quote]
&lt;p&gt;The nRF never wakes-up (it needs POR).&lt;/p&gt;
&lt;p&gt;Yes I think GPIO_INT_LEVEL_LOW would be more suitable than GPIO_INT_LOW_0 alone but it still doesn&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I missed the sample &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/zephyr/samples/boards/nrf/system_off/README.html#nrf5x-system-off-demo"&gt;nRF5x System Off demo&lt;/a&gt;, good to know. Interesting, it uses hal/nrf_gpio with command nrf_gpio_cfg_sense_set().&lt;/p&gt;
&lt;p&gt;I may ask my question differently:&lt;/p&gt;
&lt;p&gt;What do you suggest to use DETECT signal by setting SENSE on a GPIO pin (register PIN_CNF[16,17]) when using NCS ?&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;- Is it only available through nrf_gpio&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;- Does it exist within GPIO API&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;- Should I simply direct access PIN_CNF register&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set GPIO pin DETECT signal with NCS ?</title><link>https://devzone.nordicsemi.com/thread/333931?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 12:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1de01ce8-a2a3-44f2-a083-a180d03f3e0b</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Romain,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]I use gpio_pin_configure() with GPIO_INPUT | GPIO_INT_HIGH_1 flags but it doesn&amp;#39;t work[/quote]
&lt;p&gt;How does this fail?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]GPIO_INT_HIGH_1 and GPIO_INT_LOW_0 are the correct flags ?[/quote]
&lt;p&gt;Please see the available flags in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/zephyr/reference/peripherals/gpio.html"&gt;GPIO API reference for v1.6.1.&lt;/a&gt; Are the flags below the ones you might be looking for? If using these flags does not help I will have a closer look at the procedure.&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GPIO_INT_LEVEL_LOW&lt;br /&gt;Configures GPIO interrupt to be triggered on pin physical level low and enables it.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;GPIO_INT_LEVEL_HIGH&lt;br /&gt;Configures GPIO interrupt to be triggered on pin physical level high and enables it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you tried modifying the nfc/system_off sample as suggested in the sample&amp;#39;s README.rst?&lt;/p&gt;
&lt;p&gt;Another sample to look at is the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/zephyr/samples/boards/nrf/system_off/README.html#nrf5x-system-off-demo"&gt;nRF5x System Off demo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>