<?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>What are the preconditions to read GPREGRET?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115562/what-are-the-preconditions-to-read-gpregret</link><description>In my application I want to know if a DFU was executed successful and I&amp;#39;m using GPREGRET2 for it. 
 If a DFU as successful I&amp;#39;m writing GPREGRET2: 
 nrf_power_gpregret2_set(0x02); 
 In my application I read this register but get strange results, reading</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Oct 2024 10:21:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115562/what-are-the-preconditions-to-read-gpregret" /><item><title>RE: What are the preconditions to read GPREGRET?</title><link>https://devzone.nordicsemi.com/thread/506464?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2024 10:21:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6de14d7f-d32f-430c-b24a-916dabb61898</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for the update. Yes, these SD APIs allow the application to access peripherals that have been reserved by the SoftDevice (POWER in this case). This is not necessary when the SoftDevice is disabled. It&amp;#39;s generally a good practice to check the return value when using SD APIs.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/sds_s132/page/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html"&gt;https://docs.nordicsemi.com/bundle/sds_s132/page/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the preconditions to read GPREGRET?</title><link>https://devzone.nordicsemi.com/thread/506453?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2024 09:27:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93b87a7b-4691-420c-91cf-7b4e7c21cbfa</guid><dc:creator>geert_venken</dc:creator><description>&lt;p&gt;Thanks Vidar,&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Indeed using the nrf_power API works.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Looks like SoftDevice was the problem,&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the preconditions to read GPREGRET?</title><link>https://devzone.nordicsemi.com/thread/506440?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2024 08:59:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:665fcb53-fe55-4468-a04a-8c052cb731e0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The sd_power_gpregret_* APIs can only be used after the Softdevice is enabled. They will return with an error&amp;nbsp;otherwise.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you want to read the register before the softdevice is enabled, you can use the&amp;nbsp;nrf_power_gpregret_get() function from nrf_power.h.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>