<?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>nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26379/nrf5-sdk-for-mesh-v0-10-1dfu-hangs</link><description>Hello, 
 I am working with the nRF-SDK-for-Mesh v0.10.1 I am able to compile and run everything fine. However the DFU example hangs. It looks like a hard fault ( all the LEDs are on). 
 I am following the guide from the SDK docs here: 
 infocenter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Nov 2017 14:35:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26379/nrf5-sdk-for-mesh-v0-10-1dfu-hangs" /><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103807?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2017 14:35:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ddc1eb9-55c7-4e02-aed3-b4034679d738</guid><dc:creator>Jason Peterson</dc:creator><description>&lt;p&gt;I think it was RAM corruption by the RTT after using this post:
&lt;a href="https://devzone.nordicsemi.com/questi.."&gt;devzone.nordicsemi.com/questi..&lt;/a&gt;.
I was trying desperately to get some RTT output and forgot that I had modified the linker script. I started from scratch and upgraded my compiler from &amp;quot;gcc-arm-none-eabi-5_4-2016q3&amp;quot; to &amp;quot;gcc-arm-none-eabi-6-2017-q2-update&amp;quot; then everything worked including RTT.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103802?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2017 14:34:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a58a789-788d-45e5-aa89-d3671b55df3c</guid><dc:creator>Jason Peterson</dc:creator><description>&lt;p&gt;Ok, thank you for all the help!  I will give those things a try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103801?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2017 11:25:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1d6b9e4-1ae8-462a-a975-2b3d9b2dce50</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;If you don&amp;#39;t plan to use any extra feature on S130, you can consider using S110 instead. This will save you about 22kB. Also when you compile please use Release version so the size of the application can be compressed a little bit.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s easier on nRF52 series where we have more flash space.&lt;/p&gt;
&lt;p&gt;When you update firmware in a mesh network, you can choose different application IDs, so that for example the DFU gateway can have different application ID won&amp;#39;t be updated, only the normal nodes get new image. An application without DFU serial interface (normal node) will have smaller size.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103804?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2017 14:55:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c06e7a75-5ad3-4ed3-bd0b-b5314adda15b</guid><dc:creator>Jason Peterson</dc:creator><description>&lt;p&gt;I think it was RAM corruption by the RTT after using this post:
&lt;a href="https://devzone.nordicsemi.com/question/122629/rtt-logging-from-application-started-by-bootloader/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;
I was trying desperately to get some RTT output and forgot that I had modified the linker script.  I started from scratch and upgraded my compiler from &amp;quot;gcc-arm-none-eabi-5_4-2016q3&amp;quot; to &amp;quot;gcc-arm-none-eabi-6-2017-q2-update&amp;quot; then everything worked including RTT.&lt;/p&gt;
&lt;p&gt;So the &amp;quot;DFU example&amp;quot; can&amp;#39;t be used to update itself?  Is there anything I can do about that?  Am I correct in thinking that as it sits now it looks like I can only use DFU once because the new application has to be smaller then the &amp;quot;DFU Example&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103800?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2017 13:21:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47576247-9f26-4346-8e45-d53a4d1c726c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Could you let me know how you fix the issue in the initial question ?  The hex file I provided to you simply the stock example, I didn&amp;#39;t modify anything.&lt;/p&gt;
&lt;p&gt;Regarding the issue when you try to update dfu application, I think it&amp;#39;s because the size of the DFU application is too big for DFU update. Note that we need 2 banks to do background DFU. So the size of the application should not exceed 50% of the space for application (Total flash - softdevice - bootloader )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103799?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 21:12:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d7a35eb-add6-431c-8b20-df7384b16c9d</guid><dc:creator>Jason Peterson</dc:creator><description>&lt;p&gt;When I use the  &amp;quot;examples/dfu/bin/app_green_s130.hex&amp;quot; file to generate the DFU package and upload it It works!&lt;/p&gt;
&lt;p&gt;However, when I use &amp;quot;/build/examples/dfu/dfu_nrf51422_xxAC_s130_2.0.1.hex&amp;quot; I get the error in my previous comment...?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103805?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 16:21:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64c00b8d-d992-4d23-a9a4-7ab6b0d73210</guid><dc:creator>Jason Peterson</dc:creator><description>&lt;p&gt;Yes, that worked.  I upgraded my compiler to gcc-arm-none-eabi-6-2017-q2-update and now it seems to be running, however when I try a DFU it aborts:&lt;/p&gt;
&lt;p&gt;RTT Log:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;t:        325&amp;gt;, main.c,  162, ----- Bluetooth Mesh DFU Example -----
&amp;lt;t:        345&amp;gt;, nrf_mesh_sdk.c,  181, Initializing softdevice
&amp;lt;t:          5&amp;gt;, nrf_mesh_sdk.c,  122, Initializing SoftDevice...
&amp;lt;t:         23&amp;gt;, nrf_mesh_sdk.c,  131, Ram base: 0x200022D8
&amp;lt;t:         92&amp;gt;, nrf_mesh_sdk.c,  140, sd_ble_enable: app_ram_base should be adjusted to 0x20001900
&amp;lt;t:        123&amp;gt;, nrf_mesh_sdk.c,  191, Initializing mesh stack
&amp;lt;t:       1316&amp;gt;, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
&amp;lt;t:       1348&amp;gt;, nrf_mesh_dfu.c,  561, 	SERIAL TX!
&amp;lt;t:       1371&amp;gt;, nrf_mesh_sdk.c,  198, Enabling mesh stack
&amp;lt;t:       1397&amp;gt;, serial_handler_prov.c,  212, Generating encryption keypair...
&amp;lt;t:      38419&amp;gt;, main.c,  186, Enabling serial interface...
&amp;lt;t:      38441&amp;gt;, main.c,  190, Initialization complete!
&amp;lt;t:     261902&amp;gt;, nrf_mesh_dfu.c,  390, 	New firmware!
&amp;lt;t:     261927&amp;gt;, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
&amp;lt;t:     261960&amp;gt;, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 0).
&amp;lt;t:     261986&amp;gt;, nrf_mesh_dfu.c,  561, 	SERIAL TX!
&amp;lt;t:     328229&amp;gt;, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFD
&amp;lt;t:     328262&amp;gt;, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 0).
&amp;lt;t:     328288&amp;gt;, nrf_mesh_dfu.c,  561, 	SERIAL TX!
&amp;lt;t:     394303&amp;gt;, nrf_mesh_dfu.c,  383, 	Abort event. Reason: 0xC
&amp;lt;t:     394328&amp;gt;, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
&amp;lt;t:     394361&amp;gt;, nrf_mesh_dfu.c,  534, Killing a TX slot prematurely (repeats done: 20).
&amp;lt;t:     394388&amp;gt;, nrf_mesh_dfu.c,  561, 	SERIAL TX!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;nrfutil log:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfutil --verbose dfu serial -pkg ../build/examples/dfu/dfu_nrf51422_xxAC_s130_2.0.1.hex.zip -p /dev/tty.usbmodem1441 -b 115200 -fc --mesh
Upgrading target on /dev/tty.usbmodem1441 with DFU package /Users/jasonpeterson/Documents/nrf5_SDK_for_Mesh_v0-2a/build/examples/dfu/dfu_nrf51422_xxAC_s130_2.0.1.hex.zip. Flow control is enabled.
  [------------------------------------]    0%Flushing com-port...
