<?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>P1.04 Configuration on nrf5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68786/p1-04-configuration-on-nrf5340</link><description>I am using the nrf5340PDK and i am trying to have P1.04 trigger an interrupt on a high to low transition. 
 attached is my overlay file and my main.c to initialize the GPIO. 
 if i set the pin in the overlay to (almost) any port0 pin this works. but if</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Nov 2020 19:18:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68786/p1-04-configuration-on-nrf5340" /><item><title>RE: P1.04 Configuration on nrf5340</title><link>https://devzone.nordicsemi.com/thread/282543?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 19:18:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31716836-6d3d-49fd-a661-5825f2d373eb</guid><dc:creator>WesC</dc:creator><description>&lt;p&gt;I got it working.&amp;nbsp; I needed to remove the&amp;nbsp;&lt;/p&gt;
&lt;p&gt;CONFIG_IS_SPM=y from the prj.conf file.&lt;/p&gt;
&lt;p&gt;it works know&lt;/p&gt;
&lt;p&gt;thanks i will close&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: P1.04 Configuration on nrf5340</title><link>https://devzone.nordicsemi.com/thread/282504?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 15:15:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67c21410-fd57-4016-a17f-1e83200e4445</guid><dc:creator>WesC</dc:creator><description>&lt;p&gt;i Have tried to edit the following files to get P1 in the NS domain.&lt;/p&gt;
&lt;p&gt;i changed nrf/subsys/spm/kconfig&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;config SPM_NRF_P1_NS
	bool &amp;quot;GPIO P1 is Non-Secure&amp;quot;
	default y
	help 
		WRC added this to place Port 1 in Non Secure Domain&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I changed the SPM.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#ifdef NRF_P1
		PERIPH(&amp;quot;NRF_P1&amp;quot;, NRF_P1, CONFIG_SPM_NRF_P1_NS),
#endif

if (IS_ENABLED(CONFIG_SPM_NRF_P1_NS)) {
		/* Configure GPIO port 1 pins to be Non-Secure */
		NRF_SPU-&amp;gt;GPIOPORT[1].PERM = 0;
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I added this line to the prj.conf&lt;/p&gt;
&lt;p&gt;CONFIG_IS_SPM=y&lt;/p&gt;
&lt;p&gt;and in my .overlay file i have this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	
	buttons {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		MBR_DETECT: mbr_detect {
			gpios = &amp;lt;&amp;amp;gpio1 0x4 (GPIO_PULL_UP|GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;MBR_DETECT&amp;quot;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;when itry and build in SES i get the following error&lt;/p&gt;
&lt;p&gt;C:/Users/Wes/ncs/v1.4.0/zephyr/include/toolchain/gcc.h:62:36: error: static assertion failed: &amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if i need to edit the SPM to get the P1 to work, what have i missed or done incorrectly?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: P1.04 Configuration on nrf5340</title><link>https://devzone.nordicsemi.com/thread/282481?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 14:34:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c015a258-7082-4684-a702-789161847d18</guid><dc:creator>WesC</dc:creator><description>&lt;p&gt;without editing the SPM, how can I get Port 1 in the NS domain.&lt;/p&gt;
&lt;p&gt;is there a CONFIG_SPM_NRF_P1_NS=y that can be set in the Proj.conf file?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: P1.04 Configuration on nrf5340</title><link>https://devzone.nordicsemi.com/thread/282057?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2020 12:41:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f1e7259-7bf5-4d00-b2e6-08794384782a</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This is because the NRF_P1 (Port 1) on the nRF5340 is not available in non-secure mode by default, so you&amp;#39;ll only be able to use the port0 pins. You can however, edit SPM in order to manually set which pins on what ports are available in non-secure mode. You can also build the application in secure mode in order to &amp;quot;unlock&amp;quot; both ports.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>