<?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>Power down/on a RAM section</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65060/power-down-on-a-ram-section</link><description>Hi, 
 I&amp;#39;m trying to find a way to power down and on again a RAM section, but I haven&amp;#39;t had any luck finding. 
 In the SDK examples, there&amp;#39;s a RAM retention example only, but I&amp;#39;m interested in power down a RAM section. 
 If there&amp;#39;s any documents or examples</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Aug 2020 22:54:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65060/power-down-on-a-ram-section" /><item><title>RE: Power down/on a RAM section</title><link>https://devzone.nordicsemi.com/thread/266072?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 22:54:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a058bed-d964-4d07-965a-9bce2ddab6da</guid><dc:creator>Seung</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t know that RAM blocks are powered when the chip is in debug mode. That explains why I was unavailable to power down RAM sections.&amp;nbsp;I will test on release mode.&lt;/p&gt;
&lt;p&gt;Hope it can resolve my issue.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Seung&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power down/on a RAM section</title><link>https://devzone.nordicsemi.com/thread/265943?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 11:19:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed36dc52-bf2c-4ae1-a780-7f5866bae740</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello Seung,&lt;/p&gt;
&lt;p&gt;Yes, writing 0x3 to &lt;span&gt;RAM[0].POWERCLR&lt;/span&gt; will turn off section 0 and 1 in RAM0. I&amp;#39;m not sure how many cycles it takes, but you can read back the RAM[0].POWER register to check the current setting. This should work as a synchronization barrier as well. Note that the RAM block will be powered when the chip is in debug interface mode.&lt;/p&gt;
&lt;p&gt;You can write 0x3 to &lt;span&gt;RAM[0].POWERSET to enable the RAM sections again as you said. NRF_POWER-&amp;gt;RAM[0].POWERCLR = 0 will not have any effect.&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><item><title>RE: Power down/on a RAM section</title><link>https://devzone.nordicsemi.com/thread/265864?ContentTypeID=1</link><pubDate>Sun, 23 Aug 2020 23:05:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d035adfb-517f-4230-900d-6acd88c5eecc</guid><dc:creator>Seung</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thanks for the answer. I have two more questions regarding the second link.&lt;/p&gt;
&lt;p&gt;Based on my understanding, the following code changes values of registers for section 0 and 1 in RAM0, and the system is going to turn off the power of RAM (typically within 10 cycles?).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_POWER-&amp;gt;RAM[0].POWERCLR = 0x3; // 00000011 in binary&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;At this point, after changing the values, how can I check whether&amp;nbsp;the sections are powered down or not?&amp;nbsp;&lt;/span&gt;&lt;span&gt;Can I simply assume that the power is down after 10 cycles?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Another question is how can I turn it on again? By putting zeros to POWERCLR or putting ones to POWERSET?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;NRF_POWER-&amp;gt;RAM[0].POWERCLR = 0; // 00000000 in binary&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;or&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;NRF_POWER-&amp;gt;RAM[0].POWERSET = 0x3;&amp;nbsp;// 00000011 in binary&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Seung&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power down/on a RAM section</title><link>https://devzone.nordicsemi.com/thread/265774?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2020 12:20:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66c631e3-f4bb-4a51-9392-dba297e579cd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not aware of any SDK examples that powers down blocks in System ON, but here are a couple of threads that I think you will find helpful: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/64907/nrf52840---understanding-ram-ahb-slaves-and-sections"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/64907/nrf52840---understanding-ram-ahb-slaves-and-sections&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39396/nrf52840-ram-retention-in-system-on-mode/152628#152628"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/39396/nrf52840-ram-retention-in-system-on-mode/152628#152628&lt;/a&gt;. Please take a look at those, and let me know if anything is unclear.&lt;/p&gt;
&lt;p&gt;And remember that both GCC and SES place the call stack at the end of RAM so be careful not to turn off retention on those. An idea may be to reduce the RAM length in your linker so and turn off the RAM blocks that come after.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>