<?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>Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68428/unable-to-configure-port-1-as-input</link><description>Dear Team, 
 Greetings, 
 I am facing a problem for configuring Port 1 as input. I have connected a push button on P1.4 and an led on P0.0. I want to perform a simple task, i.e. when I press button then LED must turn on, else LED must be off. I have used</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Nov 2020 12:10:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68428/unable-to-configure-port-1-as-input" /><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/281091?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 12:10:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:330dd975-ca7d-4d47-8152-7bfebda38a03</guid><dc:creator>Nitesh Dubey</dc:creator><description>&lt;p&gt;I have more than one nRF24LE1 module to develop. But I don&amp;#39;t have nRFgo Motherboard. Is there any other method to do it?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll again request that please send a code to perform the same task. It will make me sure that there is the problem with my hardware.&lt;/p&gt;
&lt;p&gt;Thanks and regards,&lt;/p&gt;
&lt;p&gt;Nitesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/281037?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 08:12:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ece93e99-60e0-44a3-83a2-77ea9584f6e6</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Nitesh Dubey"]I also want to inform that there is no confusion related to P1.0 and P0.4 - P0.7 as mentioned in previous answer.[/quote]
&lt;p&gt;Thank you for confirming this.&lt;/p&gt;
&lt;p&gt;It seems that your infopage is corrupted, which makes the pin crossbar go haywire. This will happen if the programmer does not read out the infopage properly before issuing an ERASEALL command. Please see this thread for more information:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/20/how-to-solve-the-error-infopage-is-corrupted"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/20/how-to-solve-the-error-infopage-is-corrupted&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We do have a setting in nrfgo studio that restores the infopage, but this is only available using the nRFgo motherboard. Do you have more than one nRF24LE1 module to develop on?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/281022?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 04:21:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:342ba919-f9ea-47f0-b738-762293c36efc</guid><dc:creator>Nitesh Dubey</dc:creator><description>&lt;p&gt;After programming the nRF24LE1, I use to disconnect the programmer. Therefore, there is no chance to get PROG pin high.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have nRFGo motherboard available. It&amp;#39;s requested that please send a code which is working on nRFGo motherboard.&lt;/p&gt;
&lt;p&gt;I also want to inform that there is no confusion related to P1.0 and P0.4 - P0.7 as mentioned in previous answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280906?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 13:12:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9f79fff-e6b9-4580-9356-8e241a7d28a2</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is the nRF24LE1 device in &amp;quot;flash mode&amp;quot; (PROG pin high), or something like this (see chapter 6.3.5 in the nRF24LE1 ps for the pins the FSPI uses) ? Is your programmer properly disconnected, and the nRF power cycled after you test this?&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t used that programmer, so I do not have any knowledge on how it works. Do you have a nRFGo motherboard available to program with to see if the behavior is the same here?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user="Nitesh Dubey"]then only P1.0 and P0.4-P0.7 [/quote]
&lt;p&gt;&amp;nbsp;Do you mean P1.4-P1.7? Note that the nRF24LE1 QFN32 doesn&amp;#39;t have P1.7 (it goes up to P1.6)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280788?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 09:10:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3322c7c8-0709-41d3-a186-00015cf1ca79</guid><dc:creator>Nitesh Dubey</dc:creator><description>&lt;p&gt;I am writing the program using keil IDE. I have installed nrfprobe software in my pc, but I am not using it. I am generating .hex file and loading it to nrf24le1 chip using &lt;a href="https://www.aliexpress.com/item/32826965853.html"&gt;mpro programmer&lt;/a&gt;. I have also installed nrfsdk.&lt;/p&gt;
&lt;p&gt;Other examples such as enhanced_shockburst_ptx_nrf24le1 and&amp;nbsp;enhanced_shockburst_prx_nrf24le1, gazell pair are working.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But, while I was trying to toggle individual PORTs (by writing it P0 = 0xff;) in my main loop, only P0.0 to P0.3 are working as they should and remaining bits are not getting high. If I write P1=0xff; then only P1.0 and P0.4-P0.7 are getting high. I think P0 should not work like this.&lt;/p&gt;
&lt;p&gt;Program to toggle P0:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;quot;reg24le1.h&amp;quot;  // I/O header file for NRF24LE1
#include &amp;quot;hal_delay.h&amp;quot; // header file containing delay functions

