<?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>Which GPIO is used to wake up NRF52832 from System_Off</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59561/which-gpio-is-used-to-wake-up-nrf52832-from-system_off</link><description>Hi, 
 I use a board from Adafruit with NRF52832 to make a POC (Proff Of Concept) (Adafruit Feather nRF52 Bluefruit LE - nRF52832 - PRODUCT ID: 3406). 
 I use the Arduino IDE and a library &amp;quot;LOW POWER&amp;quot; for NRF52832 ( https://github.com/mristau/Arduino_nRF5x_lowPower</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Apr 2020 15:25:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59561/which-gpio-is-used-to-wake-up-nrf52832-from-system_off" /><item><title>RE: Which GPIO is used to wake up NRF52832 from System_Off</title><link>https://devzone.nordicsemi.com/thread/243727?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 15:25:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:caa4141e-08fb-41bf-ad87-9fc2c276e30f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It could be related. Which bits are set in the LATCH? Have you checked if the corresponding pin is configured to meet the conditions for the errata?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which GPIO is used to wake up NRF52832 from System_Off</title><link>https://devzone.nordicsemi.com/thread/243568?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 08:48:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b31abd16-8796-4ade-a432-0dcfce45ad0c</guid><dc:creator>ChrisR1</dc:creator><description>&lt;p&gt;Dear Jorgen,&lt;br /&gt;&lt;br /&gt;Thank you. I already try and it don&amp;#39;t works. Perhaps I made a mistake and I will check it. But I found this documents, dou you think it could explain why LATCH REGISTER is always to &amp;quot;1&amp;quot; even if I use this comand : &amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;NRF_GPIO-&amp;gt;LATCH = NRF_GPIO-&amp;gt;LATCH;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_210.html"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_210.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;h1 class="title topictitle1" id="ariaid-title1"&gt;[210] GPIO: Bits in GPIO LATCH register are incorrectly set to 1&lt;/h1&gt;
&lt;div class="body refbody"&gt;
&lt;p class="shortdesc"&gt;This anomaly applies to IC Rev. Revision 2, build codes CIAA-Ex0, QFAA-Ex0, QFAB-Ex0.&lt;/p&gt;
&lt;div class="section"&gt;It was inherited from the previous IC revision&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a class="xref" href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev1/ERR/nRF52832/Rev1/latest/err_832.html"&gt;Revision 1&lt;/a&gt;.&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h2 class="title sectiontitle"&gt;Symptoms&lt;/h2&gt;
&lt;p class="p"&gt;The GPIO.LATCH[n] register is unexpectedly set to 1 (Latched).&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h2 class="title sectiontitle"&gt;Conditions&lt;/h2&gt;
&lt;p class="p"&gt;Set GPIO.PIN_CNF[n].SENSE at low level (3) at the same time as PIN_CNF[n].INPUT is set to Connect (0).&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h2 class="title sectiontitle"&gt;Consequences&lt;/h2&gt;
&lt;p class="p"&gt;The GPIO.LATCH[n] register is set to 1 (Latched). This could have side effects, depending on how the chip is configured to use this LATCH register.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section"&gt;
&lt;h2 class="title sectiontitle"&gt;Workaround&lt;/h2&gt;
&lt;p class="p"&gt;Always configure PIN_CNF[n].INPUT before PIN_CNF[n].SENSE.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="related-links"&gt;
&lt;div class="familylinks"&gt;
&lt;div class="parentlink"&gt;&lt;strong&gt;Parent topic:&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a class="link" title="The following anomalies are present in revision Revision 2 of the nRF52832 chip." href="https://infocenter.nordicsemi.com/topic/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/err_832_new.html"&gt;New and inherited anomalies&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which GPIO is used to wake up NRF52832 from System_Off</title><link>https://devzone.nordicsemi.com/thread/243564?ContentTypeID=1</link><pubDate>Mon, 06 Apr 2020 08:17:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:719a2f98-913c-4fe0-9f5d-88094e8681d7</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;To clear the LATCH register, you need to write &amp;#39;1&amp;#39; to the bits you want to clear. I used the following to clear the entire register:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_GPIO-&amp;gt;LATCH = NRF_GPIO-&amp;gt;LATCH;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which GPIO is used to wake up NRF52832 from System_Off</title><link>https://devzone.nordicsemi.com/thread/243449?ContentTypeID=1</link><pubDate>Fri, 03 Apr 2020 16:31:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6fd5c13-5bcd-43dd-a43c-752a39344bea</guid><dc:creator>ChrisR1</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
&lt;p&gt;Thank you very much for your help. Today I success to read the latch register. But I don&amp;#39;t know how to clear tis register before entering SYSTEM OFF mode. I have to chack how to do that with ARDUINO IDE....&lt;br /&gt;&lt;br /&gt;To read I use and obtain always all bits to &amp;quot;1&amp;quot;:&lt;/p&gt;
&lt;p&gt;typedef volatile uint32_t REG32;&lt;br /&gt;#define pREG32 (REG32 *)&lt;/p&gt;
&lt;p&gt;#define LATCH (*(pREG32 (0x10000520)))&lt;/p&gt;
&lt;p&gt;I used this sample code to do that:&lt;/p&gt;
&lt;p&gt;#include &amp;lt;Arduino.h&amp;gt;&lt;/p&gt;
&lt;p&gt;typedef volatile uint32_t REG32;&lt;br /&gt;#define pREG32 (REG32 *)&lt;/p&gt;
&lt;p&gt;#define DEVICE_ID_HIGH (*(pREG32 (0x10000060)))&lt;br /&gt;#define DEVICE_ID_LOW (*(pREG32 (0x10000064)))&lt;br /&gt;#define MAC_ADDRESS_HIGH (*(pREG32 (0x100000a8)))&lt;br /&gt;#define MAC_ADDRESS_LOW (*(pREG32 (0x100000a4)))&lt;/p&gt;
&lt;p&gt;void setup() {&lt;br /&gt; Serial.begin(115200);&lt;br /&gt; while ( !Serial ) delay(10); // for nrf52840 with native usb&lt;/p&gt;
&lt;p&gt;Serial.println(&amp;quot;Bluefruit 52 HW Info&amp;quot;);&lt;br /&gt; Serial.println(&amp;quot;&amp;quot;);&lt;/p&gt;
&lt;p&gt;// MAC Address&lt;br /&gt; uint32_t addr_high = ((MAC_ADDRESS_HIGH) &amp;amp; 0x0000ffff) | 0x0000c000;&lt;br /&gt; uint32_t addr_low = MAC_ADDRESS_LOW;&lt;br /&gt; Serial.print(&amp;quot;MAC Address: &amp;quot;);&lt;br /&gt; Serial.print((addr_high &amp;gt;&amp;gt; 8) &amp;amp; 0xFF, HEX); Serial.print(&amp;quot;:&amp;quot;);&lt;br /&gt; Serial.print((addr_high) &amp;amp; 0xFF, HEX); Serial.print(&amp;quot;:&amp;quot;);&lt;br /&gt; Serial.print((addr_low &amp;gt;&amp;gt; 24) &amp;amp; 0xFF, HEX); Serial.print(&amp;quot;:&amp;quot;);&lt;br /&gt; Serial.print((addr_low &amp;gt;&amp;gt; 16) &amp;amp; 0xFF, HEX); Serial.print(&amp;quot;:&amp;quot;);&lt;br /&gt; Serial.print((addr_low &amp;gt;&amp;gt; 8) &amp;amp; 0xFF, HEX); Serial.print(&amp;quot;:&amp;quot;);&lt;br /&gt; Serial.print((addr_low) &amp;amp; 0xFF, HEX); Serial.println(&amp;quot;&amp;quot;);&lt;/p&gt;
&lt;p&gt;// Unique Device ID&lt;br /&gt; Serial.print(&amp;quot;Device ID : &amp;quot;);&lt;br /&gt; Serial.print(DEVICE_ID_HIGH, HEX);&lt;br /&gt; Serial.println(DEVICE_ID_LOW, HEX);&lt;/p&gt;
&lt;p&gt;// MCU Variant;&lt;br /&gt; Serial.printf(&amp;quot;MCU Variant: nRF%X 0x%08X\n&amp;quot;,NRF_FICR-&amp;gt;INFO.PART, NRF_FICR-&amp;gt;INFO.VARIANT);&lt;br /&gt; Serial.printf(&amp;quot;Memory : Flash = %d KB, RAM = %d KB\n&amp;quot;, NRF_FICR-&amp;gt;INFO.FLASH, NRF_FICR-&amp;gt;INFO.RAM);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;void loop() {&lt;br /&gt; // put your main code here, to run repeatedly:&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which GPIO is used to wake up NRF52832 from System_Off</title><link>https://devzone.nordicsemi.com/thread/243256?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 17:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3536c328-2e6e-4d3a-a7a3-7225840c9370</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I looked a bit further into this, and there may be a way to read out the GPIO that caused the wake.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html#unique_577666769"&gt;GPIO registers are not reset at a wakeup from SYSTEM OFF&lt;/a&gt;. So if you clear the LATCH register before entering SYSTEM OFF mode, the LATCH register will indicate which&amp;nbsp;pin was used to wake the chip (given that no other GPIOs have been set during the startup).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which GPIO is used to wake up NRF52832 from System_Off</title><link>https://devzone.nordicsemi.com/thread/242864?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 08:47:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81a025a4-d47c-45dd-bbfe-c27bde5932d0</guid><dc:creator>ChrisR1</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
&lt;p&gt;Thanks a lot for your reply and your help. I&amp;nbsp;don&amp;#39;t have a bionic hand ;o). I already move my GPIOs checking at the beginning of my software. The result is the same. You&amp;#39;re right, I also think that the problem&amp;nbsp;is with the embedded &amp;quot;bootloader&amp;quot; of Arduino.&amp;nbsp;This bootloader must certainly extend the boot time. I don&amp;#39;t exactly measure the boot time, but around between 1 or 2 seconds...&lt;br /&gt;I newbie and I don&amp;#39;t know now if I can use another way to read quickly the GPIOs state. If I read directly the register &amp;quot;&lt;span&gt;RESETREAS&amp;quot; and latch on the Gpio, it will run.&lt;br /&gt;Other way, learn to use and program with another IDE like KEIL and SDK. But I need to make quickly a proof of concept...&lt;br /&gt;&lt;br /&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Chris&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which GPIO is used to wake up NRF52832 from System_Off</title><link>https://devzone.nordicsemi.com/thread/242147?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2020 14:46:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75f7d844-4a4d-433a-b91f-e45c942ab85a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no way to know this except to check the state of the GPIO after wakeup/reset. The &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html#unique_744469603"&gt;startup time from OFF to CPU is 16.5 us&lt;/a&gt;, you should have a quick hand to release the button before you are able to check the state. What kind of startup time are you seeing? Maybe you need to move the GPIO checking earlier in the program? I&amp;#39;m not sure what kind of startup delay the Arduino libraries will add to the chip startup time.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>