<?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>RAM retention problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36099/ram-retention-problem</link><description>Hello, 
 
 I&amp;#39;m using nRF5 SDK with version 15, nRF52832 IC and softdevice s132. I need to save hold the data in the ram even in sleep mode. I&amp;#39;m using the below code. However it did not resolved my issue.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Nov 2018 09:33:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36099/ram-retention-problem" /><item><title>RE: RAM retention problem</title><link>https://devzone.nordicsemi.com/thread/156614?ContentTypeID=1</link><pubDate>Fri, 09 Nov 2018 09:33:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53d646e0-1f63-442b-a994-1a16f23d4f0b</guid><dc:creator>strengthstrong</dc:creator><description>&lt;p&gt;#define __retention __attribute__((section(&amp;quot;retention_mem_area0&amp;quot;), zero_init)) // essential&lt;/p&gt;
&lt;p&gt;What do you need to add?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM retention problem</title><link>https://devzone.nordicsemi.com/thread/141071?ContentTypeID=1</link><pubDate>Tue, 24 Jul 2018 04:50:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ebae854-4e5c-4e30-b1c4-169b2bccf96b</guid><dc:creator>rakesh_hirur</dc:creator><description>&lt;p&gt;what about the size of the &lt;strong&gt;&amp;quot;.retained section&amp;quot;&lt;/strong&gt; in placement file ? It is specified as &amp;quot;&lt;strong&gt;8&lt;/strong&gt;&amp;quot; in &lt;strong&gt;&amp;quot;ram_retention_softreset_clean&amp;quot;.&amp;nbsp;&lt;/strong&gt; Is it 8 bytes or 8 RAM sections?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM retention problem</title><link>https://devzone.nordicsemi.com/thread/140457?ContentTypeID=1</link><pubDate>Tue, 17 Jul 2018 18:20:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7274f7d-48b5-4573-b39c-1407becd8fc5</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;That would be the case, yes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM retention problem</title><link>https://devzone.nordicsemi.com/thread/139378?ContentTypeID=1</link><pubDate>Mon, 09 Jul 2018 08:35:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f94784a-7591-43ea-98bd-93167c9f19bf</guid><dc:creator>enkavak</dc:creator><description>&lt;p&gt;For every variable do I need to define it like below for ram retention ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;uint32_t ram_value __attribute__((section(&amp;quot;.retained_section&amp;quot;))) = 0;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM retention problem</title><link>https://devzone.nordicsemi.com/thread/139073?ContentTypeID=1</link><pubDate>Thu, 05 Jul 2018 08:41:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8b41df1-6b77-47d5-b63d-6bc6104daffc</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Here&amp;#39;s an example on how to retain a variable or section with systemoff/soft-reset for SES:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-82e007a825f64132854f8996872de903/ram_5F00_retention_5F00_softreset_5F00_clean.zip"&gt;devzone.nordicsemi.com/.../ram_5F00_retention_5F00_softreset_5F00_clean.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To integrate this into your own project, please note the added section &amp;quot;.retained_section&amp;quot; in the flash_placement.xml file, as this must be added into your project.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM retention problem</title><link>https://devzone.nordicsemi.com/thread/139048?ContentTypeID=1</link><pubDate>Thu, 05 Jul 2018 06:35:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ba73507-271f-4c36-8b4f-3849fb6c5cfc</guid><dc:creator>enkavak</dc:creator><description>&lt;p&gt;A1) I&amp;#39;m using&amp;nbsp;&lt;span&gt;Systemoff&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A2) Segger Embedded studio&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM retention problem</title><link>https://devzone.nordicsemi.com/thread/139047?ContentTypeID=1</link><pubDate>Thu, 05 Jul 2018 06:32:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9afc0468-e628-4f04-8f48-b591d9b20ab8</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In WFE (or sd_app_evt_wait when using the softdevice) there is no need to change the RAM retention settings (assuming using reset values), as WFE will start executing based on where it previously was (just like any C function).&lt;/p&gt;
&lt;p&gt;However, if using SystemOFF, then a wakeup will generate a reset condition, thus must of your states are reset. When using SystemOFF, it is not enough just to set the RAM retention in sleep, but you will also need to make sure that your firmware does not clear/overwrite your data at boot up. This is normally done by making a no-init/zero_init section.&lt;/p&gt;
&lt;p&gt;Q1. Are you using Systemoff?&lt;/p&gt;
&lt;p&gt;Q2: What compiler are you using?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>