<?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 know if an OTA update just happened?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79733/how-to-know-if-an-ota-update-just-happened</link><description>Hello, 
 
 I am currently developing using Zephyr/NCS an application that supports FOTA/DFU. 
 The device needs to be tapped to be woken up and start advertising. So, when a FOTA process happens, the verification phase at the end cannot be performed without</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Sep 2021 14:50:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79733/how-to-know-if-an-ota-update-just-happened" /><item><title>RE: How to know if an OTA update just happened?</title><link>https://devzone.nordicsemi.com/thread/330516?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 14:50:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fd63255-3be4-4e09-8f59-039f146fb859</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;Using a general purpose retention register, I think I can avoid using the fw_info module.&lt;/p&gt;
&lt;p&gt;Thank you for your help again&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know if an OTA update just happened?</title><link>https://devzone.nordicsemi.com/thread/330515?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 14:39:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c11f8c2f-9be8-4af2-b121-d36230efdd47</guid><dc:creator>Sigurd</dc:creator><description>[quote user="mmnano"]How would you implement this using this function ?[/quote]
&lt;p&gt;&amp;nbsp;I would have used it together with the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fpower.html&amp;amp;anchor=register.GPREGRET"&gt;general purpose retention register&lt;/a&gt;&amp;nbsp;.It&amp;#39;s e.g. used to store reset type:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/01a38e7fa55913350c647df1f51715fea5d80daa/soc/arm/nordic_nrf/nrf52/soc.c#L52"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/01a38e7fa55913350c647df1f51715fea5d80daa/soc/arm/nordic_nrf/nrf52/soc.c#L52&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;E.g use&amp;nbsp;&lt;span&gt;nrf_power_gpregret2_set(), and set some value from what fw_info_find() returns, before you start the DFU. Then on reboot, check what&amp;nbsp;fw_info_find() returns and compare with what&amp;nbsp;nrf_power_gpregret2_get() returns. Could perhaps&amp;nbsp;use this without&amp;nbsp;fw_info_find() also. Just set the&amp;nbsp;gpregret register to some magic value before the DFU reboots the app. On reboot, read the register, and check if the magic value is present or not. After the check, remember to set the register back to 0.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know if an OTA update just happened?</title><link>https://devzone.nordicsemi.com/thread/330172?ContentTypeID=1</link><pubDate>Mon, 20 Sep 2021 07:40:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a5ab3b4-1540-4c08-b004-32ede6d68051</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you very much, this is what I was looking for.&lt;/p&gt;
&lt;p&gt;How would you implement this using this function ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to know if an OTA update just happened?</title><link>https://devzone.nordicsemi.com/thread/330001?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 11:19:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cca6de2a-cf19-4565-ae8f-3c657ea9d820</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Maybe I can store something in non-volatile storage or is there a function that can check that somewhere already ?[/quote]
&lt;p&gt;&amp;nbsp;You can use the&amp;nbsp;&lt;span&gt;fw_info module, and the&amp;nbsp;fw_info_find() function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/nrf/include/fw_info.html"&gt;developer.nordicsemi.com/.../fw_info.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>