<?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>about sys_reboot(SYS_REBOOT_WARM) with PIO Keep</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107294/about-sys_reboot-sys_reboot_warm-with-pio-keep</link><description>Hi. 
 How can keep PIO level after calling sys_reboot (SYS_REBOOT_WARM) ?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Jan 2024 07:11:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107294/about-sys_reboot-sys_reboot_warm-with-pio-keep" /><item><title>RE: about sys_reboot(SYS_REBOOT_WARM) with PIO Keep</title><link>https://devzone.nordicsemi.com/thread/464078?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2024 07:11:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4b5f329-b692-4676-a3b4-9439bb236726</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Good to hear that it worked. Thank you for the update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about sys_reboot(SYS_REBOOT_WARM) with PIO Keep</title><link>https://devzone.nordicsemi.com/thread/464069?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2024 01:43:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc77ded5-1971-4e93-bf7c-4cf440fd2ec8</guid><dc:creator>ZL_Chiu</dc:creator><description>&lt;p&gt;Thanks , It&amp;#39;s Work now !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about sys_reboot(SYS_REBOOT_WARM) with PIO Keep</title><link>https://devzone.nordicsemi.com/thread/463900?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2024 07:05:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89330b0a-5854-4438-b5af-65045a9dabfd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I replaced the broken link in my previous reply with a code snippet. Please try to&amp;nbsp;implement&amp;nbsp;the same&amp;nbsp;in your application to configure the pin as an output and set it HIGH before main().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about sys_reboot(SYS_REBOOT_WARM) with PIO Keep</title><link>https://devzone.nordicsemi.com/thread/463878?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2024 00:19:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ad4d07a-766e-4072-85ee-7841ee93c3fa</guid><dc:creator>ZL_Chiu</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;i need set PIO default level is Hi , when system reset , the PIO will set to Hi , How to do ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;i has enable MCUBOOT , if added&amp;nbsp;CONFIG_REBOOT=y in prj.conf , It&amp;#39;s&amp;nbsp;&lt;span class="Y2IQFc" lang="en"&gt;possible can keep pio level after call sys_reboot (0) ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="Y2IQFc" lang="en"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="Y2IQFc" lang="en"&gt;by the way , ca&amp;#39;t access web address form your post&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about sys_reboot(SYS_REBOOT_WARM) with PIO Keep</title><link>https://devzone.nordicsemi.com/thread/463828?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2024 16:01:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88499438-ee5a-4035-9087-75aa61e3683e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The GPIO configurations&amp;nbsp;are reset to their default settings after a reset. In other words, retaining the pin state through a reset is not possible. However, you can re-initialize the pin during early boot to make this less noticeable. For instance, by using the SYS_INIT() macro&amp;nbsp;similar to how it is used in the snippet below.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static int gpio_init(const struct device *unused)
{
	int err;
	const struct gpio_dt_spec gpio_pin = //TODO: assign pin info from devicetree;

	if (!device_is_ready(gpio_pin.port)) {
		LOG_ERR(&amp;quot;GPIO is not ready&amp;quot;);
		return -EIO;
	}

	err = gpio_pin_configure_dt(&amp;amp;gpio_pin, GPIO_OUTPUT_ACTIVE);
	if (err) {
		LOG_ERR(&amp;quot;Error while configuring gpio_pin (err %d)&amp;quot;, err);
		return err;
	}

	k_msleep(50);

	return 0;
}

SYS_INIT(gpio_init, POST_KERNEL, 80);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Reset behavior" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=5_2_0_17_7#unique_961802881"&gt;Reset behavior&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>