<?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>NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application</link><description>Hello all, 
 Currently using an nRF52840-DK, GCC Makefile build tools including nrfjprog and nrfutil, Nordic SDK v15.0, SoftDevice s140 v6.0.0 
 I am currently trying to get a grasp on how the MBR, SoftDevice, DFU Bootloader, and Application all work</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Dec 2022 17:14:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application" /><item><title>RE: NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/thread/398823?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2022 17:14:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9531811-67d8-4d5c-b650-2384ff7944b6</guid><dc:creator>jspear</dc:creator><description>&lt;p&gt;Edvin,&lt;/p&gt;
&lt;p&gt;Thanks for all of the information and advice! There&amp;#39;s still a lot I have to learn with all of this, but I&amp;#39;ve definitely learned a bunch from this conversation. I&amp;#39;ll be sure to come back around for more help if necessary!&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;
&lt;p&gt;Joseph&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/thread/398654?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 22:02:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f1f2bea-dbe3-467c-994c-f9264fcfc5a8</guid><dc:creator>Edvin</dc:creator><description>[quote user="jspear"]So I&amp;#39;ve followed&amp;nbsp;&lt;a title="this guide" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrfutil%2FUG%2Fnrfutil%2Fnrfutil_installing.html"&gt;this guide&lt;/a&gt;&amp;nbsp;in order to install the latest nrfutil program[/quote]
&lt;p&gt;Ah, thanks for sharing. I was not aware of this. I just tried uninstalling and re-installing using &amp;quot;pip uninstall nrfutil&amp;quot; and &amp;quot;pip install nrfutil&amp;quot;, and it didn&amp;#39;t allow me to use the command &amp;quot;nrfutil nrf5sdk-tools ...&amp;quot;. I will look into this later.&lt;/p&gt;
[quote user="jspear"]I suppose I should ask then, which debugging methodology&amp;nbsp;is better, RTT or UART? It seems that there are less issues coming from the RTT implementation, so it appears that this would be the better choice for debugging. If it&amp;#39;s a subjective answer, what would be your recommendation?&amp;nbsp;[/quote]
&lt;p&gt;It is indeed very much a subjective answer, and both have their pros and cons.&lt;/p&gt;
&lt;p&gt;I actually prefer UART as long as I don&amp;#39;t need to output too much data too fast, because UART is slower, but I can open a UART terminal, and it will remain connected as long as the DK is powered, because the UART terminal is actually connecting to the debugger, and not the nRF chip itself (on the DK at least). RTT is a bit more flaky, because I usually need to reconnect it every time after flashing. At least if I am using Segger RTT Viewer. If I am using Segger Embedded Studio, however, it will do so automatically, so if you are using SES, the RTT backend is very (!) neat.&lt;/p&gt;
&lt;p&gt;Again, it depends on the situation. The UART backend actually requires some resources on the nRF. It requires a UART instance, so if you need to use your UART for something else, it is a blocker. The RTT is not a peripheral on the nRF in the same way. It is just the debugger reading some memory areas on the nRF, which doesn&amp;#39;t affect the performance of the chip. It does require a debugger, though, which the UART strictly doesn&amp;#39;t (if you have an external UART -&amp;gt; USB bridge).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So my go to is:&lt;/p&gt;
&lt;p&gt;1: If I use Segger Embedded Studio -&amp;gt; RTT.&lt;/p&gt;
&lt;p&gt;2: If I don&amp;#39;t need too much output, my application doesn&amp;#39;t use UART, and the nRF CPU is not throttled -&amp;gt; UART&lt;/p&gt;
&lt;p&gt;3: RTT.&lt;/p&gt;
&lt;p&gt;In addition, when you are working on a bootloader, remember that the pin configuration is carried over from the bootloader to the application, so when using GPIOs for UART or buttons, those will keep their configuration (input/output) in your application, unless you actively disable it before entering the application. Worth knowing for current consumption. This is something to keep in mind for UART, but not RTT, as it doesn&amp;#39;t use any GPIOs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="jspear"]While the details behind this seem to be fairly complex, I believe I understand the general procedure going on and therefore the issue/solution, so thanks for the clarity![/quote]
&lt;p&gt;Glad to help. Let me know if anything other nrfutil or bootloader questions pops up. (At least in the nRF5 SDK. I am still wrapping my head around the subject in the nRF Connect SDK).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/thread/398609?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 16:20:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91ae0323-afeb-4b31-87b8-a1a363de2418</guid><dc:creator>jspear</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398558"]Why do you have the option nrf5sdk-tools?[/quote]
&lt;p&gt;So I&amp;#39;ve followed&amp;nbsp;&lt;a title="this guide" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrfutil%2FUG%2Fnrfutil%2Fnrfutil_installing.html"&gt;this guide&lt;/a&gt;&amp;nbsp;in order to install the latest nrfutil program (it was last updates only a few weeks ago).&amp;nbsp;The very first step was the one that caused me to open up the other ticket I mentioned.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have two things I can output. When I do the command nrfutil -V I get:&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil 7.0.1 (19248e3 2022-11-01)
commit-hash: 19248e3210eb89a3e9f0c007cd4ba3080d3f392c
commit-date: 2022-11-01
host: x86_64-unknown-linux-gnu
build-timestamp: 2022-11-01T07:41:25.668667032+00:00&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and when I do nrfutil nrf5sdk-tools -V I get:&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil-nrf5sdk-tools 1.0.1 (c86ddc2 2022-11-29)
commit-hash: c86ddc246ce42f669e82748f7eb2542caf0bf0fd
commit-date: 2022-11-29
host: x86_64-unknown-linux-gnu
build-timestamp: 2022-11-29T09:27:03.011122071+00:00
inner-executable-version: nrfutil version 6.1.7&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398558"]The USB port on the short end is for the UART (through the debugger), while the USB port on the long side of the DK is for the nRF&amp;#39;s USB port.[/quote]
&lt;p&gt;I actually did not know this, so this is going to be very helpful in preparation for our custom board, thank you!&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398558"]For a flying start, you can paste this file[/quote]
&lt;p&gt;Thanks for this script, I was planning on making one myself, so it&amp;#39;s nice to have one that was made by an expert. Gives me more confidence on this part of the building.&amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398558"]To work around this, you can either just keep using the RTT backend (which doesn&amp;#39;t require the UART peripheral), or you can set NRF_LOG_DEFERRED 0 in sdk_config.h.[/quote]
&lt;p&gt;I suppose I should ask then, which debugging methodology&amp;nbsp;is better, RTT or UART? It seems that there are less issues coming from the RTT implementation, so it appears that this would be the better choice for debugging. If it&amp;#39;s a subjective answer, what would be your recommendation?&amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398558"]I hope this will clear up things a bit.[/quote]
&lt;p&gt;While the details behind this seem to be fairly complex, I believe I understand the general procedure going on and therefore the issue/solution, so thanks for the clarity!&lt;/p&gt;
&lt;p&gt;Joseph&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/thread/398558?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 13:41:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33d9baff-cc2c-4951-8293-542e4e9ec139</guid><dc:creator>Edvin</dc:creator><description>[quote user="jspear"]Is this typically something that is taken into account with each projects Makefile and Linker Script?[/quote]
&lt;p&gt;All linker scripts (if you use armgcc. In an IDE it is usually a project setting) will set the start address for that application. But please note that this is only something you need to consider if it is a bootloader project or if you add/remove the softdevice from an application.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="jspear"]To generate my bootloader settings, I use the following command:[/quote]
&lt;p&gt;Why do you have the option nrf5sdk-tools? Is this a custom version of nrfutil? that is not something I have seen before. What does it print if you use the command &amp;quot;nrfutil version&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="jspear"]In terms of the dfu package, I am still working on getting kinks worked out with this, as I have an issue open&amp;nbsp;&lt;a title="here" href="https://devzone.nordicsemi.com/f/nordic-q-a/94040/issue-downloading-the-nrfutil-software" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;.[/quote]
&lt;p&gt;I see. I see that in your other ticket you are using the UART bootloader with the blinky_mbr example, which is fine. Just make sure that you use the correct USB ports on the DK. The USB port on the short end is for the UART (through the debugger), while the USB port on the long side of the DK is for the nRF&amp;#39;s USB port.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For a flying start, you can paste this file into the SDK15.0.0\examples\dfu\secure_bootloader\pca10056_usb_debug\armgcc folder:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3821.test.bat"&gt;devzone.nordicsemi.com/.../3821.test.bat&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It looks like you are using Linux or MacOS, so you have to convert it to an sh script, but you probably know how to do that. You also need to change the COM port to match the USB port of your device. Also, when you see the &amp;quot;timeout 10&amp;quot;, this is where you need to reboot your DK while holding button 4 to put it in DFU mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As to why the application is hanging in serial_tx() -&amp;gt; while (m_async_mode &amp;amp;&amp;amp; (m_xfer_done == false)), I believe this is a mismatch between the log backend (UART) and the bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The bootloader will go to: main() (which will log something) -&amp;gt; nrf_bootloader_init() -&amp;gt; nrf_bootloader_app_start() -&amp;gt; NRF_LOG_FLUSH(), but right before the NRF_LOG_FLUSH, it will forward all interrupts to the application, using nrf_dfu_mbr_irq_forward_address_set(). So when NRF_LOG_FLUSH is called, the UART will wait for the TX complete event (which will set m_xfer_done = true), but since this is forwarded, this will never happen.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To work around this, you can either just keep using the RTT backend (which doesn&amp;#39;t require the UART peripheral), or you can set NRF_LOG_DEFERRED 0 in sdk_config.h.&lt;br /&gt;When NRF_LOG_DEFERRED is set to 1, all instances of NRF_LOG_...() will just queue the log, and the log will be processed at a later time. Typically in your main() loop. However, in the bootloader project, the log will not be processed before the NRF_LOG_FLUSH(), right before nrf_bootloader_app_start_final(), and at this point, the UART interrupts are forwarded to the application&amp;#39;s start address (really the softdevice&amp;#39;s/mbr&amp;#39;s start address, which later will forward the to the application&amp;#39;s start address), which is why you see it hanging waiting for m_xfer_done to be true.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope this will clear up things a bit.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/thread/398389?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 15:42:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:652273a6-2948-4426-bea4-f5fc318a2660</guid><dc:creator>jspear</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398383"]Since the bootloader is close to the &amp;quot;top&amp;quot; of the flash, it needs to &amp;quot;grow downwards&amp;quot;, i.e. move the start address as the bootloader becomes bigger[/quote]
&lt;p&gt;Is this typically something that is taken into account with each projects Makefile and Linker Script?&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398383"]Are you using a custom board or a DK to reproduce this issue?[/quote]
&lt;p&gt;I am currently using the DK at the moment. We are going to be moving this over to a custom board eventually, but wanted to start simple with the DK.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398383"]Can you please show me how you generate your bootloader settings, and how you generate and upload your dfu package, if you get that far?[/quote]
&lt;p&gt;To generate my bootloader settings, I use the following command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil nrf5sdk-tools settings generate --family NRF52840 --application _build/nrf52840_xxaa.hex --bootloader-version 0 --bl-settings-version 1 --application-version 3 bootloader_settings.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is the BLE blinky application from the&amp;nbsp;&lt;span&gt;&amp;lt;SDK_15_0_Root&amp;gt;/examples/ble_peripheral/ble_app_blinky/pca10056/s140/armgcc/ project directory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In terms of the dfu package, I am still working on getting kinks worked out with this, as I have an issue open&amp;nbsp;&lt;a title="here" href="https://devzone.nordicsemi.com/f/nordic-q-a/94040/issue-downloading-the-nrfutil-software" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;. I&amp;#39;m having problems uploading&amp;nbsp;.zip examples via the nrfutil dfu procedure, so I haven&amp;#39;t actually been able to test that feature yet unfortunately (though it is of high importance that I get it working soon).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398383"]Is there some way for me to reproduce what you are seeing on an nRF52840DK?[/quote]
&lt;p&gt;&lt;span&gt;I can definitely&amp;nbsp;send over a .zip file. What files would be most helpful? Do you want my entire bootloader project from&amp;nbsp;&amp;lt;SDK_15_0_Root&amp;gt;/examples/dfu/open_bootloader/ which includes the main.c file, or do you just want the .hex file located in the _build directory? Same question for the BLE blinky app from&amp;nbsp;&amp;lt;SDK_15_0_Root&amp;gt;/examples/ble_peripheral/ble_app_blinky/ .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Joseph&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/thread/398383?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 15:11:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17a3dcaa-fadf-4cb0-94b5-3a90ed8e9824</guid><dc:creator>Edvin</dc:creator><description>[quote user="jspear"]I usually try to perform all of my uploading using the nrfjprog tool, so I have not looked at this screen yet,[/quote]
&lt;p&gt;Me too, but it is a simple way to see the application size. I just wanted to check that there was enough pages that were free above the bootloader. You need two pages (0x000FE000 and 0x000FF000), and that is fine in this case. I was not sure whether you used a _debug project or a non- _debug project. The difference is that the _debug projects are moved a bit down, to give space to the logging module.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since the bootloader is close to the &amp;quot;top&amp;quot; of the flash, it needs to &amp;quot;grow downwards&amp;quot;, i.e. move the start address as the bootloader becomes bigger, unlike a normal application that starts at the bottom, and can grow quite a lot upwards before it starts being an issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That is all I wanted to see. the memory regions are not the issue here.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Further investigation:&lt;/p&gt;
&lt;p&gt;Are you using a custom board or a DK to reproduce this issue?&lt;/p&gt;
&lt;p&gt;I see you are using SDK15.0.0. I don&amp;#39;t think there are any known issues on that version.&lt;/p&gt;
&lt;p&gt;Can you please show me how you generate your bootloader settings, and how you generate and upload your dfu package, if you get that far?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there some way for me to reproduce what you are seeing on an nRF52840DK? Is it possible to zip a project folder that I can unzip in an unmodified SDK15.0.0 to see the same behavior that you see?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/thread/398376?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 14:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f656f8ac-d842-48ca-a40b-e0c740288357</guid><dc:creator>jspear</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Thanks for getting back to me.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398369"] Can you please share the path to your makefile (relative from the top SDK folder).[/quote]
&lt;p&gt;The path to the bootloader makefile project is:&lt;/p&gt;
&lt;p&gt;&amp;lt;SDK_15_0_Root&amp;gt;/examples/dfu/open_bootloader/pca10056_usb_debug/armgcc/&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398369"]Did you try to set NRF_LOG_BACKEND_RTT_ENABLED instead of the UART? Does it behave the same, or does it work with RTT, only not with UART?[/quote]
&lt;p&gt;I have tried this and I am able to get output via the JLinkRTTViewer tool without any breaking like I saw when I was using the UART. I am running into a problem I think related to&amp;nbsp;&lt;a title="this post" href="https://devzone.nordicsemi.com/f/nordic-q-a/20708/rtt-logging-from-application-started-by-bootloader/80810" rel="noopener noreferrer" target="_blank"&gt;this post&lt;/a&gt;, but otherwise, RTT is working fine.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/94380/nrf52840-issue-getting-from-bootloader-to-application/398369"]When you compile your bootloader. What does the bootloader .hex file look like?[/quote]
&lt;p&gt;Here is a corresponding image of when I drag the bootloader.hex file into the programmer tool:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-from-2022_2D00_11_2D00_30-08_2D00_34_2D00_25.png" /&gt;&lt;/p&gt;
&lt;p&gt;This is not at all what I would have expected. The bootloader application is split into two regions:&lt;/p&gt;
&lt;p&gt;Lower Region: 0x000E0000 - 0x000EDEAF&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Upper Region: 0x10001014 - 0x1000101B&lt;/p&gt;
&lt;p&gt;I usually try to perform all of my uploading using the nrfjprog tool, so I have not looked at this screen yet, nor have I explicitly looked at any memory regions in any files before. This seems a little concerning in comparison to the screenshot which you posted. What would have caused&amp;nbsp;this large discrepancy?&lt;/p&gt;
&lt;p&gt;To be honest, I am very new to the idea of memory region manipulation and linker scripts, so if you have any good resources on where to learn this, that would be very helpful!&lt;/p&gt;
&lt;p&gt;Thanks again for your response!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/thread/398369?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2022 14:17:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44f7a84a-9eea-4127-920b-17dbfb115437</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What bootloader project did you start with before you started modifying it? Can you please share the path to your makefile (relative from the top SDK folder).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you try to set NRF_LOG_BACKEND_RTT_ENABLED instead of the UART? Does it behave the same, or does it work with RTT, only not with UART?&lt;/p&gt;
&lt;p&gt;When you compile your bootloader. What does the bootloader .hex file look like? What I really want to know is how large it is. Try to drag-n-drop it into the nRF Connect for Desktop -&amp;gt; Programmer application, and hover your mouse over the&amp;nbsp; Bootloader section (on top). What addresses does it occupy?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For comparison, this is what it looks like on the unmodified SDK17.1.0\examples\dfu\secure_bootloader\pca10056_uart\armgcc:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1669817747249v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;You can see that it occupies the addresses: 0x000F8000 - 0x000FD81F&lt;/p&gt;
&lt;p&gt;What addresses does your occupy?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 issue getting from bootloader to application</title><link>https://devzone.nordicsemi.com/thread/398207?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 21:24:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b078d5d4-b4a8-4862-970e-5b745ebf9ecc</guid><dc:creator>jspear</dc:creator><description>&lt;p&gt;Interesting piece of information... Originally I had the sdk_config.h values&amp;nbsp;NRF_LOG_BACKEND_RTT_ENABLED set to 0 and the&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED set to 1 which would allow me to see the output during the bootloader process. This was when I was getting the pause right before the&amp;nbsp;&lt;span&gt;nrf_dfu_mbr_irq_forward_address_set() function. Trying to test some things out, I turned off the&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED and it now appears to be working as expected (when powered on/reset, it begins the blinky application, and when the Button 4 is held while reset it goes into&amp;nbsp;DFU mode). Now I can&amp;#39;t look at debug messages in the bootloader though.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is good, however, I am apparently misunderstanding the proper way to look at debug messages in the bootloader. If someone can explain to me why having&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED set to 1 gives the originally&amp;nbsp;questioned behavior, that would help me feel more confident in this whole process and I&amp;#39;d be very thankful.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>