<?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>Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21339/debug-why-dfu-start-packet-not-starting-dfu</link><description>Firstly, platform: Sparkfun 52832 breakout board, DFU using UART, flashing an application, using nrfutil. 
 The problem fundamentally is the nRF52832 is not sending an ack that it received the DFU start packet. The packet is formatted correctly as defined</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Apr 2017 06:13:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21339/debug-why-dfu-start-packet-not-starting-dfu" /><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83576?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2017 06:13:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14955cc3-181a-4b31-bbd2-c83e94d4326b</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@cswanson420: Glad to hear that you found the cause of the issue. Happy to help :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83591?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2017 01:53:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f04563f6-065d-485b-8484-dbaf3834f1cd</guid><dc:creator>cswanson420</dc:creator><description>&lt;p&gt;A solution is to use Segger Ozone and put a breakpoint at the top of the function uart_event_handler in app.uart.c and invoke an nrfutil dfu serial flash sequence. The debugger will break at the top of this function and you shall be able to follow the logic from this point to determine either why the DFU packet is formatted incorrectly, not processed at all, or simply not detected in my case - in which case the breakpoint is not triggered.&lt;/p&gt;
&lt;p&gt;Pertaining specifically to the Sparkfun 52832 breakout, use a Blinky program to toggle pin 26 wired to an LED. If the LED flashes (confusing term I know), then the circuit is good. If not, then the circuit is bad and subsequently the board will not work using this pin. You may get wiring access to pin26 from the UART RX pin on the board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83575?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2017 01:47:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0024991a-4142-4e40-be68-2f69629f924f</guid><dc:creator>cswanson420</dc:creator><description>&lt;p&gt;This worked! However, not on the broken device. When I put a break point at uart_event_handler in app.uart.c and invoke an nrfutil flash sequence , then the breakpoint is triggered and all is well. This does not happen on the broken device.&lt;/p&gt;
&lt;p&gt;Therefore, I took another approach and recognizing p26 of the nRF53832 is used by the Sparkfun device as the UART RX channel, I used a Blinky program to toggle an LED using this pin. Again, on the working device, the LED flashed. On the broken device, the LED remained constantly illuminated.&lt;/p&gt;
&lt;p&gt;Hence, the device is malfunctioning probably at the circuitry layer.&lt;/p&gt;
&lt;p&gt;I learned a great deal with your help.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83582?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 11:14:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bdda46a-a53d-489e-bf0b-cbc2583593e6</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;If you want to debug whether the nRF52 sends an ack or not, then you can place a breakpoint in &lt;code&gt;rx_vendor_specific_pkt_type_handle()&lt;/code&gt; in &lt;code&gt;hci_transport.c&lt;/code&gt; at the &lt;code&gt;ack_transmit()&lt;/code&gt; calls.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83583?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 09:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6218aae-3b43-41cb-979a-fbdc33dc5f94</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I downloaded the repository and compiled the bootloader for the PCA10040 board (just  uncommented CFLAGS += -DBOARD_PCA10040 and commented out #CFLAGS += -DBOARD_CUSTOM in the Makefile).I flashed it to the DK along with the Softdevice from the hex folder. I had to enable flow control with nrfutil in order to perform a serial DFU, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfutil dfu serial -pkg ble_app_hrs.zip -p COM51 -fc
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83574?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 05:41:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1100a822-7e15-483a-90e9-dc2b8b089eff</guid><dc:creator>cswanson420</dc:creator><description>&lt;p&gt;I was able to program the device with multiple hex files, but alas, none of them were able to restore the functionality of a serial DFU for an application as the affected device was never willing to ACK the DFU start packet.&lt;/p&gt;
&lt;p&gt;I was able to install Ozone, and it&amp;#39;s awesome. Just what I was looking for and I am able to debug the compile .out file from the Sparkfun repo. Many Thanks.&lt;/p&gt;
&lt;p&gt;I am impressed that an RX event on the UART should raise an event within the SoftDevice(?) and the subsequent ACK could be interrupted with a breakpoint. Placement of this breakpoint should indicate whether the RX event is being received or whether some other condition is causing the ACK to be suppressed.&lt;/p&gt;
&lt;p&gt;Any clue indicating where I could look for the UART start packet ACK response code would derive much gratitude.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83585?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 14:38:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c396702-f4b1-4de3-83a7-90e3f3c51059</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I also recommend using Segger&amp;#39;s Ozone Debugger, &lt;a href="https://www.segger.com/ozone.html"&gt;here&lt;/a&gt; is the link. Just place the .outfile from the _build folder in the armgcc folder and then open it using Ozone, and you&amp;#39;re up and running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83581?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 14:36:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46d08e7c-9fe3-4ade-99b6-c9844da79a0b</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;No, nrfjprog uses the SWD interface, it wraps a jlink .dll, so its basically the same as J-Link Commander, but with some extra nrf5x only features. The SoftDevice should be flashed with 0x00000000 as the start address and the bootloader should be flashed to the nRF52 starting from 0x7A000. Its much easier to just use nrfjprog, which handles this for you, just provide it with the hexfile.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83587?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 13:22:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2df3ae6b-76e4-48ee-85f0-26b9513f6fb8</guid><dc:creator>cswanson420</dc:creator><description>&lt;p&gt;Also, is there any documentation how to compile code using arm-gcc to obtain a debug symbol file for use with J-LINKGDBServer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83586?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 13:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dedb0eeb-fa99-45af-96bc-4f8a6cfd4679</guid><dc:creator>cswanson420</dc:creator><description>&lt;p&gt;Yes, I have unfortunately. The nrfjprog program uses the serial UART to program the device, so it doesn&amp;#39;t work since the device doesn&amp;#39;t ACK the DFU start packet. The only thing that does work is programming the device with the nRF52_DK with J-Link Commander.&lt;/p&gt;
&lt;p&gt;What would be a big help is to better understand how to derive the target memory address to write both the softdevice and the dfu so I could use the nRF52_DK to reprogram the device.&lt;/p&gt;
&lt;p&gt;I may be naively assuming 0x00000 is the location of the softdevice.&lt;/p&gt;
&lt;p&gt;There is also a file called dfu_gcc_nrf52.ld in the Sparkfun Repo that appears to have memory offsets.&lt;/p&gt;
&lt;p&gt;Are these offsets relevant for proper flash memory offset programming?&lt;/p&gt;
&lt;p&gt;For instance:&lt;/p&gt;
&lt;p&gt;FLASH (rx) : ORIGIN = 0x7A000, LENGTH = 0x4000&lt;/p&gt;
&lt;p&gt;Would I write the compiled binary to  0x7A000?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83584?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 12:01:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7643751e-78ce-49c3-a478-50e708fb0f1f</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Have you tried wiping the board and flashing the bootloader and softdevice hex files from the repo, &lt;a href="https://github.com/sparkfun/nRF52832_Breakout/tree/master/Firmware/bootloader-custom/hex"&gt;here&lt;/a&gt; is the link, using &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/nrf5x_command_line_tools/nrf5x_nrfjprogexe.html"&gt;nrfjprog&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83577?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 14:51:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d687a1fd-3a74-4550-b1e0-4589e7745789</guid><dc:creator>cswanson420</dc:creator><description>&lt;p&gt;${NRFUTIL} --verbose dfu serial -pkg &amp;quot;${ZIP_ARTIFACT}&amp;quot; --port /dev/cu.usbserial-DN018TZM&lt;/p&gt;
&lt;p&gt;NRFUTIL=/Users/cswanson/nRFutil.20170401/nrfutil.20170401_0_5_2/bin/nrfutil&lt;/p&gt;
&lt;p&gt;BIN_ARTIFACT=$(find ${EXAMPLE_DIR}/_build/ -type f -name nrf*.bin)&lt;/p&gt;
&lt;p&gt;ZIP_ARTIFACT=$(echo ${BIN_ARTIFACT} | sed &amp;#39;s/.bin/.zip/g&amp;#39;)&lt;/p&gt;
&lt;p&gt;EXAMPLE_DIR=$(find ${WD}/${SDK}/examples/${EXAMPLE}/pca10040 -type d -name armgcc)&lt;/p&gt;
&lt;p&gt;Note: This command works on functioning Sparkfun devices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83588?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 13:59:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2de0f90c-8022-459c-8c5b-92bffb808f2e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Ah, so its a custom serial bootloader based on the serial bootloader from our SDK v11.0.0, that explains the LED behaviour. Could you post the nrfutil command you&amp;#39;re using to start the serial DFU?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83578?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 13:54:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66d5a6b0-0db6-4563-83d9-66aa0744bad7</guid><dc:creator>cswanson420</dc:creator><description>&lt;p&gt;What I am trying is to compile the &lt;a href="https://github.com/sparkfun/nRF52832_Breakout"&gt;sparkfun code&lt;/a&gt; so I may flash it and then use GDB with JLink GDBServer to set breakpoints in the bootloader to determine whether the DFU start packet is being detected or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83579?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 13:50:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9874421e-3663-480a-89e4-69b7852ba738</guid><dc:creator>cswanson420</dc:creator><description>&lt;p&gt;This could be. However, I did a savebin operation on a functioning device for the flash, data, code, UICR, FICR, APB, AHB, internal and external peripheral memory regions. I used these files to do a loadbin operation onto the malfunctioning device. After this loadbin operation, the device started to perform its bootloader led sequence. Prior, it did not.
I may have done the UICR and FICR regions incorrectly as I stored 4096 bytes rather than 256 so maybe this overwrote something? Just guess right now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83580?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 12:36:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa224596-ea27-4d17-825f-91e78e280631</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@cswanson420: From your description in the comments ;&amp;quot; I was able to get the bootloader LED sequence to activate - which is a flashing with a reducing frequency&amp;quot; , it could sound like you have not flased the single_bank_serial_s132 example. It does not blink a LED, it only turns one on at startup.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83590?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2017 12:39:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5eeec0df-5416-4f80-97e5-972f0baba2ea</guid><dc:creator>cswanson420</dc:creator><description>&lt;ul&gt;
&lt;li&gt;Yes, thank you. I am using the 0.5.2 nrfutil and the process works flashing an identical device. I did something rash with this particular device that has caused it to not be flashed other than to do a J-link commander loadbin operation.&lt;/li&gt;
&lt;li&gt;This error state has really given me an opportunity to dive into the internals of the NRF52 SoC that I otherwise would not have done. Indeed, this experience may cause me to abandon completely serial DFU and got the extra length to achieve BLE DFU.&lt;/li&gt;
&lt;li&gt;Notwithstanding, I am nagged that after flashing the broken device with a functioning devices &amp;quot;memory&amp;quot; I was able to get the bootloader LED sequence to activate - which is a flashing with a reducing frequency - as I had erased it during examination, but the device will not begin the DFU process upon receiving the start packet.&lt;/li&gt;
&lt;li&gt;So, is the device toast? Or, is there a means to understand why the bootloader is not recognizing the start packet.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug why DFU start packet not starting DFU</title><link>https://devzone.nordicsemi.com/thread/83589?ContentTypeID=1</link><pubDate>Wed, 12 Apr 2017 21:12:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:371199b8-267c-4f88-8242-7d98edcbb564</guid><dc:creator>tvdstaaij</dc:creator><description>&lt;p&gt;Some suggestions to check:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;According to its &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/"&gt;Github readme&lt;/a&gt;, the latest version of nrfutil only supports the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v13.0.0%2Fsdk_app_serial_dfu_bootloader.html"&gt;new serial bootloader format&lt;/a&gt;, so I believe you would need a legacy version of nrfutil to flash an application through the legacy bootloader.&lt;/li&gt;
&lt;li&gt;I personally had trouble with UART DMA in the serial secure bootloader on the nRF52, and had to set all UART DMA support defines to 0 in sdk_config.h to get it to work.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>