<?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>Using the VDDH, setting the VDD level and measuring the current of a nRF52833 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63627/using-the-vddh-setting-the-vdd-level-and-measuring-the-current-of-a-nrf52833-dk</link><description>Dear all, I want to measure the current consumption of my application on a nRF52833 DK. On top of that I want to be able to power the device using the VDDH and set the VDD to one of the available values: What I have achieved so far is to measure current</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Jul 2020 11:36:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63627/using-the-vddh-setting-the-vdd-level-and-measuring-the-current-of-a-nrf52833-dk" /><item><title>RE: Using the VDDH, setting the VDD level and measuring the current of a nRF52833 DK</title><link>https://devzone.nordicsemi.com/thread/262380?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2020 11:36:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a3590e7-c8dc-4188-a99f-28e886003273</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, sorry for not helping you with the original question (I don&amp;#39;t use SES), but I would suggest that you check the UICR register at startup and then write the correct value. I also think it is more robust. It&amp;#39;s what we do in the SDK already with other values in the UICR. If you have a look in system_nrf52833.c you can see how the pin reset is configured in UICR:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;      #if defined (CONFIG_GPIO_AS_PINRESET)
          if (((NRF_UICR-&amp;gt;PSELRESET[0] &amp;amp; UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected &amp;lt;&amp;lt; UICR_PSELRESET_CONNECT_Pos)) ||
              ((NRF_UICR-&amp;gt;PSELRESET[1] &amp;amp; UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected &amp;lt;&amp;lt; UICR_PSELRESET_CONNECT_Pos))){
              NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Wen &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos;
              while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}
              NRF_UICR-&amp;gt;PSELRESET[0] = 18;
              while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}
              NRF_UICR-&amp;gt;PSELRESET[1] = 18;
              while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}
              NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Ren &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos;
              while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}
              NVIC_SystemReset();
          }
      #endif
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It checks if the UICR register is set according to the compiler definitions. If it is, it just continues to main(). If not, it sets the value, and does a soft reset. The default value for REGOUT0 is 0xFFFFFFFF so no need to erase first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the VDDH, setting the VDD level and measuring the current of a nRF52833 DK</title><link>https://devzone.nordicsemi.com/thread/261922?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2020 09:25:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df89e562-d955-4548-9030-3b66473d2644</guid><dc:creator>Giannis Anastasopoulos</dc:creator><description>&lt;p&gt;I tried your advice, but there is still the same error while compiling:&lt;br /&gt;&lt;br /&gt;C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.52c/gcc/arm-none-eabi/bin/ld: error: .uicr_regout0 is too large to fit in UICR memory segment&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the VDDH, setting the VDD level and measuring the current of a nRF52833 DK</title><link>https://devzone.nordicsemi.com/thread/261758?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2020 10:14:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55c6c9b9-5e9b-4dea-884e-ade7bc96be67</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;I think maybe that this:&lt;/p&gt;
&lt;pre&gt;linker_section_placements_segments=&amp;quot;FLASH RX 0x0 0x80000;RAM RWX 0x20000000 0x20000;UICR RX 0x10001000 0x304&amp;quot;&lt;/pre&gt;
&lt;p&gt;should be changed to this:&lt;/p&gt;
&lt;pre&gt;linker_section_placements_segments=&amp;quot;FLASH RX 0x0 0x80000;RAM RWX 0x20000000 0x20000;UICR RX 0x10001000 &lt;strong&gt;0x308&lt;/strong&gt;&amp;quot;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the VDDH, setting the VDD level and measuring the current of a nRF52833 DK</title><link>https://devzone.nordicsemi.com/thread/261510?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2020 07:30:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a432f5c-f7b1-4320-801a-5148a496f483</guid><dc:creator>Giannis Anastasopoulos</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/stian"&gt;Stian Røed Hafskjold&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much for your reply. I was wondering if there is any way to add the VDD voltage configuration in the final hex file, so that I can have a complete production hex file and no need for extra steps. &lt;br /&gt;&lt;br /&gt;I was also wondering if there is any refference compiled code that I can use as a baseline for power consumption. Something like a beacon for example that has known power consumption, so that I can test it against custom desing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the VDDH, setting the VDD level and measuring the current of a nRF52833 DK</title><link>https://devzone.nordicsemi.com/thread/259945?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 14:15:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7872225f-2c39-47e2-b1c3-f96e3066cd9d</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Unfortunately, the DK is not designed for power measurements on the LiPo header. This header will include currents going to the debugger and everything else on the DK. You can however measure the current going through the VDDH measurement header.&lt;/p&gt;
&lt;p&gt;The easiest way to set the VDD voltage is to write to the UICR directly through the debugger. You can use nrfjprog.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrfjprog --memwr 0x10001304 --val &amp;lt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/uicr.html?cp=4_1_0_3_4_0_7#register.REGOUT0"&gt;value&lt;/a&gt;&amp;gt;&lt;/p&gt;
&lt;p&gt;To write a new value. Do a nrfjprog --eraseall first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using the VDDH, setting the VDD level and measuring the current of a nRF52833 DK</title><link>https://devzone.nordicsemi.com/thread/259451?ContentTypeID=1</link><pubDate>Fri, 10 Jul 2020 13:06:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99e4272c-37cf-4dcb-835c-1a5085713cd9</guid><dc:creator>Giannis Anastasopoulos</dc:creator><description>&lt;p&gt;Please note that when I measure the power consumption on the board, I have the USB attached. If I remove it the power consumption increase by about 340uA. So I am not sure if I am measuring the current properly at this point.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>