<?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>Setting VDD to 3.0V</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82545/setting-vdd-to-3-0v</link><description>We have developed a small PCB that connects with some other HW. The integrated nRF52840 runs in HighVoltage-Mode and its required to set VDD to 3.0V. The question - how to do this - was discussed in several articles - I read them all and tried most codes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 10 Dec 2021 07:04:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82545/setting-vdd-to-3-0v" /><item><title>RE: Setting VDD to 3.0V</title><link>https://devzone.nordicsemi.com/thread/342816?ContentTypeID=1</link><pubDate>Fri, 10 Dec 2021 07:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ed50968-f12e-40bf-b412-fb8e57a853b6</guid><dc:creator>Juergen</dc:creator><description>&lt;p&gt;One final question from my side:&lt;/p&gt;
&lt;p&gt;How to run the solution I mentioned before (&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28562/nrf52840-regulator-configuration/113169#113169"&gt;devzone.nordicsemi.com/.../113169&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;I made the changes as&amp;nbsp;described:&lt;/p&gt;
&lt;p&gt;In flash_placement.xml:&lt;/p&gt;
&lt;div class="content-scrollable-wrapper content-scrollable-wrapper-scrolled"&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;MemorySegment name=&amp;quot;UICR&amp;quot; start=&amp;quot;$(UICR_START)&amp;quot; size=&amp;quot;$(UICR_SIZE)&amp;quot;&amp;gt;
  &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.uicr_regout0&amp;quot; start=&amp;quot;0x10001304&amp;quot; size=&amp;quot;4&amp;quot;/&amp;gt;
&amp;lt;/MemorySegment&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;In uicr_config.h (included in main.c):&lt;/p&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;pre&gt;&lt;code&gt;const uint32_t REGOUT0 __attribute__((section(&amp;quot;.uicr_regout0&amp;quot;))) = 4;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;But after build and starting the debugger, REGOUT0 is &amp;quot;0xFFFFFFFF&amp;quot;&amp;quot; and not &amp;quot;0x00000004&amp;quot;.&lt;/p&gt;
&lt;p&gt;What is the reason?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting VDD to 3.0V</title><link>https://devzone.nordicsemi.com/thread/342772?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 16:11:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efc0a347-582d-4c82-b843-da891c3bc6d7</guid><dc:creator>Juergen</dc:creator><description>&lt;p&gt;Your question regarding the J-Link has brought me to a solution:&lt;/p&gt;
&lt;p&gt;Yes, the J-Link is able to work in this Range, but has to be restartet. So if I do as described befor until the Debugger stops with the HW-Error and then I restart and reconnect the J-Link in SES the Debug-Mode runs fine with 3V.&lt;/p&gt;
&lt;p&gt;With this solution I can go on with my project.&lt;/p&gt;
&lt;p&gt;So I would say my idea about a perfect solution will not run.&amp;nbsp; No matter when VDD is changed - the J-Link has to be switched to 3V. This would run only perfectly if the J-Link would have an automatic Level adjustment.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you a lot for your help.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting VDD to 3.0V</title><link>https://devzone.nordicsemi.com/thread/342763?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 15:24:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fce97966-8322-4794-a549-341a363f785a</guid><dc:creator>Juergen</dc:creator><description>&lt;p&gt;1. Debugger Problem:&lt;/p&gt;
&lt;p&gt;I included this snippet in my program,&amp;nbsp;found in &amp;quot;boards.c&amp;quot;:&lt;br /&gt;/*&lt;br /&gt; * Function for configuring UICR_REGOUT0 register&lt;br /&gt; * to set GPIO output voltage to 3.0V.&lt;br /&gt; */&lt;br /&gt;static void gpio_output_voltage_setup(void)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp;// Configure UICR_REGOUT0 register only if it is set to default value.&lt;br /&gt;&amp;nbsp; &amp;nbsp;if ((NRF_UICR-&amp;gt;REGOUT0 &amp;amp; UICR_REGOUT0_VOUT_Msk) ==&lt;br /&gt;&amp;nbsp; &amp;nbsp;(UICR_REGOUT0_VOUT_DEFAULT &amp;lt;&amp;lt; UICR_REGOUT0_VOUT_Pos))&lt;br /&gt;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Wen;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; NRF_UICR-&amp;gt;REGOUT0 = (NRF_UICR-&amp;gt;REGOUT0 &amp;amp; ~((uint32_t)UICR_REGOUT0_VOUT_Msk)) |&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (UICR_REGOUT0_VOUT_3V0 &amp;lt;&amp;lt; UICR_REGOUT0_VOUT_Pos);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Ren;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // System reset is needed to update UICR registers.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; NVIC_SystemReset();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;If I exclude &amp;quot;&lt;span&gt;NVIC_SystemReset();&amp;quot; everthing is running ok, but VDD is still 1,8V. With a RESET or with &amp;quot;NVIC_SystemReset();&amp;quot; the debugger stops&amp;nbsp; with a HW error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. What do I want as a perfect solution:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is also explained in this comment by Jakob:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28562/nrf52840-regulator-configuration/113169#113169"&gt;devzone.nordicsemi.com/.../113169&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/82545/setting-vdd-to-3-0v"&gt;&lt;/a&gt;&lt;/span&gt;&lt;span&gt;But unfortunately&amp;nbsp;I don&amp;#39;t get it run. Esspacially I have not found this path &amp;quot;Code &amp;gt; Build &amp;gt; Memory Segments&amp;nbsp;&amp;quot;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting VDD to 3.0V</title><link>https://devzone.nordicsemi.com/thread/342733?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 13:44:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa93e4ab-614f-45af-8ede-3df3feefe8ab</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;You might have to disconnect/reconect/power-cycle the debug probe after you&amp;#39;ve changed the I/O voltage (changed VDD from 1.8V to 3.0V).&lt;/p&gt;
[quote user="Juergen"]The HW fault occurs when I change 0x304 after build - I tried this as a workaround. But isn&amp;#39;t it better to set 0x304 in the build-process?&amp;nbsp;[/quote]
&lt;p&gt;What exactly do you mean by setting the valtage in the build-process and after build?&amp;nbsp;&lt;br /&gt;Do you mean do say that you&amp;#39;re setting the voltage by writing to UICR with the debugger vs the MCU&amp;#39;s app?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting VDD to 3.0V</title><link>https://devzone.nordicsemi.com/thread/342673?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 10:41:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be7386b5-2733-4f54-b051-af606b873f7d</guid><dc:creator>Juergen</dc:creator><description>&lt;p&gt;I use J-Link ultra + and I just checked the description: It&amp;nbsp;works with 1,2 up to 5V.&lt;/p&gt;
&lt;p&gt;The HW fault occurs when I change 0x304 after build - I tried this as a workaround. But isn&amp;#39;t it better to set 0x304 in the build-process?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting VDD to 3.0V</title><link>https://devzone.nordicsemi.com/thread/342656?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 09:32:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79c41ed2-e3ea-4141-bfb3-047cf4862164</guid><dc:creator>haakonsh</dc:creator><description>[quote user=""]It is posible to set REGOUT0 in UICR 0x304 to 0x04. After the necessary Reset, this works in RUN-Mode outside IDE. In Debugger-Mode the Debugger shows an HW-error and stops. [/quote]
&lt;p&gt;Does your debugger support 3.0V I/O?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>