<?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 see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63272/how-to-see-debug-messages-via-rtt-channel-without-running-it-from-debugger</link><description>I am working on an existing Bootloader project, it uses the Bootloader from the SDK with added custom thin layer on top of it. It runs on a custom board. 
 I can see the debug messages fine when I run it from the debugger (SEGGER J-Link) - on RTT channel</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Sep 2020 12:59:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63272/how-to-see-debug-messages-via-rtt-channel-without-running-it-from-debugger" /><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/268324?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2020 12:59:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1960d48f-9e72-4b6c-b9a7-5e8618ce4790</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Harry,&amp;nbsp;&lt;br /&gt;If you use bootloader in SDK v15.3 the resume feature should already be implemented. You can find in the nrf_dfu_settings_t struct in nrf_dfu_types.h the write_offset property. It&amp;#39;s the current offset of the part of image that it&amp;#39;s already received. This value is sent to the DFU master when it start the process. And it&amp;#39;s stored in flash.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/267317?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 22:31:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e662b162-2f90-4c33-996a-c436c5478024</guid><dc:creator>Harry</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;The SDK I use is V15.3.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/267130?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 07:26:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:247f960a-4cc1-45fd-a5dd-b1d1df6ca5ef</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Harry,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you let me know the SDK version of your bootloader ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our current bootloader does support recovery mechanism and the offset value is stored in the bootloader setting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have tried this on BLE DFU but it should operate the same on UART DFU (if implemented properly in nrfutil).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/267105?ContentTypeID=1</link><pubDate>Sun, 30 Aug 2020 23:30:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba6270c7-d18b-4eed-96b8-eea5c5f32291</guid><dc:creator>Harry</dc:creator><description>&lt;p style="color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;margin-top:0px;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;Ok Hung, I will try to debug it. If I recall correctly, it worked fine when it runs from debugger. I&amp;#39;ll let you know.&lt;/p&gt;
