<?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 UART bootload issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92190/nrf52840-uart-bootload-issue</link><description>Hi, 
 I developed a firmware without softdevice for a custom board with nRF52840 
 I recently decided to add a bootloader to my application and I based my bootloader code from the example : secure bootloader pca10056 uart 
 In the bootloader code I changed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Oct 2022 15:09:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92190/nrf52840-uart-bootload-issue" /><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/391032?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 15:09:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee36fa85-90e2-4111-aec4-4c6ff4faf6ee</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;In the file &amp;quot;sdk_config.h&amp;quot; I&amp;nbsp;changed the&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;NRF_DFU_SERIAL_UART_USES_HWFC to 0&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;5000+ lines of defines and this one was causing the issue&lt;/p&gt;
&lt;p&gt;Thanks for the help Hung&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/391006?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 13:30:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a113a3e-4961-4c42-a950-49e8091ca754</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;I set the baud rate back to 115200, I can clearly see the PC pings but the bootloader just pulls the Tx low after few pings, something is missing but I can&amp;#39;t find what&lt;/p&gt;
&lt;p&gt;&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/pastedimage1666013425172v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/390998?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 12:57:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d31b7b6-b78e-4208-a6b2-8104bf077c49</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;I use this value to generate a 100k baudrate :&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;0x01999000&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/390974?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 11:29:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b5f0154-e45b-416b-a2bc-981b55b94b9b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriel,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the nRF52840 doesn&amp;#39;t support both 115200 and 100K baud. Do you mean 1M baud ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&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/pastedimage1666005985595v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regarding your question about UART/UARTE, the bootloader code by default uses UARTE.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/390937?ContentTypeID=1</link><pubDate>Mon, 17 Oct 2022 09:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95e189af-60ff-460e-873a-4f6bde7adcf4</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;The PC outputs a baudrate of&amp;nbsp;&lt;span&gt;115473 for the UART instead of 115200, that might trouble the nRF52&amp;nbsp;so we switched to 100k baudrate&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also I need to know what is best in the sdk config for bootload UART or UARTE ? I would say UARTE but it really depends on the nRF52 bootloader code, how is the compatibility with the easyDMA feature ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can clearly see with the logic analyzer that the nRF52 gets pinged&amp;nbsp;by the PC but it does not respond&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;PC logs :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;gt;nrfutil dfu serial -pkg app.zip -p COM4 -fc false -b 100000
  [------------------------------------]    0%
