<?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>Problem with custom DFU Buttonless app (bootloader + settings + app .hex with bond_forwarding doesn&amp;#39;t run)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60994/problem-with-custom-dfu-buttonless-app-bootloader-settings-app-hex-with-bond_forwarding-doesn-t-run</link><description>Hello, 
 I&amp;#39;m developing an app for NRF52832 SDK 15.3, SD 132 6.1.1 with NUS service and Peer Manager with LESC JustWorks security and other FDS records. My app information is more extensively described here . 
 I want to use the DFU bootloader with the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 May 2020 08:49:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60994/problem-with-custom-dfu-buttonless-app-bootloader-settings-app-hex-with-bond_forwarding-doesn-t-run" /><item><title>RE: Problem with custom DFU Buttonless app (bootloader + settings + app .hex with bond_forwarding doesn't run)</title><link>https://devzone.nordicsemi.com/thread/249623?ContentTypeID=1</link><pubDate>Wed, 13 May 2020 08:49:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8431c52-9e9b-45be-87bc-abac1e1bf026</guid><dc:creator>Bruno Santamaria</dc:creator><description>&lt;p&gt;Hi, that was it!&lt;/p&gt;
&lt;p&gt;Of course, the reset pin! I removed the&amp;nbsp;&lt;span&gt;CONFIG_GPIO_AS_PINRESET months ago at the beggining of the development. What I didn&amp;#39;t expect is that, if the bootloader has that flag, the pin is still used for reset in the app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now I applied the same configuration of my app to the bootloader and my button on P0.21 works again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with custom DFU Buttonless app (bootloader + settings + app .hex with bond_forwarding doesn't run)</title><link>https://devzone.nordicsemi.com/thread/249611?ContentTypeID=1</link><pubDate>Wed, 13 May 2020 07:49:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7b414fb-f7ef-4024-ba09-32aff122c548</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The reset pin (P0.21) is enabled by default in all of our SDK examples by including the&amp;nbsp;CONFIG_GPIO_AS_PINRESET flag in the preprocessor definitions.&amp;nbsp;&amp;nbsp;So it must be removed if you are using P0.21 as a regular GPIO.&lt;/p&gt;
&lt;p&gt;Note that the pin reset setting is stored in the non-volatile UICR section, so you will need to perform an ERASEALL or UICRERASE to clear this setting.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with custom DFU Buttonless app (bootloader + settings + app .hex with bond_forwarding doesn't run)</title><link>https://devzone.nordicsemi.com/thread/249358?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 07:51:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feefb727-3271-4ab0-9e08-63feba7f7e9b</guid><dc:creator>Bruno Santamaria</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;,&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/60994/problem-with-custom-dfu-buttonless-app-bootloader-settings-app-hex-with-bond_forwarding-doesn-t-run/248891"]The best solution is to allocate a fixed portion of RAM to rtt as explained in the forum thread you linked to. But it requires some work, and the approach will differ depending on toolchain type.[/quote]
&lt;p&gt;For now I&amp;#39;m trying to avoid doing this, especially since my bootloader is not logging.&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/60994/problem-with-custom-dfu-buttonless-app-bootloader-settings-app-hex-with-bond_forwarding-doesn-t-run/248891"]Does it fail consistently and do you see any pattern? E.g., does not work after power-cycle, etc.[/quote]
&lt;p&gt;What I&amp;#39;ve tried is to divide my last commits into two branches, one for DFU and one for encryption/pairing/fds. This way I can tell apart what is not working.&lt;/p&gt;
&lt;p&gt;What I see is that&amp;nbsp;from my three buttons - all of which work fluently using only SD + App,&amp;nbsp;now only two still work. When using SD + DFU + APP or SD + DFU + DFU_Buttonless_App, when I press my button my app resets. It seems like the bootloader is using that same pin for reset, but I haven&amp;#39;t found any information on that regard.&lt;/p&gt;
&lt;p&gt;That button is on PIN 21 as defined in my custom_board.h file.&lt;/p&gt;
&lt;p&gt;For now the rest of my app seems to work as before. How can I solve the problem with that button?&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with custom DFU Buttonless app (bootloader + settings + app .hex with bond_forwarding doesn't run)</title><link>https://devzone.nordicsemi.com/thread/248891?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 10:19:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:717dc80d-5e25-466e-8069-655051098a62</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Bruno,&lt;/p&gt;
[quote user="bruno_san"]If this is so, what do you mean by &amp;quot;&lt;span&gt;disable RTT logging in the bootloader&amp;quot;? Do you mean that I should connect with Segger RTT to my device only when I&amp;#39;m sure the application is running and closing it before it changes to bootloader?&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;I assumed you were using the bootloader with logging. I didn&amp;#39;t know it could become a problem without. Does it fail consistently and do you see any pattern? E.g., does not work after power-cycle, etc. &lt;/p&gt;
&lt;p&gt;The best solution is to allocate a fixed portion of RAM to rtt as explained in the forum thread you linked to. But it requires some work, and the approach will differ depending on toolchain type.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with custom DFU Buttonless app (bootloader + settings + app .hex with bond_forwarding doesn't run)</title><link>https://devzone.nordicsemi.com/thread/248717?ContentTypeID=1</link><pubDate>Thu, 07 May 2020 12:54:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faba2d62-e676-4383-bb4a-552971394dc8</guid><dc:creator>Bruno Santamaria</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;, thanks. I think I understand what you mean. Just to be clear, does this RAM address get moved when changing from Bootloader to Application even though my Bootloader is not writing debug messages nor even using nRF_Log? (I didn&amp;#39;t use the &amp;quot;_debug&amp;quot; example).&lt;/p&gt;
&lt;p&gt;If this is so, what do you mean by &amp;quot;&lt;span&gt;disable RTT logging in the bootloader&amp;quot;? Do you mean that I should connect with Segger RTT to my device only when I&amp;#39;m sure the application is running and closing it before it changes to bootloader?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Especially if the answer to the previous cuestion is that&amp;nbsp;is not enough to use&amp;nbsp;RTT just taking care that only the application is running,&lt;strong&gt;&amp;nbsp;how can I link the RTT block to a fixed RAM position&lt;/strong&gt;? I haven&amp;#39;t found any documentation but &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10381/how-to-configure-rtt-with-a-fixed-address-in-iar" rel="noopener noreferrer" target="_blank"&gt;this post&lt;/a&gt; from a regular user.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bruno&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with custom DFU Buttonless app (bootloader + settings + app .hex with bond_forwarding doesn't run)</title><link>https://devzone.nordicsemi.com/thread/248425?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 11:14:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7941ef59-5661-41bb-b987-54e1f651882f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Bruno,&lt;/p&gt;
&lt;p&gt;I recommend going with the unbonded variant without bond sharing if you don&amp;#39;t have a requirement to have a secured link during the DFU transfer. It less complicated and there&amp;#39;s is less things that can go wrong with it. This does not have any impact on bonding support in the main app.&lt;/p&gt;
[quote user=""]App seems to work but seems not to be stable. Sometimes NUS service doesn&amp;#39;t seem to work (RTT doesn&amp;#39;t show messages and I get no reply), other times it does, not all Debug data appears on RTT, on some ISR of my buttons, app seems to freeze. None of these happened before adding DFU[/quote]
&lt;p&gt;&amp;nbsp;This is a known limitation when working with the bootloader. RTT keeps log messages in a RAM buffer which the debugger locates by scanning the RAM area on connection. Problem is that this buffer is not linked to a fixed RAM address and will as a result get moved when transitioning between bootloader and app code. The easiest solution to this is to disable RTT logging in the bootloader when you want to logs from the APP. The other solution is to link the RTT block to a fixed RAM section shared by bootloader and app. &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><item><title>RE: Problem with custom DFU Buttonless app (bootloader + settings + app .hex with bond_forwarding doesn't run)</title><link>https://devzone.nordicsemi.com/thread/247876?ContentTypeID=1</link><pubDate>Mon, 04 May 2020 12:58:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de330d63-3dd2-4aac-8d47-95c5077cf900</guid><dc:creator>Bruno Santamaria</dc:creator><description>&lt;p&gt;Update: Actually at point 6 of the post above, I&amp;#39;m not sure why device doesn&amp;#39;t reset into DFU. DFU Bootloader has a different address so it should be a different device and could be connected by my phone regardless of the secure bond of my app. So the problem may start there.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t need the DFU link to be secure as long as my app is bonded with security with my phone.&lt;/p&gt;
&lt;p&gt;2nd Update: In my previous post I found out that there was some problem with my android device, so I tried to repeat point 6 with nRF Connect for Desktop and my Development Kit. This time it worked: Flash SD and DFU, upload App, reupload App with buttonless feature.&lt;/p&gt;
&lt;p&gt;However the problem with my app persists. It doesn&amp;#39;t answer to my NUS commands sometimes, not all debug messages appear on RTT, etc. See Issue #1 on my original post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>