<?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>Bootloader DFU Register and Flash Changes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17293/bootloader-dfu-register-and-flash-changes</link><description>I have been having issues with bootloader launching my application on a custom nRF52832 based hardware device. 
 The bootloader itself seems to be successfully completing the DFU process but the app fails to start after the download. Various other versions</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 30 Oct 2016 14:57:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17293/bootloader-dfu-register-and-flash-changes" /><item><title>RE: Bootloader DFU Register and Flash Changes</title><link>https://devzone.nordicsemi.com/thread/66454?ContentTypeID=1</link><pubDate>Sun, 30 Oct 2016 14:57:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95d8d1fa-09fd-4b84-ab6d-d1cd7bd0bd65</guid><dc:creator>Kyle Krueger</dc:creator><description>&lt;p&gt;I am having a similar issue. The app will not launch, and the device reboots into DFU_TARG mode again after the DFU service reports a success.&lt;/p&gt;
&lt;p&gt;However, with the pca10040 DK the same Bootloader, Softdevice, and App work with no problems.&lt;/p&gt;
&lt;p&gt;I have already adjusted the clock speed for ble_init to work for both platforms, and am stumped by this issue.&lt;/p&gt;
&lt;p&gt;So it seems like BANK_VALID_APP is not being written to as it should by the DFU service on completion.&lt;/p&gt;
&lt;p&gt;I am not in the office right now, but can provide more information on Monday or Tuesday.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader DFU Register and Flash Changes</title><link>https://devzone.nordicsemi.com/thread/66456?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2016 13:57:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ba22dfa-e867-4f07-bb4b-2c44f94ce7b9</guid><dc:creator>Milton</dc:creator><description>&lt;p&gt;Hi Bjørn,&lt;/p&gt;
&lt;p&gt;Thank you for the detailed explanation. It definitely helps to clarify things and to have all the information in one place.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Milton&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader DFU Register and Flash Changes</title><link>https://devzone.nordicsemi.com/thread/66455?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2016 06:44:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54d4a947-43b3-4dc4-a319-efa272be8b49</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Milton,&lt;/p&gt;
&lt;p&gt;The UICR register at 0x10001014 holds the bootloader start address and is only written to when the bootloader is flashed to the nRF5x device. The bootloader start address will not be altered after this initial write.&lt;/p&gt;
&lt;p&gt;The UICR register at 0x10001000 holds the start address of the application vector table which is also the end of the Softdevice region. Only written to when the SoftDevice is initially flashed to the nRF5x device.&lt;/p&gt;
&lt;p&gt;The MBR params page at 0x7E000 is used by the Master Boot Record(MBR) to store state information and will be altered when the bootloader issues commands to the MBR.&lt;/p&gt;
&lt;p&gt;The bootloader settings page at 0x7F000 and will change during the DFU update to contain data about the received firmware image and the status of the firmware banks. The data isstored in the bootloader_settings_t struct&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;typedef enum
{
    BANK_VALID_APP   = 0x01,
    BANK_VALID_SD    = 0xA5,
    BANK_VALID_BOOT  = 0xAA,
    BANK_ERASED      = 0xFE,
    BANK_INVALID_APP = 0xFF,
} bootloader_bank_code_t;

typedef struct
{
    bootloader_bank_code_t bank_0;          /**&amp;lt; Variable to store if bank 0 contains a valid application. */
    uint16_t               bank_0_crc;      /**&amp;lt; If bank is valid, this field will contain a valid CRC of the total image. */
    bootloader_bank_code_t bank_1;          /**&amp;lt; Variable to store if bank 1 has been erased/prepared for new image. Bank 1 is only used in Banked Update scenario. */
    uint32_t               bank_0_size;     /**&amp;lt; Size of active image in bank0 if present, otherwise 0. */
    uint32_t               sd_image_size;   /**&amp;lt; Size of SoftDevice image in bank0 if bank_0 code is BANK_VALID_SD. */
    uint32_t               bl_image_size;   /**&amp;lt; Size of Bootloader image in bank0 if bank_0 code is BANK_VALID_SD. */
    uint32_t               app_image_size;  /**&amp;lt; Size of Application image in bank0 if bank_0 code is BANK_VALID_SD. */
    uint32_t               sd_image_start;  /**&amp;lt; Location in flash where SoftDevice image is stored for SoftDevice update. */
} bootloader_settings_t;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A successful DFU of the application will result in the bank_0 field of the bootloader_settings_t struct being set to BANK_VALID_APP   = 0x01 and the bank_0_size field is set to the size of the application.&lt;/p&gt;
&lt;p&gt;Best regards
Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>