Traceback (most recent call last):
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\Scripts\nrfutil-script.py&amp;quot;, line 33, in &amp;lt;module&amp;gt;
    sys.exit(load_entry_point(&amp;#39;nrfutil==6.1.6&amp;#39;, &amp;#39;console_scripts&amp;#39;, &amp;#39;nrfutil&amp;#39;)())
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py&amp;quot;, line 1130, in __call__
    return self.main(*args, **kwargs)
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py&amp;quot;, line 1055, in main
    rv = self.invoke(ctx)
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py&amp;quot;, line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py&amp;quot;, line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py&amp;quot;, line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py&amp;quot;, line 760, in invoke
    return __callback(*args, **kwargs)
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\nordicsemi\__main__.py&amp;quot;, line 1073, in serial
    do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, serial_number, True,
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\nordicsemi\__main__.py&amp;quot;, line 988, in do_serial
    dfu.dfu_send_images()
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\nordicsemi\dfu\dfu.py&amp;quot;, line 127, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\nordicsemi\dfu\dfu.py&amp;quot;, line 88, in _dfu_send_image
    self.dfu_transport.open()
  File &amp;quot;C:\Users\gat\AppData\Local\Programs\Python\Python310\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 214, in open
    raise NordicSemiException(&amp;quot;No ping response after opening COM port&amp;quot;)
pc_ble_driver_py.exceptions.NordicSemiException: No ping response after opening COM port&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/390798?ContentTypeID=1</link><pubDate>Fri, 14 Oct 2022 11:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6fd5c8e-b23f-4aa5-a184-c4aafd4a51d2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriel,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you get any RTT log on the bootloader side ?&amp;nbsp;&lt;br /&gt;Have you tried to test the bootloader (+MBR)on the nRF52840 DK ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Also please use the bootloader you find in&amp;nbsp;\nRF5_SDK_17.1.0_ddde560\components\softdevice\mbr\hex not in&amp;nbsp;&lt;span&gt;\examples\dfu\secure_dfu_test_images\uart\&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/390199?ContentTypeID=1</link><pubDate>Tue, 11 Oct 2022 09:02:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a1ab92e-3745-4fc9-8112-34f227ec5613</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;We tested UART at 100k baudrate and its working fine. Somehow our bootloader is not seing the PC messages, I need to try to change the baudrate&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/387890?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 11:43:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32378165-9b0c-4d68-afb2-905ef4aa01bd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriel,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;We would need to verify that the bootloader can actually receive the UART command from the PC.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried to test your board with an UART example and verify that you can&amp;nbsp;communicate with the PC via UART ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you try to debug the bootloader and check if it receives any command ? You may want to use debug version of the bootloader.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/387838?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 08:55:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7aa3dd1-41f6-4155-836a-7932b838e2fc</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;Also I changed this in &amp;quot;sdk_config.h&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define NRF_BL_DFU_ENTER_METHOD_BUTTON 0
#define NRF_BL_DFU_ENTER_METHOD_GPREGRET 1
#define NRF_BL_DFU_ENTER_METHOD_BUTTONLESS 1
#define NRF_CRYPTO_ALLOCATOR 2
#define NRF_DFU_APP_ACCEPT_SAME_VERSION 1
#define NRF_DFU_APP_DOWNGRADE_PREVENTION 0&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/387837?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 08:51:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:645ae352-e9bf-47ad-8be2-80876db959ca</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I tried&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Flash MBR -&amp;gt; Flash bootloader -&amp;gt; Flash bootloader setting -&amp;gt; flash application&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It looks like I stay in the bootloader&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I then tried&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Flash MBR -&amp;gt; Flash bootloader.&amp;nbsp; -&amp;gt; Do DFU update of your application image , check if the application work.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrfutil dfu serial -pkg app.zip -p COM4 -fc false -b 115200&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But it stays at 0%&lt;/p&gt;
&lt;p&gt;I made a &amp;quot;custom_board.h&amp;quot;, can you check if its correct ?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;nrf_gpio.h&amp;quot;

#define LEDS_NUMBER    0
#define LED_1          NRF_GPIO_PIN_MAP(1,13) // R
#define LED_2          NRF_GPIO_PIN_MAP(1,0)	// G
#define LED_3          NRF_GPIO_PIN_MAP(1,1)	// B
#define LEDS_ACTIVE_STATE 0
#define LEDS_LIST { LED_1, LED_2, LED_3 }

#define BUTTONS_NUMBER 0
#define BUTTONS_ACTIVE_STATE 0

#define RX_PIN_NUMBER  NRF_GPIO_PIN_MAP(1,9)
#define TX_PIN_NUMBER  NRF_GPIO_PIN_MAP(1,7)
#define CTS_PIN_NUMBER 11
#define RTS_PIN_NUMBER NRF_GPIO_PIN_MAP(1,2)
#define HWFC           false&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 UART bootload issue</title><link>https://devzone.nordicsemi.com/thread/387477?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 11:31:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff5d2c85-a5b1-4ac4-aab1-421e6b966cbf</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Gabriel,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Before testing with bundling the hex files together, have you tried to flash them one by one ?&amp;nbsp;&lt;br /&gt;I would suggest to try :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. Flash MBR -&amp;gt; Flash bootloader -&amp;gt; Flash bootloader setting -&amp;gt; flash application&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It this doesn&amp;#39;t work, continue with:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2. Flash MBR -&amp;gt; Flash bootloader.&amp;nbsp; -&amp;gt; Do DFU update of your application image , check if the application work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3. If 2 works, you can try to do a hex dump of what in the flash using nrfjprog --readcode and then compare with what you have at step 1.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If 2 doesn&amp;#39;t work, there must be something wrong with the bootloader. Please double check that the way to enter DFU mode using a button is disabled. It&amp;#39;s in case that you have the GPIO hardware differently from the Dev Kit and the bootloader takes it as the button is pressed and won&amp;#39;t enter application but enter DFU instead.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>