&lt;p style="color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;In the meantime, would you mind giving me the answer of these questions?&lt;/p&gt;
[quote userid="90336" url="~/f/nordic-q-a/63272/how-to-see-debug-messages-via-rtt-channel-without-running-it-from-debugger/266818"]&lt;p style="color:rgb(0, 0, 0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;I added the retry mechanism to the pc-nRFutil, so it seems that retry mechanism for checksum may not be ideal for this communication protocol, is that right?&lt;/p&gt;&lt;p style="color:rgb(0, 0, 0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;I was wondering, does the bootloader store the last offset in bootloader settings - to be used to pick up where it left? I would imagine people may encounter this situation when a FW upgrade failed - then they won&amp;#39;t be able to retry without doing full erase. Is there a recovery mechanism without full chip erase?&lt;/p&gt;&lt;p style="color:rgb(0, 0, 0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;&lt;/p&gt;[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/267001?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 12:24:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1eb54ae-fa7d-4240-91ab-5895d764c677</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Harry,&amp;nbsp;&lt;br /&gt;The response code&amp;nbsp;[0, 96, 192, 2] is a little bit strange to me. When it started with a 0 and 192 doesn&amp;#39;t really match the response code as far as I remember.&amp;nbsp;&lt;br /&gt;There must be something wrong with the bootloader. If it&amp;#39;s possible to debug the bootloader to check why it send such response we would be able to figure out.&amp;nbsp;&lt;br /&gt;In addition the response code came just 3uS after the CRC request also suggested that there must be something wrong. Usually the CRC calculation takes a few hundred micro seconds.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m thinking og there is a chance&amp;nbsp;that there&amp;#39;s been a RAM/Flash hardware issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/266818?ContentTypeID=1</link><pubDate>Thu, 27 Aug 2020 17:29:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8b31d45-2c8c-49db-b4e8-ed493644ef7a</guid><dc:creator>Harry</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;You&amp;#39;re welcome. Yes, I use the python pc-nRFutil as the DFU master. Ok, I will try to do full chip erase and I will let you know.&lt;/p&gt;
&lt;p&gt;I added the retry mechanism to the pc-nRFutil, so it seems that retry mechanism for checksum may not be ideal for this communication protocol, is that right?&lt;/p&gt;
&lt;p&gt;I was wondering, does the bootloader store the last offset in bootloader settings - to be used to pick up where it left? I would imagine people may encounter this situation when a FW upgrade failed - then they won&amp;#39;t be able to retry without doing full erase. Is there a recovery mechanism without full chip erase?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Ok, here is the result of the run. It went way pass the previous failure, but still it failed at similar operation of the board is not sending back any checksum. This is still running at 9600 bps. no HWFC.&lt;/p&gt;
&lt;p&gt;(I removed the content, and replaced it with &lt;strong&gt;&lt;em&gt;&lt;span style="background-color:#ffffff;"&gt;&amp;lt; &amp;lt;...... lots of data here ........&amp;gt; &amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2020-08-27 12:51:49,808 Sending Application image.
2020-08-27 12:51:52,812 SLIP: --&amp;gt; [9, 1]
2020-08-27 12:51:52,822 SLIP: &amp;lt;-- [2, 2, 126, 96, 9, 1, 1]
2020-08-27 12:51:52,822 Serial: No Response: 0x02
2020-08-27 12:51:52,822 SLIP: --&amp;gt; [9, 2]
2020-08-27 12:51:52,832 SLIP: &amp;lt;-- [96, 9, 1, 2]
&amp;gt;&amp;gt; Ping resp
2020-08-27 12:51:52,834 Serial: Set Packet Receipt Notification 0
2020-08-27 12:51:52,834 SLIP: --&amp;gt; [2, 0, 0]
2020-08-27 12:51:52,842 SLIP: &amp;lt;-- [96, 2, 1]
2020-08-27 12:51:52,845 SLIP: --&amp;gt; [7]
2020-08-27 12:51:52,855 SLIP: &amp;lt;-- [96, 7, 1, 131, 0]
MTU recv: 131
2020-08-27 12:51:52,858 Sending init packet...
2020-08-27 12:51:52,858 Serial: Selecting Object: type:1
2020-08-27 12:51:52,858 SLIP: --&amp;gt; [6, 1]
2020-08-27 12:51:52,881 SLIP: &amp;lt;-- [96, 6, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2020-08-27 12:51:52,881 Serial: Object selected:  max_size:512 offset:0 crc:0
2020-08-27 12:51:52,881 SLIP: --&amp;gt; [1, 1, 141, 0, 0, 0]
2020-08-27 12:51:52,894 SLIP: &amp;lt;-- [96, 1, 1]
2020-08-27 12:51:52,895 Serial: Streaming Data: len:141 offset:0 crc:0x00000000
2020-08-27 12:51:52,895 SLIP: --&amp;gt; [8, 18, 138, 1, 10, 68, 8, 1, 18, 64, 8, 1, 16, 52, 26, 2, 182, 1, 32, 0, 40, 0, 48, 0, 56, 248, 143, 14, 66, 36, 8, 3, 18, 32, 179, 191, 14, 64, 59, 56, 142, 105, 59, 100, 116, 179, 191, 246, 154, 86, 58, 54, 37, 227, 123, 44, 21, 249, 120, 157, 3, 54, 174, 213, 180]
2020-08-27 12:51:52,897 SLIP: --&amp;gt; [8, 67, 72, 0, 82, 4, 8, 1, 18, 0, 16, 0, 26, 64, 232, 222, 197, 26, 1, 55, 172, 224, 122, 238, 104, 172, 203, 121, 70, 131, 219, 205, 239, 224, 86, 1, 61, 17, 117, 22, 221, 152, 255, 186, 96, 113, 239, 230, 14, 19, 214, 237, 30, 20, 176, 230, 128, 15, 223, 103, 11, 93, 76, 69, 131]
2020-08-27 12:51:52,897 SLIP: --&amp;gt; [8, 153, 37, 0, 229, 169, 43, 43, 110, 207, 147, 120, 171, 68]
2020-08-27 12:51:52,898 SLIP: --&amp;gt; [3]
2020-08-27 12:51:53,065 SLIP: &amp;lt;-- [96, 3, 1, 141, 0, 0, 0, 195, 20, 20, 217]
2020-08-27 12:51:53,306 Sending firmware file...
2020-08-27 12:51:53,308 Serial: Selecting Object: type:2
2020-08-27 12:51:53,308 SLIP: --&amp;gt; [6, 2]
2020-08-27 12:51:53,331 SLIP: &amp;lt;-- [96, 6, 1, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
2020-08-27 12:51:53,332 Serial: Object selected:  max_size:4096 offset:0 crc:0
2020-08-27 12:51:53,332 SLIP: --&amp;gt; [1, 2, 0, 16, 0, 0]
2020-08-27 12:51:53,430 SLIP: &amp;lt;-- [96, 1, 1]
2020-08-27 12:51:53,430 Serial: Streaming Data: len:4096 offset:0 crc:0x00000000
2020-08-27 12:51:53,431 SLIP: --&amp;gt; [8, 16, 219, 3, 32, 177, 100, 2, 0, 185, 100, 2, 0, 187, 100, 2, 0, 189, 100, 2, 0, 191, 100, 2, 0, 193, 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 195, 100, 2, 0, 197, 100, 2, 0, 0, 0, 0, 0, 199, 100, 2, 0, 201, 100, 2, 0]

&amp;lt;&amp;lt;...... lots of data here ........&amp;gt;&amp;gt;

2020-08-27 12:51:57,322 SLIP: --&amp;gt; [8, 3, 10, 180, 238, 224, 10, 241, 238, 16, 250, 19, 216, 0, 32, 9, 235, 1, 18, 0, 191, 0, 235, 133, 3, 7, 235, 131, 3, 147, 237, 0, 10, 189, 238, 192, 10, 16, 238, 16, 58, 66, 248, 32, 48, 64, 28, 3, 40, 240, 221, 73, 28, 2, 41, 125, 209, 6, 153, 8, 152, 8, 154, 65, 26]
2020-08-27 12:51:57,394 SLIP: --&amp;gt; [3]
2020-08-27 12:51:57,882 SLIP: &amp;lt;-- [96, 3, 1, 0, 16, 0, 0, 122, 195, 171, 203]
This is response from __calculate_checksum
[0, 16, 0, 0, 122, 195, 171, 203]
2020-08-27 12:51:57,890 SLIP: --&amp;gt; [4]
2020-08-27 12:51:57,898 SLIP: &amp;lt;-- [96, 4, 1]
2020-08-27 12:51:57,904 SLIP: --&amp;gt; [1, 2, 0, 16, 0, 0]
2020-08-27 12:51:58,003 SLIP: &amp;lt;-- [96, 1, 1]
2020-08-27 12:51:58,003 Serial: Streaming Data: len:4096 offset:4096 crc:0xCBABC37A
2020-08-27 12:51:58,005 SLIP: --&amp;gt; [8, 10, 152, 128, 26, 64, 28, 73, 28, 109, 212, 0, 40, 107, 219, 3, 144, 6, 154, 31, 152, 0, 235, 130, 0, 8, 240, 98, 255, 8, 153, 31, 152, 240, 238, 64, 154, 0, 235, 129, 0, 3, 153, 8, 240, 187, 254, 241, 238, 73, 10, 32, 238, 32, 10, 244, 238, 192, 154, 241, 238, 16, 250, 82, 210]

&amp;lt;&amp;lt;...... lots of data here ........&amp;gt;&amp;gt;

2020-08-27 12:52:01,921 SLIP: --&amp;gt; [8, 66, 246, 34, 33, 1, 224, 66, 246, 33, 33, 161, 34, 42, 112, 10, 10, 234, 112, 41, 113, 144, 248, 66, 16, 105, 113, 176, 248, 68, 32, 5, 38, 81, 28, 160, 248, 68, 16, 17, 10, 169, 113, 234, 113, 5, 241, 8, 4, 0, 34, 38, 224, 2, 235, 66, 7, 0, 33, 0, 235, 135, 12, 0, 191]
2020-08-27 12:52:01,989 SLIP: --&amp;gt; [3]
2020-08-27 12:52:01,992 SLIP: &amp;lt;-- [0, 96, 192, 2]
Traceback (most recent call last):
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\board_prog.py&amp;quot;, line 29, in &amp;lt;module&amp;gt;
    run()
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\click\core.py&amp;quot;, line 828, in __call__
    return self.main(*args, **kwargs)
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\click\core.py&amp;quot;, line 781, in main
    rv = self.invoke(ctx)
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\click\core.py&amp;quot;, line 1046, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\click\core.py&amp;quot;, line 590, in invoke
    return callback(*args, **kwargs)
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\board_prog.py&amp;quot;, line 25, in run
    dfu.flash(package, rlevel)
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\mdfu.py&amp;quot;, line 178, in flash
    dfu.dfu_send_images()
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\nordicsemi\dfu\dfu.py&amp;quot;, line 129, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\nordicsemi\dfu\dfu.py&amp;quot;, line 102, in _dfu_send_image
    self.dfu_transport.send_firmware(data)
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 327, in send_firmware
    response[&amp;#39;crc&amp;#39;] = self.__stream_data(data=data, crc=response[&amp;#39;crc&amp;#39;], offset=i)
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 530, in __stream_data
    response = self.__calculate_checksum()
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 456, in __calculate_checksum
    DfuTransportSerial.OP_CODE[&amp;#39;CalcChecSum&amp;#39;])
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 539, in __send_get_response
    resp = self.__get_response(operation, listresp)
  File &amp;quot;H:\Projects\Nordic\nRFBoot\PyTool\nrfUtil_6.1\lib\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 566, in __get_response
    raise NordicSemiException(&amp;#39;No Response: 0x{:02X}&amp;#39;.format(resp[0]))
pc_ble_driver_py.exceptions.NordicSemiException: No Response: 0x00
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/266799?ContentTypeID=1</link><pubDate>Thu, 27 Aug 2020 15:18:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39f5c506-9df8-4119-b86b-037e390a2cac</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Harry,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the trace. What I can see in the trace is that the main difference is the offset of 141 bytes in the Failed case. This showed that the bootloader already received the init packet and because of that the DFU master (I assume you are using nRFutil ? ) skip sending the init packet and simply execute it.&lt;/p&gt;
&lt;p&gt;After that the DFU master continue to transfer the image until it finish the first object and ask for CRC check. The failed board didn&amp;#39;t response to the request and on the retry it responded with the CRC of the init packet (exactly the same as in the first response to the init packet Select command at the beginning). So for some reason the bootloader didn&amp;#39;t accept the first object of the application image.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What I would suggest is to try to do a chip erase to clean the board and try again. Then you can record a trace with out the offset as in the current test.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/266596?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 22:20:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65f2e030-5fb7-483f-89bb-5b23eca80d8d</guid><dc:creator>Harry</dc:creator><description>&lt;p&gt;Hi Hung, 9600 still failed on one board. The other two work, but I need to test more to check.&lt;/p&gt;
&lt;p&gt;The weird thing is, when it failed, the packet sequence is different, there are discrepancies. I used the same file, I don&amp;#39;t understand why would the payload/sequence be any different, or why would it&amp;#39;s parsed differently. It almost looks like the issue is in the file parsing.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s what I meant:&lt;/p&gt;
&lt;p&gt;At the beginning:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2020_2D00_08_2D00_26_5F00_15_2D00_11_2D00_43.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;At the end:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2020_2D00_08_2D00_26_5F00_15_2D00_16_2D00_47.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Let me know what you think.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/265370?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 14:40:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29b7307c-12ff-4cad-b435-c355c97d2467</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I don&amp;#39;t have further idea except that you may need to run the bootloader in debug mode and check why it doesn&amp;#39;t response to the CalcChecksum command. I suspect that it crashed earlier than that or it didn&amp;#39;t receive the packet properly.&amp;nbsp;&lt;br /&gt;But could you confirm that you only see the issue in 3 boards and only one board&amp;nbsp;always failed ? When you test the other 2 board at 9600 would they also failed ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/265201?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 23:43:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:717e6e95-724b-483d-8461-d2be9aaac607</guid><dc:creator>Harry</dc:creator><description>&lt;p&gt;Hi Hung, sorry for the delayed response.&lt;/p&gt;
&lt;p&gt;I finally had a chance to try 9600 bps. I have a board that&amp;#39;s consistently failed at the same spot. So, even with 9600 it&amp;#39;s still failed. The failure is the embedded side didn&amp;#39;t send the checksum (&amp;quot;CalcChecksum&amp;quot; no response). When I did a retry from the PC side (resend the command, 0x03), got mismatch checksum.&lt;/p&gt;
&lt;p&gt;Am I not supposed to do the retry?&lt;/p&gt;
&lt;p&gt;Any other idea I can try?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/260356?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 12:16:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ac10768-bb71-43eb-80f9-653e27f9e324</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;The UART bootloader is designed with HWFC. If you don&amp;#39;t use HWFC you may need to change the baudrate to very low. Let&amp;#39;s star with 9600bps. The reason is that there is some flash erasing involved when you do DFU. If you don&amp;#39;t have HWFC there is a chance that your will have buffer overflow because the CPU is hang when there is flash activity on going.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/260224?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 18:04:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cff53e1b-f9d3-4053-babb-3f93cfa34575</guid><dc:creator>Harry</dc:creator><description>&lt;p&gt;I put 20 ms, maybe it&amp;#39;s not enough. I will try to make it larger.&lt;/p&gt;
&lt;p&gt;Unfortunately, no, I am not using HWFC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/260062?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 08:29:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9073ca41-0937-41d3-b483-58b869c9bff1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I see. Please try to put some delay before you start the DFU process. There could be a chance that the device was not ready before you send data.&amp;nbsp;&lt;br /&gt;I assume you are using HWFC ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/259977?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 16:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43d59249-5786-4aaa-b7ab-e86b686d38b1</guid><dc:creator>Harry</dc:creator><description>&lt;p&gt;Hi Hung, no worries for the late response.&lt;/p&gt;
&lt;p&gt;Btw, the main application runs at higher baud rate, 1 Mbps via UART, and there is no occurrences of drop packet or any other UART issue.&lt;/p&gt;
&lt;p&gt;I suspected the electrical characteristic when the board power up, or after soft reset. Btw, we have 2 type of devices, one uses reset line to do soft reset with small time window waiting for DFU trigger packet, the other one is purely hard reset (power reset). The common thing between both of them are that DFU is performed right after a reset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/259869?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 09:57:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d03f490-8069-43a3-b90d-06b3875cb2a1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Harry,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for late response I was on vacation last week.&amp;nbsp;&lt;br /&gt;The fact that you mentioned it worked 99% with the debugger suggest that it might not be the worn flash.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m more into the issue of UART communication. Please try to do some intensive test of the UART communication.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since both RTT and UART logging is not possible, you may want to debug using GPIO toggling to check where in the bootloader the issue occurred.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/258396?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 17:24:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d797de21-80fa-418b-9241-dbb7178fb8ee</guid><dc:creator>Harry</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Yes, I already did all that.&lt;/p&gt;
&lt;p&gt;The crash varies, somestimes at &amp;quot;failed to send init packet&amp;quot;, but mostly at &amp;quot;CalcChecsum&amp;quot;. No, it&amp;#39;s not at the end of DFU, as I played with PRN value.&lt;/p&gt;
&lt;p&gt;Thanks for pointing out about possibility of worn flash. Among approximately 100 brand new boards (our custom boards), we encounter 3 failed boards. There are 2 boards that are intermittent, and one board that is always failed. When I load/program everything via J-Link (nRF Connect for Desktop), this one board works fine. So, I don&amp;#39;t know if it&amp;#39;s worn flash.&lt;/p&gt;
&lt;p&gt;At first I thought it&amp;#39;s something with the PCB layout or tracks, but the main application is able to run fine at much higher baudrate (1Mbps). DFU runs at 115200 bps.&lt;/p&gt;
&lt;p&gt;Any idea?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/258268?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 10:00:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce83252a-e182-4832-8854-eadb67fe637d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Harry, &lt;br /&gt;You may need to recompile the bootloader with debug mode (no optimization and DEBUG in the preprocessor symbols) and put some logging to check what went wrong. You may need to move the bootloader down in flash to make more space due to larger flash size.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t think flash operation would cause any interference here. The DFU protocol was designed so that the master always wait for the DFU target to be ready before continue. We will need to look into why the bootloader hung.&amp;nbsp;&lt;br /&gt;You usually saw it crashed at the end of the DFU process ?&amp;nbsp;&lt;br /&gt;Please also try to test on other hardware board, just to avoid any possibility that the flash on the DUT was worn out.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/258181?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 16:47:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:253b3acb-5d0d-49ae-a448-a85b46129b09</guid><dc:creator>Harry</dc:creator><description>&lt;p&gt;Thank you so much, Hung. I found that it&amp;#39;s something with reset mechanism. It works ok now.&lt;/p&gt;
&lt;p&gt;Btw, is it OK to ask you a side question? Or do you want me to post a new case?&lt;/p&gt;
&lt;p&gt;Have you seen the flash erase operation interfering with DFU transfer? I know that the CPU is halted during flash erase. When I debug the Bootloader, the PC side (pc-nrfutil) didn&amp;#39;t get a response for &amp;quot;CalcChecsum&amp;quot; command (sometimes at other places). And one time, I saw the debug message indicated it&amp;#39;s doing &amp;quot;fstorage erase&amp;quot; operation. The problem is, when I run it from debugger, 99.9% of the time it worked fine - so I couldn&amp;#39;t use breakpoints to step through.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to see debug messages via RTT channel without running it from debugger?</title><link>https://devzone.nordicsemi.com/thread/258141?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 14:02:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baaaa196-682b-4211-b851-68336c602f24</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Serene,&amp;nbsp;&lt;br /&gt;Maybe&amp;nbsp;your issue is the same as this ?&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/20708/rtt-logging-from-application-started-by-bootloader"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/20708/rtt-logging-from-application-started-by-bootloader&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>