void main()
{
	P0DIR = 0x00; //output port
	P0=0;       // set p0 initially as low
	while(1)
	{
	    P0=0xff;         //set P0 high
	    delay_ms(1000);
	    P0=0x00;         // set P0 low
	    delay_ms(1000);
	}
	&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Program to toggle P1:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;quot;reg24le1.h&amp;quot;  // I/O header file for NRF24LE1
#include &amp;quot;hal_delay.h&amp;quot; // header file containing delay functions

void main()
{
	P1DIR = 0x00; //output port
	P1=0x00;
	while(1)
	{
	    P1=0xff;
	    delay_ms(1000);
	    P1=0x00;
	    delay_ms(1000);
	}
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280777?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 08:42:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36da05c6-a62a-4e4c-8fd0-9e2b35199696</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Can you share information about your setup? Are you using nrfprobe to program?&lt;/p&gt;
&lt;p&gt;Does other examples run as they should?&lt;/p&gt;
&lt;p&gt;Have you tried just toggling a GPIO in your main loop to see if that works?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280521?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 08:17:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e10c3ff8-b98d-43f8-b513-ec4aa058b0e8</guid><dc:creator>Nitesh Dubey</dc:creator><description>&lt;p&gt;I followed the steps mentioned in this PDF but still the same problem. Please can you send a C program which can perform this task? From yesterday I have tried may things.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It will be a great help for me.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;Nitesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280511?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 07:47:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c39118f-4674-47c7-b4e6-091fbad420cb</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Are you using Keil C51 (nrfprobe) as&amp;nbsp;your programmer?&lt;/p&gt;
&lt;p&gt;If so, its explained in this application note (see pages 14/15) on how to clear the debug bit:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/pdf/nan_15.pdf?cp=15_6"&gt;https://infocenter.nordicsemi.com/pdf/nan_15.pdf?cp=15_6&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280505?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 06:59:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df331b7a-d9ef-40e2-99ea-c8930847d705</guid><dc:creator>Nitesh Dubey</dc:creator><description>&lt;p&gt;Dear Daniel and&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have tried all the ways you suggested. But the problem is still the same. I have seen a query on this site. I think it may be the problem with debug bit. Debug bit should not be set. But, now I am confused how to reset the debug bit.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I humble request that please go to the URL and check if I am right.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27483/nrf24le1---toggle-problem/108551"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/27483/nrf24le1---toggle-problem/108551&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280367?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 13:16:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dee72ffb-f605-4f8a-a4f6-7e17f544758f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You&amp;#39;re absolutely right. It should be (0x30 | 4) for pull-down.&lt;/p&gt;
&lt;p&gt;My apologies for the mistake.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280364?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 13:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bb4e057-57f6-4eb9-9088-34f920fffbe1</guid><dc:creator>Daniel Chisholm</dc:creator><description>&lt;p&gt;&lt;span&gt;H&amp;aring;kon, from the datasheet image you posted shouldn&amp;#39;t it be 0x30 for pulldown, not 0x50 (which would be pullup, if I am reading the bitfields correctly)? i.e.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;P1CON = (0x30 | pin), for P1.4: P1CON = 0x34;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;Nitesh, in your most recent post you set&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;P1CON = 0x50;&lt;/span&gt;&lt;/pre&gt;
&lt;p style="text-align:left;"&gt;&lt;span&gt;... which would be affecting pin P1.0 rather than P1.4 as intended (need to | it with 4)?&amp;nbsp; Try 0x54 or 0x34?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280348?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 12:29:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c201d81-9e6e-454b-b364-b5727de8b46b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;You placed a pull-down on P1.0 by calling &amp;quot;P1CON=0x30;&amp;quot;&lt;/p&gt;
&lt;p&gt;Please see my former comment and check the datasheet on how to correctly set pull-down on P1.4.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280329?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 11:40:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:638126d0-8da9-482a-ba18-f6f8b8214e0c</guid><dc:creator>Nitesh Dubey</dc:creator><description>&lt;p&gt;Not solved !!!&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;reg24le1.h&amp;quot;

void main()
{
	P0DIR = 0x00;  // set PORT0 as output
	//P1DIR = 0xff;  // set PORT1 as input
	P1CON = 0x50;
	while(1)  // infinite loop
	{
		if (P1 &amp;amp; 0x10)     // check P1.4 is high
		{
			P0 = 0x01;
		}
		else
		{
			P0 = 0x00;
		}
	}
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280325?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 11:22:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:525ec026-eeb5-4122-b80a-8ac59b034d20</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Try this, in case other inputs are set high as well:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (P1 &amp;amp; 0x10)     // check P1.4 is high&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280322?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 11:17:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad6a4c41-e7c5-4d1a-a0bf-b411846a0f6c</guid><dc:creator>Nitesh Dubey</dc:creator><description>&lt;p&gt;I have tried with pull down resister but problem is still the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to configure Port 1 as input.</title><link>https://devzone.nordicsemi.com/thread/280270?ContentTypeID=1</link><pubDate>Tue, 17 Nov 2020 09:15:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eae6604c-0db3-499d-ad7d-1927bf151927</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have an external pull resistor on P1.4?&lt;/p&gt;
&lt;p&gt;It looks like your button is active high, so you can try to configure a pull-down resistor on P1.4 using P1CON register:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8637.pastedimage1605604453856v2.png" alt=" " /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pull-up example: P1CON = (0x50 | pin), for P1.4: P1CON = 0x54;&lt;/p&gt;
&lt;p&gt;Pull-down example:&amp;nbsp;&lt;span&gt;P1CON = (0x30 | pin), for P1.4: P1CON = 0x34;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind 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>