<?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>nRF51822: adjust Bootloader space</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88082/nrf51822-adjust-bootloader-space</link><description>Hello, guys. 
 We are using nRF51822 SoC together with nRF5 v12.3.0 SDK. 
 According to the nRF51822 memory layout , we have 127KB of space reserved for the Application code and 20KB of space reserved for the Bootloader: 
 
 Now, we slightly customized</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 May 2022 09:08:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88082/nrf51822-adjust-bootloader-space" /><item><title>RE: nRF51822: adjust Bootloader space</title><link>https://devzone.nordicsemi.com/thread/368759?ContentTypeID=1</link><pubDate>Fri, 20 May 2022 09:08:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4eb5a26-63d2-45cd-a765-93bdcb75d792</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The bootloader handles this scenario(starting from SDK v15/v16). It will check if the WDT is already running or not, and feed all channels that are enabled. But if you are using an older SDK version, you need to backport this feature yourself. You&amp;nbsp;can take a look at nrf_bootloader_wdt.c from the newest SDK version to see how you should do this.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: adjust Bootloader space</title><link>https://devzone.nordicsemi.com/thread/368634?ContentTypeID=1</link><pubDate>Thu, 19 May 2022 13:07:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f3b4d06-2532-40cc-820f-d253b496a90f</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;I can try to initialize watchdog from Bootloader but what will happen in the case it is already initialized from the main Application?&lt;/p&gt;
&lt;p&gt;It can be that WDT channel 0 will be used in the main application and WDT channel 1 in the Bootloader. If I feed channel 1 instead of channel 0 from the Bootloader, that might restart the CPU. What do you think?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: adjust Bootloader space</title><link>https://devzone.nordicsemi.com/thread/368631?ContentTypeID=1</link><pubDate>Thu, 19 May 2022 13:03:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a829b3f1-d165-4276-89d0-cd836849b521</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.1.0/group__nrf__drv__wdt.html#gaaa6ffc697e839a5ce32261e94f92677b"&gt;nrf_drv_wdt_channel_feed&lt;/a&gt;&amp;nbsp;is used to&amp;nbsp;&lt;span&gt;feed the invidual watchdog channel. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you try to initialize the Watchdog timer with&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.1.0/group__nrf__drv__wdt.html#gab6789648906b2a8553a4c07e8859b040"&gt;nrf_drv_wdt_init&lt;/a&gt;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: adjust Bootloader space</title><link>https://devzone.nordicsemi.com/thread/368622?ContentTypeID=1</link><pubDate>Thu, 19 May 2022 12:52:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79fc8e92-3ea4-4517-a1e5-5fa5acff66b4</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello, &lt;a href="https://devzone.nordicsemi.com/members/amanda"&gt;Amanda Hsieh&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Thanks for the reply. It seems it is working fine.&lt;/p&gt;
&lt;p&gt;One more question... I don&amp;#39;t initialize the Watchdog timer within the Bootloader, I just feed it periodically with&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_drv_wdt_channel_feed(0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is basically writing a&amp;nbsp;&lt;span style="background-color:#ccffcc;"&gt;&lt;em&gt;&lt;strong&gt;0x6E524635UL&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt; magic number into &lt;span style="background-color:#ff99cc;"&gt;&lt;em&gt;&lt;strong&gt;NRF_WDT-&amp;gt;RR[0]&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt; register. Do you see any issue with that in the case our main Application does not use (initialize) Watchdog timer?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: adjust Bootloader space</title><link>https://devzone.nordicsemi.com/thread/368571?ContentTypeID=1</link><pubDate>Thu, 19 May 2022 11:07:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fbef181-b60a-4c2b-9c4e-127ca8e709e1</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Is it safe that we increase the Bootloader area for ~2KB and take this space from the Application area (so that now we have 127-2 = 125KB for the Application code)?[/quote]
&lt;p&gt;Yes, as long as the rest space is enough for your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The modification looks fine. Can it work without issue?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>