<?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>DFU UART nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101434/dfu-uart-nrf52840</link><description>Hello 
 I am trying to update firmware via UART. I use nrf52840 kit connected to my pc via UART. I used my computer to download the bin file to the nrf52840 kit. 
 Here is my code: int error; error = dfu_target_mcuboot_set_buf(stream_buffer, DFU_SIZE_DATA</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Jul 2023 07:36:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101434/dfu-uart-nrf52840" /><item><title>RE: DFU UART nrf52840</title><link>https://devzone.nordicsemi.com/thread/436650?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2023 07:36:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53f41d70-d93f-4c50-8dc1-a493ea03e8c8</guid><dc:creator>thang47</dc:creator><description>&lt;p&gt;Thank you for your answer. I did DFU over UART. I follwed the test code from the zephyr reporitory in nRF Connect SDK:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/tests/subsys/dfu/mcuboot_multi/src/main.c#L83"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/tests/subsys/dfu/mcuboot_multi/src/main.c#L83&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU UART nrf52840</title><link>https://devzone.nordicsemi.com/thread/435880?ContentTypeID=1</link><pubDate>Wed, 12 Jul 2023 08:14:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72f9ce1e-80e3-40f1-bdd9-b2665d65a24a</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you verify the following: You want to use another mcu to transfer an update file over uart to a nRF52840 that is the update target? If that is the case, then I still will recommend that you have a look at the samples I mentioned and the sample Einar mentioned w.r.t. how to do this with uart and then merge the samples. Use the&amp;nbsp;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/client_smp/smp_client_ble"&gt;client smp ble sample&lt;/a&gt; and the &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp"&gt;smp uart sample&lt;/a&gt;&amp;nbsp;to merge what you wish to have.&lt;/p&gt;
[quote user=""]As far as I understand the time 5-7s it system is looking for a new firmware version but it can&amp;#39;t. I do not understand why?[/quote]
&lt;p&gt;To learn more about what is happening in this period you should enable bootloader logging. Look up&amp;nbsp;&lt;em&gt;mcuboot log&amp;nbsp;&lt;/em&gt;in&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html&lt;/a&gt;&amp;nbsp;to see what is relevant for you&lt;/p&gt;
[quote user="thang47"]As far as I know, there are 2 slots, slot0 and slot1. Slot0 is the part the device will boot, and slot1 is for updating. I tried writing the bin file to slot1, but I don&amp;#39;t know how to switch between the 2 slots.[/quote]
&lt;p&gt;I &lt;strong&gt;strongly&lt;/strong&gt; recommend that you get familiar with the samples written in the repository that both Einar and I have linked you before you write your own custom DFU procedure. There are more than two slots in the partitioning of the project, but there are only 2 slots dedicated to the application and the uppdate of the application (if you have dfu support). Once again, see&amp;nbsp;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples&lt;/a&gt;&amp;nbsp;for a general overview of the theory regarding application slots.&lt;/p&gt;
[quote user="thang47"]I followed the example:&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/tests/subsys/dfu/mcuboot_multi/src/main.c#L83"&gt;github.com/.../main.c&lt;/a&gt;[/quote]
&lt;p&gt;This is not an example, but rather test code from the&amp;nbsp;zephyr reporitory in nRF Connect SDK. Don&amp;#39;t use this. Use the samples in the repository we&amp;#39;ve linked before you create something custom.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU UART nrf52840</title><link>https://devzone.nordicsemi.com/thread/435835?ContentTypeID=1</link><pubDate>Wed, 12 Jul 2023 03:49:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a797a4b3-6cba-40b6-9530-ef2d91b0017f</guid><dc:creator>thang47</dc:creator><description>&lt;p&gt;Hi AHaug,&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&lt;/p&gt;
&lt;p&gt;But I want to update the firmware of on nRF52840DK over UART. I try use TeraTerm application on my computer to transfer bin file update, nRF52840DK connect my computer over UART.&lt;/p&gt;
&lt;p&gt;As far as I know, there are 2 slots, slot0 and slot1. Slot0 is the part the device will boot, and slot1 is for updating. I tried writing the bin file to slot1, but I don&amp;#39;t know how to switch between the 2 slots.&lt;br /&gt;I followed the example:&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/tests/subsys/dfu/mcuboot_multi/src/main.c#L83"&gt;github.com/.../main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU UART nrf52840</title><link>https://devzone.nordicsemi.com/thread/435512?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 13:13:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ca268fb-713e-46eb-aa9a-986a3454da60</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Einar is on vacation so I&amp;#39;ve taken over this case for him for now. If you wish to do DFU between two devices I recommend you to have a look at this repository:&amp;nbsp;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/client_smp/smp_client_ble"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/client_smp/smp_client_ble&lt;/a&gt;&amp;nbsp;which is based on&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;Add DFU support to your application&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This sample shows how to update the firmware of one nRF52840DK from another nRF52840DK&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU UART nrf52840</title><link>https://devzone.nordicsemi.com/thread/435122?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 07:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d94c7e4e-584a-4e38-9b1c-b09754887a26</guid><dc:creator>thang47</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Currently I want to use another MCU to transfer the bin file to update the firmware for my nrf52840.I followed the example of this link: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84077/error-using-dfu_target_init-api-of-dfu_target-library/350127"&gt;devzone.nordicsemi.com/.../350127&lt;/a&gt;. But it doesn&amp;#39;t work&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU UART nrf52840</title><link>https://devzone.nordicsemi.com/thread/434207?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 12:12:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bba345e3-e6e4-41d0-8153-4b7ba5bfe3a8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;MCUBoot and SMP server is supported out of the box in Zephyr and the nRF Connect SDK, so I would suggest looking at that. There is the official &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;SMP server sample&lt;/a&gt;&amp;nbsp;from Zephyr, but I would suggest also looking at &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples"&gt;this set of bootloader samples&lt;/a&gt; that a colleague of me made, which have simple samples for various use cases, including UART/serial DFU (both &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/serial_recovery/mcuboot_serial_recovery_uart"&gt;serial recovery&lt;/a&gt; and &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/smp/mcuboot_smp_uart"&gt;SMP&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>