Opened com-port
Starting DFU upgrade of type 4, SoftDevice size: 0, bootloader size: 0, application size: 93584
Sending DFU start packet, afterwards we wait for the flash on target to be initialized before continuing.
PC -&amp;gt; target: 0502aabbccdd
target -&amp;gt; PC: 0582aabbccdd
Got echo response
Sending DFU init packet
PC -&amp;gt; target: 1378fdff040fe064a2a659000000010002000000
target -&amp;gt; PC: 16a6045900000001000200000059000000010001000000
target -&amp;gt; PC: 03847800
PC -&amp;gt; target: 1378fdff040fe064a2a659000000010002000000
target -&amp;gt; PC: 03847800
PC -&amp;gt; target: 1478fcff0000e064a2a6ffffffff645b000000000c
target -&amp;gt; PC: 0ea30104590000000100020000000c
target -&amp;gt; PC: 03847800
Sending firmware file
  [------------------------------------]    1%  0d 00:11:52PC -&amp;gt; target: 1978fcff0100e064a2a6007d0020614b0200a14b0200f1b70100
target -&amp;gt; PC: 03847887
PC -&amp;gt; target: 1978fcff0100e064a2a6007d0020614b0200a14b0200f1b70100
target -&amp;gt; PC: 03847887
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;boot loader_verify:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python ../tools/dfu/bootloader_verify.py 680329450 /dev/tty.usbmodem1441 
Device family:			NRF51
Reading UICR..			OK.
Reading Device page..		OK.
Resetting device..		OK (In application)
Checking serial connection..	OK.

