<?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>How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63289/how-to-implement-dfu-in-nrf52-bmd301-via-ble-and-uart-method-simultaneously</link><description>Hi, 
 
 I have used BMD301 BLE chip. I have connected one wifi chip &amp;quot;ESP02&amp;quot; with BMD301 chip via UART. 
 I am using nRF5_SDK_15.3.0_59ac345 for my ble application firmware. 
 Currently I have implemented DFU in my application firmware. I am able to update</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Jul 2020 12:40:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63289/how-to-implement-dfu-in-nrf52-bmd301-via-ble-and-uart-method-simultaneously" /><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/259182?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 12:40:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edb8e4c1-e214-4e21-8732-d28598cce70e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;[quote user="VIJAY PANCHAL"][/quote]&lt;/p&gt;
&lt;p&gt;-&amp;nbsp; When I have uploaded BLE bootloader, then I have merged with below example&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_buttonless_dfu&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;What does this mean? What did you merge the ble_app_buttonless_dfu example with?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you tried to debug in the bootloader project? Set a breakpoint and see if it is hit or not.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You didn&amp;#39;t merge the bootloader project with the buttonless_dfu example? The bootloader is supposed to be a standalone project and hex file.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The way the bootloader works is that if you program either the softdevice or the MBR (the MBR is included in the softdevice) whenever you reset the nRF the MBR will check if there is a bootloader present or not. If there is a bootloader, it will run the bootloader. If the bootloader doesn&amp;#39;t see any sign on staying in DFU mode (button press or register set by the buttonless_dfu_service) it will continue by starting the application.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What do you intend to do with the DFUMaster_UART project that you attached? That is not related to the bootloader itself. This is a demo replacement project for nrfutil. The bootloader is located in SDK\examples\dfu\secure_bootloader.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="VIJAY PANCHAL"]I think, in this code, something is added which helps to enable bootloader mode when I pass it zip file via nrf connect application in DFU service.[/quote]
&lt;p&gt;&amp;nbsp;Is that your question now? How to put the device in DFU mode? This has to be done either by the application or by e.g. pressing a button while resetting the device. If your application is running, then nrfutil will not be able to communicate with the bootloader.&lt;/p&gt;
&lt;p&gt;This is a long shot, but I will try.&lt;/p&gt;
&lt;p&gt;If you want to trigger DFU mode via UART, you have to do this from your application. If you look in the bootloader project, study the&amp;nbsp;function:&lt;/p&gt;
&lt;p&gt;nrf_bootloader_init() -&amp;gt;&amp;nbsp;dfu_enter_check():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (NRF_BL_DFU_ENTER_METHOD_GPREGRET &amp;amp;&amp;amp;
       (nrf_power_gpregret_get() &amp;amp; BOOTLOADER_DFU_START))
    {
        NRF_LOG_DEBUG(&amp;quot;DFU mode requested via GPREGRET.&amp;quot;);
        return true;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If the GPREGRET register is set to 0xB1, it will enter DFU mode, so if you write this to your application before you reset, it will enter dfu mode. Perhaps you can use some special UART command to trigger this. E.g. if you receive &amp;quot;dfu mode enter&amp;quot; over the UART, then you have a handler that will set this register and then reset:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void enter_dfu_mode(void)
{
    uint8_t gpregret_value = nrf_power_gpregret_get();
    gpregret_value |= 0xB1; // Add (or) 0xB1 to whatever the value was before.
    nrf_power_gpregret_set(gpregret_value);
    
    while ((nrf_power_gpregret_get() &amp;amp; 0xB1) != 0xB1)
    {
        // Wait for the register to be properly written before we continue.
    }
    
    NVIC_SystemReset(); // Reset the nRF. With the given gpregret the bootloader will enter DFU mode.
    
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you call this from somewhere in your application, the nRF will enter DFU mode. Quite similar (but not exactly) to how the ble_app_buttonless_dfu example does it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/259066?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 04:32:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6e4b5b3-df5e-4ce8-b3b0-00965f881c43</guid><dc:creator>VIJAY</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;For testing i am using readymade development board&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide?view=all"&gt;https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide?view=all&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;It has USB connector. I am able to see log on uart port using below examples,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So on this board has&lt;span&gt;&amp;nbsp;UART pins P0.08 and P0.06.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To upload firmware in this module I have used swd and swdio pins.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here, I think I am missing some configuration in the bootloader section.&lt;/p&gt;
&lt;p&gt;- Do we need to add any function or code to start uart bootloader in our application? like&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_blinky&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;-&amp;nbsp; When I have uploaded BLE bootloader, then I have merged with below example&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_buttonless_dfu&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I think, in this code, something is added which helps to enable bootloader mode when I pass it zip file via nrf connect application in DFU service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So I think similarly in case of uart bootloader code there must be a method to trigger uart bootloader and then we need to give the command. Right?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;b&gt;nrfutil dfu serial -pkg FW.zip -p COM3 -b 115200&lt;/b&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;b&gt;&lt;/b&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x240/__key/communityserver-discussions-components-files/4/fdf.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;I have found this example, Can you guide me what this example does in short?&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;UART DFU Master code:&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-14/DFUMaster_5F00_UART.zip"&gt;DFUMaster_UART.zip&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-14/DFUMaster_5F00_UART.zip"&gt;https://devzone.nordicsemi.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-14/DFUMaster_5F00_UART.zip&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;b&gt;&lt;/b&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/259026?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 14:44:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7a343d7-1acc-4a21-8d6a-b602210a712a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, so your UART is not working. It is not responding. Your UART pins are probably not routed to your computer. Does your module (&lt;span&gt;BMD301&lt;/span&gt;) have an on board debugger?&lt;/p&gt;
&lt;p&gt;Is the&amp;nbsp;&lt;span&gt;BMD301 equipped with an onboard debugger?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think you need to check with the producers of the&amp;nbsp;BMD301 if and how the UART pins are connected to the BMD&amp;#39;s programmer (if it has a programmer). Or maybe it says in the datasheet.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258999?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 12:56:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:209d1798-9dbe-4e57-8aa2-1aced82f6b58</guid><dc:creator>VIJAY</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;See the screenshot&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1600x1200/__key/communityserver-discussions-components-files/4/8308.log.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;strong&gt;nrfutil dfu serial -pkg FW.zip -p COM3 -b 115200&lt;/strong&gt;&lt;/b&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/63289/how-to-implement-dfu-in-nrf52-bmd301-via-ble-and-uart-method-simultaneously/258994"]what do you mean by &amp;quot;that not works&amp;quot;? What does it say when it doesn&amp;#39;t work?[/quote]
&lt;p&gt;&lt;b&gt;using above command , not be able to upload firmware via uart.&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258994?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 12:41:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a9cb9d5-ef56-4e48-8e11-36ee4e94793b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, so let us focus on the noSD .bat script. To simplify, you are using the command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil pkg generate --application app.hex --application-version 1 --application-version-string &amp;quot;1.0.0&amp;quot; --hw-version 52 --sd-req 0xB7 --key-file private.pem FW.zip&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Right?&lt;/p&gt;
&lt;p&gt;Try removing the --application-version-string argument.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And I will ask one more time:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Edvin Holmseth"]what do you mean by &amp;quot;that not works&amp;quot;? What does it say when it doesn&amp;#39;t work?[/quote]
&lt;p&gt;&amp;nbsp;Does nrfutil say anything? Or does it say: &amp;quot;sorry. It didn&amp;#39;t work&amp;quot;?. Perhaps you can share a screenshot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258980?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 11:38:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de70c981-3835-4c24-97df-240890408a8a</guid><dc:creator>VIJAY</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;I am describing what I have done. See the below steps.&lt;/p&gt;
&lt;p&gt;I have attached zip file where I have list all scripts..&lt;/p&gt;
&lt;p&gt;Here added bootloader is&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040_uart&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I have run first&amp;nbsp;&lt;strong&gt;06_copy_buttonless_create_settings_merge_flash - FULL RESET WITH SD+BL.bat file first.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I think after running this script, I could be able to update firmware via uart pins.&lt;/p&gt;
&lt;p&gt;Am I Right?&lt;/p&gt;
&lt;p&gt;I have two scripts to create a zip file of the firmware.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;03_create_fw_zip_package.bat,&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;03b_create_fw_zip_package_noSD.bat&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Above both scripts generare FW.zip file.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;at the end of above both scripts I have added one line to upload the same firmware via uart.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;strong&gt;nrfutil dfu serial -pkg FW.zip -p COM3 -b 115200&lt;/strong&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;I have connected this module via usb cable which port is COM3 in my case.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide?view=all"&gt;https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide?view=all&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;File created but not uploading.&lt;/p&gt;
&lt;p&gt;Let me know, Should I add any specific function or code to start uart boot loader mode in my main application. in current scenario, its below example I have used.&lt;/p&gt;
&lt;p&gt;Currently, I haven&amp;#39;t added anything extra in below code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_blinky&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;PFA.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf_2D00_upload_2D00_commands.zip"&gt;devzone.nordicsemi.com/.../nrf_2D00_upload_2D00_commands.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258961?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 09:54:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd3fb7ca-6e71-4e6c-ba94-8bfc3aee5c18</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;[quote user="VIJAY PANCHAL"][/quote]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have generated zip file with softdevice or without soft device. then I have tried below command but thats not works.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrfutil dfu serial -pkg FW.zip -p COM3 -b 115200&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;What application are you trying to create the DFU image from, and what is the command that you use? You should use an example that uses the softdevice, and you don&amp;#39;t need to include the softdevice in the DFU image.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, what command did you use to generate the image, and what do you mean by &amp;quot;that not works&amp;quot;? What does it say when it doesn&amp;#39;t work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258920?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 07:29:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f8bb42d-2994-4091-aa96-e931f88d4709</guid><dc:creator>VIJAY</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;For testing I am using below&amp;nbsp;development board which has&amp;nbsp;&lt;span&gt;the UART pins P0.08 and P0.06&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide?view=all"&gt;https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide?view=all&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So&amp;nbsp;you know&amp;nbsp; I want to test UART bootloder,&lt;/p&gt;
&lt;p&gt;I have compiled below example&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040_uart&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;and take its hex file as bootloader.hex.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Currently, I have merged bootloader.hex, softdevice, settings, and blinky_app.hex&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;and just uploaded firmware using Segger Jlink EDU.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It work fine and adverising as Nordic_blinky.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have generated zip file with softdevice or without soft device. then I have tried below command but thats not works.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrfutil dfu serial -pkg FW.zip -p COM3 -b 115200&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Can you guide me?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thanks.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258865?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2020 16:30:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a3ff74a-3759-4826-872c-d3e6d8098c9a</guid><dc:creator>Edvin</dc:creator><description>[quote user="VIJAY PANCHAL"]Guide me.[/quote]
&lt;p&gt;&amp;nbsp;I&amp;#39;ll try&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user="VIJAY PANCHAL"][/quote]&lt;/p&gt;
&lt;p&gt;Now I have seen same main.c for following project in my SDK.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040_ble&lt;/strong&gt;&lt;span&gt;,&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040_uart&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Yes. The main.c file for all the bootloaders is the same, which is good when you&amp;nbsp;want to merge bootloaders. The only thing you need to do is to add the .c file that sets the DFU transport.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In fact, they use the very same main.c file, located in SDK\examples\dfu\secure_bootloader\main.c. You will see that if you change something in the main.c file in one of the projects, that change is applied to all the other bootloaders as well.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To test the UART bootloader, you can use the pca10040_uart project, yes. Remember that you may need to change the board file, as you would with any project using the BMD module.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On the Nordic nRF52832 DK, the UART pins P0.08 and P0.06 are routed through the debugger, and translated to UART over USB. Is it the same on your DK? You can test this by testing some of the UART examples from SDK\examples\peripheral. Alternatively, if you see UART logging in e.g. the SDK\examples\ble_peripheral\ble_app_hrs example, this is through the UART.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So you need to check that that is the same on your development board. I am not familiar with it. It needs a debugger that routes UART traffic to the DK in order to use the UART bootloader.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258778?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2020 11:08:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5af4a9a-9092-454c-819c-8059b666eca7</guid><dc:creator>VIJAY</dc:creator><description>&lt;p&gt;Thanks, Edvin.&lt;/p&gt;
&lt;p&gt;I have checked Secure DFU bootloader for BLE. I have created a private key and generated bootloader.hex file. I have created app.hex by merging bootloader, setting, soft device and main application code. Its work fine, I am able to DFU via NRF Connect app.&lt;/p&gt;
&lt;p&gt;Now I have seen same main.c for following project in my SDK.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040_ble&lt;/strong&gt;&lt;span&gt;,&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040_uart&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To test BLE DFU, I have merged&amp;nbsp;below project hex file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_buttonless_dfu&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Now, I am able to compile above both project successfully. I haven&amp;#39;t seen any differences in main.c for the above two project.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So for uart dfu bootloader, Can I use &amp;quot;pca10040_uart&amp;quot; hex file?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Will it make my solution if I only want to check uart bootloader?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which application project I should merge with uart bootloader to check DFU for UART?&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;this one?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;UART DFU Master code:&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-14/DFUMaster_5F00_UART.zip"&gt;DFUMaster_UART.zip&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-14/DFUMaster_5F00_UART.zip"&gt;https://devzone.nordicsemi.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-14/DFUMaster_5F00_UART.zip&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Guide me.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258641?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 14:38:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:205234e7-526e-4805-a333-87bcba107146</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;If you want both UART and BLE, I suggest you start with the BLE bootloader, because there is a lot more work and a lot more places to do the wrong thing when you are adding the softdevice, than when you add the UART.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Start with the pca10040_ble project, and add the file: nrf_dfu_serial_uart.c to your project. This contains the function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;DFU_TRANSPORT_REGISTER(nrf_dfu_transport_t const uart_dfu_transport) =
{
    .init_func  = uart_dfu_transport_init,
    .close_func = uart_dfu_transport_close,
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Which does some magic things, so that the function&amp;nbsp;nrf_dfu_transports_init() will pick it up in&amp;nbsp;DFU_TRANS_SECTION_ITEM_GET(i);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;From there is pretty much plug and play.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="VIJAY PANCHAL"]How can I&amp;nbsp;test the UART bootloader?&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;If you have never used the bootloader before, I suggest you check out &lt;a href="https://devzone.nordicsemi.com/blogs/1085/getting-started-with-nordics-secure-dfu-bootloader/" rel="noopener noreferrer" target="_blank"&gt;this guide&lt;/a&gt;. Test the BLE first. Then, when you are ready for UART, test the standalone UART bootloader, and use nrfutil to generate the packet as described in the guide, and use nrfutil dfu serial ... to send the packet.&lt;/p&gt;
&lt;p&gt;Use the command nrfutil dfu serial --help to get some input parameter help.&lt;/p&gt;
&lt;p&gt;You can also check out the documentation of nrfutil, and how to use it &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/nrfutil_intro.html" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="VIJAY PANCHAL"]How can I upload firmware BMD301 via UART?[/quote]
&lt;p&gt;&amp;nbsp;You need to program the bootloader on the BMD301 with a programmer first (unless the producers of BMD have already pre-programmed a bootloader, in that case, you need to check with them).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you have programmed the bootloader, you can use &amp;quot;nrfutil dfu ble ...&amp;quot; to perform a DFU.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="VIJAY PANCHAL"]Which tool or software required for that? Guide me.[/quote]
&lt;p&gt;&amp;nbsp;nrfutil. Check out the DFU getting started guide (the first link) for how to install and use it.&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: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258507?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 05:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74c6b32a-da90-4caf-9793-a20c04739bb5</guid><dc:creator>VIJAY</dc:creator><description>&lt;p&gt;Thanks Edvin.&lt;/p&gt;
&lt;p&gt;I have checked, there are different transport files in the library. Can you guide me on which transport file I&amp;nbsp; should use?&lt;/p&gt;
&lt;p&gt;If possible I want to check uart bootloader first. Can you guide me for that?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How can I&amp;nbsp;test the UART bootloader?&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How can I upload firmware BMD301 via UART?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which tool or software required for that? Guide me.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement DFU in NRF52 [BMD301] via BLE and UART Method simultaneously?</title><link>https://devzone.nordicsemi.com/thread/258155?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 14:27:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3916600b-4fea-44ca-8f34-700e93d06608</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I&amp;#39;m out of time for today, but really quickly explained, you just need to add the transport .c and .h files to your bootloader project. Start with the ble bootloader project, and look for the .c/.h file that has the TRANSPORT_INIT or something function for uart in the serial bootloader project, then add these files to the ble bootloader project. Let me know if you can&amp;#39;t find it.&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></channel></rss>