<?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>[nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97026/nrf52832-how-to-update-retention-memory-configuration-through-dfu</link><description>When the system is working normally, we will transmit logs and other data from the local to the peer through rf communication. 
 
 However, when the system suddenly goes to sleep or restarts due to an abnormal error, the logs will not be transmitted to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Mar 2023 11:37:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97026/nrf52832-how-to-update-retention-memory-configuration-through-dfu" /><item><title>RE: [nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/thread/415976?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2023 11:37:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f77cfd18-621b-4119-8051-2abf27d3d0d1</guid><dc:creator>lamb0145</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;OK. Thank you. I will try it.&lt;/p&gt;
&lt;p&gt;^_^&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/thread/415810?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 17:41:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7190420f-e311-4ebb-ba37-2fc1f50456a1</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;You&amp;#39;re welcome, but I have to make a correction! The nRF5 SDK has a &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s140%2FSDS%2Fs1xx%2Fmbr_bootloader%2Fmbr_bootloader.html&amp;amp;cp=5_7_4_0_11"&gt;Master Boot Record&lt;/a&gt;, and it is actually possible to update the bootloader itself through a DFU.&lt;/p&gt;
&lt;p&gt;So,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;can I update the memory configuration by using dfu (such as adding a noinit area)?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, it should actually be possible. As mentioned before, you would have to update the noinit area of both the bootloader and application, to have matching address ranges.&lt;/p&gt;
&lt;p&gt;Bootloader DFU samples can be found in your installation: &lt;code&gt;&lt;span&gt;&lt;span dir="ltr"&gt;nRF5_SDK_17.1.0_ddde560\examples\dfu\secure_dfu_test_images\ble\&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I hope that&amp;#39;s useful!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/thread/415586?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 03:37:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b2cd976-fcc9-48cc-9f05-1aad1531ddb6</guid><dc:creator>lamb0145</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;OK, your answer has been detailed and exactly what I needed.&lt;/p&gt;
&lt;p&gt;Thanks a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/thread/415557?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2023 17:09:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dce975e8-4a46-48da-9c87-97b9877e30b6</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;If by &amp;quot;updating the memory configuration&amp;quot; you mean change the .noinit RAM address ranges, then no, I don&amp;#39;t think you&amp;#39;ll be able to change this over a DFU.&lt;/p&gt;
&lt;p&gt;You have to ensure that the bootloader and the application both agree on what is .noinit RAM, if you want your logs to be preserved. If you only change the .noinit RAM range for the application, the bootloader will still overwrite it. And the bootloader can&amp;#39;t be upgraded&lt;/p&gt;
&lt;p&gt;So you will have to first update your bootloader configuration, making sure that the defined noinit range is correct there. Then you must flash this to the device directly, with a debugger.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Regarding flash data storage, take a look at the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Ffds_example.html"&gt;Flash Data Storage example&lt;/a&gt; if you haven&amp;#39;t used it before. I intended to suggest that you could back up your logs from RAM to Flash right before you perform a DFU (but I prefer the noinit RAM method you are looking at currently!). Since DFU&amp;#39;s don&amp;#39;t happen frequently, I don&amp;#39;t think you will have to worry about the &amp;quot;limit on the number of erasing and writing&amp;quot;, as you asked earlier.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In addition, if the power is turned off abnormally during the process of saving logs, will there be problems?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, you might lose data.&lt;/p&gt;
&lt;p&gt;If it is critical for you to keep your logs, you could also try to log to flash continuously. I found a case on that here, but it&amp;#39;s quite old: &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/19703/is-it-possible-to-continuously-log-data-to-flash-memory"&gt;Is it possible to continuously log data to flash memory?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t usually work with the nRF5 SDK so my experience is limited. But let me know if you have further questions.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/thread/414828?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 09:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85bc6fe2-7096-40ff-b0e2-bccce8019099</guid><dc:creator>lamb0145</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Ok, thank you, yes, I use keil, so back to this question, can I update the memory configuration by using dfu (such as adding a noinit area)?&lt;/p&gt;
&lt;p&gt;In fact, I added a noinit area through the example of the above url link. After compiling the upgrade package, and then using dfu to upgrade, I found that the relevant memory area has not been reserved.&lt;/p&gt;
&lt;p&gt;(I don&amp;#39;t know if I am missing the necessary configuration, or if the modification of the memory configuration cannot take effect through the dfu upgrade.)&lt;/p&gt;
&lt;p&gt;In addition, you mentioned saving logs to flash, is there any relevant information? I want to find out if it can meet my needs.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/thread/413071?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 14:51:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bfee682-e541-42e7-b291-58fc51374ed4</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi, regarding the RAM retention:&lt;/p&gt;
&lt;p&gt;My colleague tells me that the startup script of the bootloader (which places data to designated places in RAM) is probably overwriting the .noinit section of your application. So according to him, the only thing you have to do is to define the same address range as .noinit in the bootloader, as you did in your application. Then the data won&amp;#39;t be initialized to 0 during startup of either the application or the bootloader.&lt;/p&gt;
&lt;p&gt;You can take a look at the generated .map files to verify that the same ranges are defined as .noinit.&lt;/p&gt;
&lt;p&gt;I assume you are using Keil, since you linked to that previous case on RAM retention.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/thread/412127?ContentTypeID=1</link><pubDate>Mon, 27 Feb 2023 01:25:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65d0610c-6e16-4362-8072-9670be0d15a9</guid><dc:creator>lamb0145</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your reply. I don&amp;#39;t know much about it, I just think that flash has a limit on the number of erasing and writing, so I didn&amp;#39;t choose this way. In addition, if the power is turned off abnormally during the process of saving logs, will there be problems?&lt;/p&gt;
&lt;p&gt;If there is a solution to save the log in flash, I can try it.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/thread/412124?ContentTypeID=1</link><pubDate>Sun, 26 Feb 2023 23:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7172d489-4e38-47d2-8bbb-87971f0962c2</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll have to consult with a colleague on this Ram retention issue. Meanwhile, have you considered backing up your logs to some flash partition (non-volatile storage) before performing a DFU, and retrieving it afterwards?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nrf52832] How to update retention memory configuration through DFU？</title><link>https://devzone.nordicsemi.com/thread/411815?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2023 03:56:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dff39086-c845-4d73-8e41-ff83d2d1bf37</guid><dc:creator>lamb0145</dc:creator><description>&lt;p&gt;By the way, we have a bootloader,&amp;nbsp;if possible, please tell me how to configure this part.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>