Bootloader verification OK.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;here is how I am generating the dfu file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfutil dfu genpkg --application ../build/examples/dfu/dfu_nrf51422_xxAC_s130_2.0.1.hex --company-id 0x00000059 --application-id 1 --application-version 2 --sd-req 0x0087 --mesh ../build/examples/dfu/dfu_nrf51422_xxAC_s130_2.0.1.hex.zip
Zip created at ../build/examples/dfu/dfu_nrf51422_xxAC_s130_2.0.1.hex.zip
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103798?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 13:20:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:515808cf-7d7c-421b-98e7-7f46f578f36e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jason,&lt;/p&gt;
&lt;p&gt;Step through the code after a break point wouldn&amp;#39;t work all the time. The reason is the Mesh stack uses the timeslot function on the softdevice. And the softdevice has some strict requirement on the timer . It crashes when you stop for a breakpoint. And most of the time you will end up in a hardfault if you step through a softdevice SVC call.&lt;/p&gt;
&lt;p&gt;But from your log and what you have seen on the board, seems that there is an issue. The log should be something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; 0&amp;gt; &amp;lt;t:        292&amp;gt;, main.c,  162, ----- Bluetooth Mesh DFU Example -----
 0&amp;gt; &amp;lt;t:        308&amp;gt;, nrf_mesh_sdk.c,  181, Initializing softdevice
 0&amp;gt; &amp;lt;t:          0&amp;gt;, nrf_mesh_sdk.c,  122, Initializing SoftDevice...
 0&amp;gt; &amp;lt;t:         14&amp;gt;, nrf_mesh_sdk.c,  131, Ram base: 0x200022D8
 0&amp;gt; &amp;lt;t:         84&amp;gt;, nrf_mesh_sdk.c,  140, sd_ble_enable: app_ram_base should be adjusted to 0x20001900
 0&amp;gt; &amp;lt;t:        115&amp;gt;, nrf_mesh_sdk.c,  191, Initializing mesh stack
 0&amp;gt; &amp;lt;t:       1872&amp;gt;, nrf_mesh_dfu.c,  528, 	RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
 0&amp;gt; &amp;lt;t:       1902&amp;gt;, nrf_mesh_dfu.c,  561, 	SERIAL TX!
 0&amp;gt; &amp;lt;t:       1921&amp;gt;, nrf_mesh_sdk.c,  198, Enabling mesh stack
 0&amp;gt; &amp;lt;t:       1944&amp;gt;, serial_handler_prov.c,  212, Generating encryption keypair...
 0&amp;gt; &amp;lt;t:      39222&amp;gt;, main.c,  186, Enabling serial interface...
 0&amp;gt; &amp;lt;t:      39242&amp;gt;, main.c,  190, Initialization complete!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the red LED should be on.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s strange that it didn&amp;#39;t throw any assertion in your case.&lt;/p&gt;
&lt;p&gt;I attached here the hex file I used and it worked for me. Could you please check ? Make sure you trigger a reset using nrfjprog after you program. Many times I found SES make the chip hang after programming.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dfu_5F00_nrf51422_5F00_xxAC_5F00_s130_5F00_2.0.1.hex"&gt;dfu_nrf51422_xxAC_s130_2.0.1.hex&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103803?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2017 17:28:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86e84a3c-c155-408a-80e3-7d62bc3a2875</guid><dc:creator>Jason Peterson</dc:creator><description>&lt;p&gt;Yeah, pretty sure it was hanging so I just added the GBD stack trace see above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v0.10.1DFU Hangs?</title><link>https://devzone.nordicsemi.com/thread/103806?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2017 13:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3aa69f75-a9cb-459f-83ab-fb6319eedc99</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jason,&lt;/p&gt;
&lt;p&gt;Have you double checked that it&amp;#39;s crashed ? I believe the log will be like that if you don&amp;#39;t start any DFU command from the PC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>