<?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>Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117864/add-uarte-in-dfu-bootloader-to-update-an-stm32</link><description>Hi, 
 I use the secure BLE Bootloader to update the nRF52840 (with S140). 
 Now I want to add a UARTE to update the STM32 connected to nRF52. 
 Do you have a solution to do that? All my tries have not worked. 
 Thanks for help. 
 Best regards.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Jan 2025 07:39:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117864/add-uarte-in-dfu-bootloader-to-update-an-stm32" /><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/518779?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2025 07:39:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86d91afb-7aec-4625-82b3-d581868e2907</guid><dc:creator>vonRollChristophe</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I think the SoftDevice is not necessary for LibUarte.&lt;/p&gt;
&lt;p&gt;Last days, I tried to update the STM32 with the application, and that&amp;#39;s works. So I will try to update the STM32 with the application. The bootloader will receive the new firmware in DFU mode and transfer information to the application with a specific not-initialized RAM space. The application will make the STM32 update. I hope that will run as I want.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/518771?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2025 07:12:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3d2c6dc-3d98-4db4-9d19-8edc1264a97a</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Christophe&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry, but we don&amp;#39;t have a finished example for it, as the implementation will change based on what the external device here will be, so you&amp;#39;re on your own in the implementation itself.&lt;/p&gt;
&lt;p&gt;What event is it exactly that you&amp;#39;re running into here? Does Libuarte require the SoftDevice to be enabled? If the issue is that the SoftDevice is enabled in the DFU and then trying to be enabled again when the application begins, you should disable it before moving to the application.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/518440?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2025 13:04:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f5a6053-93f0-42b7-9233-7490b68ac935</guid><dc:creator>vonRollChristophe</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your help and time.&lt;/p&gt;
&lt;p&gt;I use LibUarte because nRF52 communicates with two other microcontrollers, and I found the best solution with examples in the SDK.&lt;/p&gt;
&lt;p&gt;The solution works for the application, so I thought that would work with the bootloader to update an STM32. Unfortunately not. After solving the implementation problem, I saw the data was not sent.&lt;br /&gt;Indeed, we will not make DFU very often. So if you have an example of the UARTE/APP_UART integrated into the secure bootloader, I will be pleased to have it.&lt;br /&gt;At the moment, I modified the firmware to test the STM32 update with the application. And that&amp;#39;s work almost, but the problem is on the STM32 side.&lt;/p&gt;
&lt;p&gt;To clarify the SoftDevice issue. I think the nRF52 event are managed by the SoftDevice, and as it is enable only in DFU part of the bootloader (after application activation), my implementation of the LibUarte in bootloader does not work. I have no error message only no data transmitted by UARTE.&lt;br /&gt;I hope I am cleared because it is not easy to explain a problem.&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;
&lt;p&gt;Christophe&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/518417?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2025 11:23:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b005285b-87a7-42ea-ad81-4c4d084c21ee</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Is there a specific reason you use libuarte in your project? I think you could save yourself some trouble if you used the regular UARTE/APP_UART. If you&amp;#39;re not doing DFU very often, so that the extra time the &amp;quot;regular UART&amp;quot; uses doesn&amp;#39;t matter too much, I don&amp;#39;t think libuarte has a lot of advantages here, and it is harder to use.&lt;/p&gt;
&lt;p&gt;Also, can you clarify what the current issue is? Is it that the SoftDevice isn&amp;#39;t enabled correctly within the DFU_INIT function on your end? What exactly is the error message you&amp;#39;re seeing here?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/518226?ContentTypeID=1</link><pubDate>Tue, 14 Jan 2025 07:45:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f97939e-b67a-4bdf-ba0d-3cb9d3c28648</guid><dc:creator>vonRollChristophe</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There were at least two problems:&lt;/p&gt;
&lt;p&gt;1. The application timer should be initialized before the LibUarte&lt;/p&gt;
&lt;p&gt;2. The priority of timers was not good regarding the LibUarte priority in sdk_cong.h file.&lt;/p&gt;
&lt;p&gt;Now the libuarte is initialized but the problem is the softdevice enabling. It is done in the bootloader function &amp;quot;nrf_dfu_init&amp;quot;, but this function is called during DFU process, but the external application update is called in &amp;quot;nrf_bootloader_fw_activate&amp;quot; function and it is called before DFU process.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/518159?ContentTypeID=1</link><pubDate>Mon, 13 Jan 2025 13:06:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a5991cf-24ef-49e9-96ea-84184fed77b0</guid><dc:creator>vonRollChristophe</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I use SDK 17.1.0 and S140 7.2.0&lt;/p&gt;
&lt;p&gt;Yes, I declare the module with&amp;nbsp;&lt;span&gt;NRF_LIBUARTE_ASYNC_DEFINE ().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will check the configuration of the SDK, and the module initialization order, and debug in level 0 mode as you said.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Christophe&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/518155?ContentTypeID=1</link><pubDate>Mon, 13 Jan 2025 12:56:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bc14dbd-944f-4b38-9041-52aaa7dcc843</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What SDK version and S140 version are you using for development on your end here exactly?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try debugging and stepping into the code to see which exact function it is that ends up returning this error on your end.&amp;nbsp;&lt;span&gt;You would need to set a breakpoint inside the function and step by step check what causes the assert. Also check if you have declared the module with&amp;nbsp;NRF_LIBUARTE_ASYNC_DEFINE()&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You can also check out this ticket for some details on using libuarte with the SoftDevice:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67204/use-libuarte-together-with-softdevice"&gt;Use libuarte together with SoftDevice&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/517902?ContentTypeID=1</link><pubDate>Fri, 10 Jan 2025 10:04:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cba5dbd5-6931-4a8e-b8a0-7090efe958d3</guid><dc:creator>vonRollChristophe</dc:creator><description>&lt;p&gt;I am sorry, I was not explicit enough in my problem description.&lt;br /&gt;We develop a product based on nRF52840 that manages a STM32 and a USB Host microcontroller.&lt;br /&gt;I used the buttonless BLE secure bootloader example to make our bootloader, the ble_app_buttonless_dfu example to make the main application.&lt;br /&gt;The communication between the microcontrollers is based on the UARTE of the nrf52. I based my development on the &amp;quot;libuarte&amp;quot; example. In the main application, the initialization of the UARTE works and the communication with the microcontrollers is OK.&lt;br /&gt;The DFU for the main application works and I found the post that you mentioned to update another chip with the NRF_DFU_SUPPORTS_EXTERNAL_APP keyword. So I modified the compilation of the STM32 firmware to add the DFU generation with nrf_utils tools. The transfer of this DFU package works and the bootloader accepts the package and generates the bank_code NRF_DFU_BANK_VALID_EXT_APP to call the specific function to manage the external application.&lt;br /&gt;To update the STM32 we want to use the same UART to communicate with it in the main application. So to do that, I added the same library &amp;quot;libuarte&amp;quot; because that works in the main application.&lt;br /&gt;But when I debug the bootloader the function &amp;quot;nrf_libuarte_async_init&amp;quot; returns the NRF_ERROR_INTERNAL error.&lt;br /&gt;The configuration of UARTE is:&lt;br /&gt;Tx pin: 1.10 ; Rx pin: 1.13 ; baudrate: 115200 ; no parity ; no hardware control ; timeout: 1000 ; irq prio: 6&lt;br /&gt;For the UARTE, I use instance 1, and timer 2 to count Rx bytes, no RTC, and no timer for timeout.&lt;/p&gt;
&lt;p&gt;I checked sdk_config.h file and for me it is OK but maybe I am wrong.&lt;/p&gt;
&lt;p&gt;So as I am lost in my investigation, I need help to guide my research.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/517851?ContentTypeID=1</link><pubDate>Fri, 10 Jan 2025 07:03:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2429ec11-6c41-4b87-a3b1-80dd58bd83f1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You say that nrf_libuarte_async_init works in &amp;quot;the final application&amp;quot;, what do you mean by this exactly, and what&amp;#39;s the difference between this and when the libuarte_async_init returns the NRF_ERROR_INTERNAL? This error is pretty generic and just points to the libuarte not being initialized properly.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/517647?ContentTypeID=1</link><pubDate>Thu, 09 Jan 2025 10:25:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4401908-7c79-4666-8f95-33c1d523efc3</guid><dc:creator>vonRollChristophe</dc:creator><description>&lt;p&gt;Simon,&lt;/p&gt;
&lt;p&gt;Thanks for the information.&lt;/p&gt;
&lt;p&gt;I found this post and the DFU transfer of the STM32 binary is OK. With the DFU configuration NRF_DFU_SUPPORTS_EXTERNAL_APP my function to update the STM32 is called. The problem is that the function &amp;quot;nrf_libuarte_async_init&amp;quot; returns &amp;quot;NRF_ERROR_INTERNAL&amp;quot; when I call it and I do not know why. I use the same code in the final application and that works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Add UARTE in DFU bootloader to update an STM32</title><link>https://devzone.nordicsemi.com/thread/517634?ContentTypeID=1</link><pubDate>Thu, 09 Jan 2025 10:10:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cbc8371-7656-4fea-b980-51ae079bddda</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Please check out&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108200/ota-from-application-layer/468943"&gt; this DevZone case &lt;/a&gt;and the answer from my colleague Susheel, where he goes into some details on how to do DFU from an nRF device to an external one. Please note it&amp;#39;s experimental, but multiple DevZone users/customers have been using this successfully.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>