<?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>Problem with not entering serial recovery mode with nRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104797/problem-with-not-entering-serial-recovery-mode-with-nrf5340</link><description>Hello, 
 We are verifying FW changes using serial recovery on a module equipped with nRF5340. 
 If you use a program that changes the GPIO of the serial recovery start button and reset the GPIO for serial recovery start in the input state, the FW will</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Oct 2023 09:02:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104797/problem-with-not-entering-serial-recovery-mode-with-nrf5340" /><item><title>RE: Problem with not entering serial recovery mode with nRF5340</title><link>https://devzone.nordicsemi.com/thread/451455?ContentTypeID=1</link><pubDate>Fri, 20 Oct 2023 09:02:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3283f96e-ab69-4bfe-b13a-163281b2002a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I see, that is strange. Do you use the exact same firmware on the DK as on the custom board with the NORA-B101-00B module? Meaning the exact same hex files? For such a&amp;nbsp;simple sample, and with this test firmware where you have disabled the LFXO, that should work on both the board with&amp;nbsp;&lt;span&gt;NORA-B101-00B and the DK. If it does not, we need to look more closely at the HW and how you test to see where there could be any differences.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with not entering serial recovery mode with nRF5340</title><link>https://devzone.nordicsemi.com/thread/451163?ContentTypeID=1</link><pubDate>Thu, 19 Oct 2023 00:41:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b83f608-4977-4203-bc46-0910a67d42a6</guid><dc:creator>kudo</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/104797/problem-with-not-entering-serial-recovery-mode-with-nrf5340/451098"]When I test this on the nRF5340 DK, recovery mode is entered when 1.15 is high, which is the same as you see from what I understand?[/quote]
&lt;p&gt;Yes, the behavior is the same.&lt;br /&gt;Inputting High to P1.15 will enter recovery mode.&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/104797/problem-with-not-entering-serial-recovery-mode-with-nrf5340/451098"]When it comes to your custom board I am not able to test that, but I wonder if you have double checked that P1.15 is actually connected?[/quote]
&lt;p&gt;Yes, we have confirmed that the custom board&amp;#39;s FW is able to detect P1.15 using the code below based on the hello_world sample.&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;nrf5340dk_nrf5340_cpuapp_ns.overlay :&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
	buttons {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		bootkey: boot_key {
			gpios = &amp;lt;&amp;amp;gpio1 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)&amp;gt;;
			label = &amp;quot;boot start key&amp;quot;;
		};
    };
	aliases {
        tp0 = &amp;amp;bootkey;
    };
};

&amp;amp;spi4{
    status = &amp;quot;disabled&amp;quot;;
};&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;main.c:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;zephyr/sys/printk.h&amp;gt;

#define SLEEP_TIME_MS	1000

#define TP0_NODE	DT_ALIAS(tp0)
#if !DT_NODE_HAS_STATUS(TP0_NODE, okay)
#error &amp;quot;Unsupported board: tp0 devicetree alias is not defined&amp;quot;
#endif
static const struct gpio_dt_spec testpin = GPIO_DT_SPEC_GET_OR(TP0_NODE, gpios,
								  {0});

void main(void)
{
	int ret;
	
	printk(&amp;quot;Hello World! %s\n&amp;quot;, CONFIG_BOARD);

	if (!device_is_ready(testpin.port)) {
		printk(&amp;quot;Error: testpin device %s is not ready\n&amp;quot;,
		       testpin.port-&amp;gt;name);
		return;
	}

	ret = gpio_pin_configure_dt(&amp;amp;testpin, GPIO_INPUT);
	if (ret != 0) {
		printk(&amp;quot;Error %d: failed to configure %s pin %d\n&amp;quot;,
		       ret, testpin.port-&amp;gt;name, testpin.pin);
		return;
	}

	while (1) {
		int val = gpio_pin_get_dt(&amp;amp;testpin);
		
		if (val &amp;gt; 0) {
			printk(&amp;quot;pin high\n&amp;quot;);
		}
		else if (val == 0) {
			printk(&amp;quot;pin low\n&amp;quot;);
		}
		
		k_msleep(SLEEP_TIME_MS);
	}
}&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with not entering serial recovery mode with nRF5340</title><link>https://devzone.nordicsemi.com/thread/451098?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2023 14:18:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20687495-5984-4876-b2e2-920b61e527e9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When I test this on the nRF5340 DK, recovery mode is entered when 1.15 is high, which is the same as you see from what I understand? When it comes to your custom board I am not able to test that, but I wonder if you have double checked that P1.15 is actually connected? Are you able to read both a high a and a low state on that pin on your custom board&amp;nbsp;with a simple test firmware just to rule out that as an issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>