<?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>Can I implement DFU in nRF51822 chip?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip</link><description>Hello, 
 I am working on nRF51822-QF-AAFQ chip using SDK 12.3.0 in IAR embedded workbench. 
 My question is, can I impliment DFU in nrf51822 chip? 
 If possible suggest Starting RAM address of application and bootloader. 
 Please give me suggestion as</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Dec 2019 07:57:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip" /><item><title>RE: Can I implement DFU in nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/226487?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2019 07:57:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfea0b15-bc8a-448c-af8c-0fbe7f18845b</guid><dc:creator>Edvin</dc:creator><description>[quote user="Urvisha Andani"]Yes,from bootloader i am able to go to the application.[/quote]
&lt;p&gt;&amp;nbsp;That wasn&amp;#39;t really my question. Can I see what your main.c in your application look like?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Did you do any changes to the bootloader project?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement DFU in nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/226469?ContentTypeID=1</link><pubDate>Fri, 20 Dec 2019 05:25:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d114a2f-3364-4e99-8acc-f523e31eebc0</guid><dc:creator>Urvisha Andani</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip/226331"]So does you application do the same when you receive it receives the command to go to the bootloader through the buttonless dfu service?[/quote]
&lt;p&gt;Yes,from bootloader i am able to go to the application.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip/226331"]Have you included ble_dfu.c to your project? If so, did you do any changes to that file?[/quote]
&lt;p&gt;Yes, i included ble_dfu.c file in project and i did not change any thing in ble_df.c file.&lt;/p&gt;
&lt;p&gt;Please find attached ble_dfu.c file. and ble_dfu.h,&lt;/p&gt;
&lt;p&gt;1) ble_dfu.c&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0576.ble_5F00_dfu.c"&gt;devzone.nordicsemi.com/.../0576.ble_5F00_dfu.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2)ble_dfu.h&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_dfu.h"&gt;devzone.nordicsemi.com/.../ble_5F00_dfu.h&lt;/a&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip/226331"][/quote]
&lt;p&gt;Basically what the buttonless dfu service needs to do is to write some new bootloader settings with the&amp;nbsp;s_dfu_settings.enter_buttonless_dfu = true; and then wait for that to finish, disconnect, and reboot.&lt;/p&gt;
&lt;p&gt;Does your application do that? If you haven&amp;#39;t modified the ble_dfu.c it should do that by default.&lt;/p&gt;
&lt;p&gt;Yes it is by default.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip/226331"]You say that it stays in the bootloader, but doesn&amp;#39;t advertise. Have you verified that by scanning for it with another device after it is in DFU mode?[/quote]
&lt;p&gt;Yes, I checked in another device but in this also i can not able to scan device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement DFU in nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/226331?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2019 10:32:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6937a3f-ced4-4425-8d0e-2e2939377fe3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So does you application do the same when you receive it receives the command to go to the bootloader through the buttonless dfu service?&lt;/p&gt;
&lt;p&gt;Have you included ble_dfu.c to your project? If so, did you do any changes to that file?&lt;/p&gt;
&lt;p&gt;I guess it resets, if it disconnects, but make sure that&amp;nbsp;is_waiting_for_disconnection is set to true in ble_dfu.c.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you send a copy of your ble_dfu.c file if you did any changes?&lt;/p&gt;
&lt;p&gt;Basically what the buttonless dfu service needs to do is to write some new bootloader settings with the&amp;nbsp;s_dfu_settings.enter_buttonless_dfu = true; and then wait for that to finish, disconnect, and reboot.&lt;/p&gt;
&lt;p&gt;Does your application do that? If you haven&amp;#39;t modified the ble_dfu.c it should do that by default.&lt;/p&gt;
&lt;p&gt;You say that it stays in the bootloader, but doesn&amp;#39;t advertise. Have you verified that by scanning for it with another device after it is in DFU mode?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement DFU in nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/226271?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2019 07:08:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec0e6a08-3c48-446a-a54c-6e5272b9b70b</guid><dc:creator>Urvisha Andani</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip/226122"]So your application is starting up after you have updated via the bootloader, right?[/quote]
&lt;p&gt;yes, my application is starting&lt;/p&gt;
&lt;p&gt;I follow below step to download HEX file first time,&lt;/p&gt;
&lt;p&gt;1) Download softdevice HEX using nRF studio.&lt;/p&gt;
&lt;p&gt;2) Download bootloader HEX file using nRF studio.&lt;/p&gt;
&lt;p&gt;3) connect device with nRF connect mobile application.&lt;/p&gt;
&lt;p&gt;4) through DFU option i download .ZIP file which is create using below command,&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 51 --application-version 1 --application app.hex --sd-req 0x87 --key-file private.key app_dfu_package.zip&lt;/p&gt;
&lt;p&gt;5) Successfully download and device gets disconnect with mobile application and start advertisement of application&lt;/p&gt;
&lt;p&gt;6) connect device with application.&lt;/p&gt;
&lt;p&gt;7) Enable notification of dfu service and send request from write.&lt;/p&gt;
&lt;p&gt;8) Device gets disconnect with application and jump in to bootloader but not start advertisement.&lt;/p&gt;
&lt;p&gt;so give me suggestion to solves this problem&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip/226122"]There is something called a buttonless_dfu_service in the SDK. If you try to create a DFU image based on the experimental_ble_app_buttonless_dfu example in the SDK\examples\ble_peripheral, this has a custom service that can be used to trigger DFU mode. See how it is implemented.[/quote]
&lt;p&gt;I am using buttonless dfu and in this I am not getting any problem.&lt;/p&gt;
&lt;p&gt;Also I add custom service in buttonless dfu code and in this I am not getting problem.&lt;/p&gt;
&lt;p&gt;I attached map file for RAM address,&lt;/p&gt;
&lt;p&gt;1)bootloader map file&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/secure_5F00_dfu_5F00_secure_5F00_dfu_5F00_ble_5F00_s130_5F00_pca10028.map"&gt;devzone.nordicsemi.com/.../secure_5F00_dfu_5F00_secure_5F00_dfu_5F00_ble_5F00_s130_5F00_pca10028.map&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2) map file for buttonless dfu&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_buttonless_5F00_dfu_5F00_pca10028_5F00_s130.map"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_buttonless_5F00_dfu_5F00_pca10028_5F00_s130.map&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3) map file for custom application&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_template_5F00_pca10028_5F00_s130.map"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_template_5F00_pca10028_5F00_s130.map&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement DFU in nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/226122?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 11:42:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:722fd9d9-7746-45f1-9fb3-d272f8a36423</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Urvisha Andani"]I am using nrfutil 5.1.0[/quote]
&lt;p&gt;&amp;nbsp;As long as you are able to compile the bootloader with the custom made dfu public_key.c that is fine.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Urvisha Andani"]In this when I add custom service in my application I successfully download firmware through bootloader but after that from application I can not able to jump in bootloader.[/quote]
&lt;p&gt;&amp;nbsp;So your application is starting up after you have updated via the bootloader, right?&lt;/p&gt;
&lt;p&gt;When you have a valid application (verified by the bootloader), then the bootloader will typically run into the application, since you don&amp;#39;t want it to require a DFU on every startup.&lt;/p&gt;
&lt;p&gt;There are two main ways to &amp;quot;activate&amp;quot; DFU mode again when you have a valid application:&lt;/p&gt;
&lt;p&gt;1: You can assign a button to trigger the bootloader to start the DFU mode instead of starting the application. If you check the nrf_dfu_enter_check() function in nrf_dfu.c, you can see that it checks whether or not a button is pressed. So basically, if this button is held when you restart the device, it will enter DFU mode.&lt;/p&gt;
&lt;p&gt;2: There is something called a buttonless_dfu_service in the SDK. If you try to create a DFU image based on the experimental_ble_app_buttonless_dfu example in the SDK\examples\ble_peripheral, this has a custom service that can be used to trigger DFU mode. See how it is implemented.&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: Can I implement DFU in nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/226100?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 10:21:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68abbca8-eaf6-4c64-88f0-c2b7ecc4528d</guid><dc:creator>Urvisha Andani</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip/225725"]I suggest you take a look at the SDK12.3.0\examples\dfu\bootloader\secure\pca10028. &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader" rel="noopener noreferrer" target="_blank"&gt;This guide&lt;/a&gt; is also useful, if you have not worked with our bootloader before.[/quote]
&lt;p&gt;Thank you for reply, I use same bootloader.&lt;/p&gt;
&lt;p&gt;In this when I add custom service in my application I successfully download firmware through bootloader but after that from application I can not able to jump in bootloader.&lt;/p&gt;
&lt;p&gt;In my application I use five application timer.&lt;/p&gt;
&lt;p&gt;So can I Implement DFU in nRF51822?&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/55651/can-i-implement-dfu-in-nrf51822-chip/225725"]Please be aware that there is a bug in the latest version of nrfutil (the tool that you use to generate keys and DFU images). The public keys that are generated is missing a comma. Please see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/55629/dfu_public_key-c-won-t-compile" rel="noopener noreferrer" target="_blank"&gt;this ticket&lt;/a&gt;&amp;nbsp;for details. So just add that comma, or use nrfutil v5.0.0 instead.[/quote]
&lt;p&gt;I am using nrfutil 5.1.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can I implement DFU in nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/225725?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 16:03:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1db40710-16f4-423c-baed-0aad33d2e648</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Urvisha,&lt;/p&gt;
&lt;p&gt;I suggest you take a look at the SDK12.3.0\examples\dfu\bootloader\secure\pca10028. &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader" rel="noopener noreferrer" target="_blank"&gt;This guide&lt;/a&gt; is also useful, if you have not worked with our bootloader before.&lt;/p&gt;
&lt;p&gt;Please be aware that there is a bug in the latest version of nrfutil (the tool that you use to generate keys and DFU images). The public keys that are generated is missing a comma. Please see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/55629/dfu_public_key-c-won-t-compile" rel="noopener noreferrer" target="_blank"&gt;this ticket&lt;/a&gt;&amp;nbsp;for details. So just add that comma, or use nrfutil v5.0.0 instead.&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>