This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

what information does the nrfjprog.exe write to UICR register??

what information does the nrfjprog.exe write to UICR(User Information Configuration Registers) register??

==========Tutorial of Flashing dfu bootloader to the nRF51 DK====== we need to make sure that nrfjprog.exe is configured as the tool for flash programming in project options. The default J-link target driver cannot correctly program the bootloader, this is because J-link can not write directly to the User Information Configuration Registers(UICR) from a hex file. The example project is preconfigured to use nrfjprog.exe, which is installed with the nRF51 MDK, and must be in the Windows system path.

Parents
  • there is an older project of sdk 6.0 in our projects, i check the hex of softdevice and boot.. and i found that the hex of softdevice include the address of bootloader(0X0003C800) .. but this hex of softdevice is different from the softdevice downloaded of sdk6.0. i have some doubt about it. maybe it is modified by manual.

    the detail hex of older project:

    :020000040000FA :10000000481C0020992B0100F1160100CF2A0100A5 :1000100000000000000000000000000000000000E0 :100020000000000000000000000000000D2C010096 :100030000000000000000000F1160100F1160100B0 : ... ....

    :020000041000EA :1010000000400100FFFFFFFFFFFFFFFFFFFFFFFFAB :081010004900FFFF00C80300C6 :04000005000000C136 :00000001FF

    the line of 081010 00 4900FFFF 00C80300 C6, we know the address: 0x1014: 00c80300,

    this address is the bootloader address of 0x0003 c800,

    the hex file of bootloader:

    020000040003F7 :10C80000A8300020ADC90300BFC90300C1C903009F :10C810000000000000000000000000000000000018 :10C82000000000000000000000000000C3C9030079 :10C830000000000000000000C5C90300C7C90300D4 :10C84000C9C90300C9C90300C9C90300C9C9030094 :10C85000C9C903000000000059D10300C9C9030081 ... :10D4E0002C2000207C10000020C903000024F40040 :10D4F000000000000000000000000000000000002C :10D50000000000000000000000000000000000001B :08D51000000000000000000013 :020000041000EA :081010004900FFFF00C80300C6 :040000050003C8C16B :00000001FF

    the boot and softdevice are attached.

    boot hex: Boot.hex

    softdevice hex: s110_nrf51822_6.0.0_softdevice(1).hex

    and i compare hex of softdevice. image description left side: hex of softdevice 6.0 in our old project. right side : original hex of softdevice 6.0

Reply
  • there is an older project of sdk 6.0 in our projects, i check the hex of softdevice and boot.. and i found that the hex of softdevice include the address of bootloader(0X0003C800) .. but this hex of softdevice is different from the softdevice downloaded of sdk6.0. i have some doubt about it. maybe it is modified by manual.

    the detail hex of older project:

    :020000040000FA :10000000481C0020992B0100F1160100CF2A0100A5 :1000100000000000000000000000000000000000E0 :100020000000000000000000000000000D2C010096 :100030000000000000000000F1160100F1160100B0 : ... ....

    :020000041000EA :1010000000400100FFFFFFFFFFFFFFFFFFFFFFFFAB :081010004900FFFF00C80300C6 :04000005000000C136 :00000001FF

    the line of 081010 00 4900FFFF 00C80300 C6, we know the address: 0x1014: 00c80300,

    this address is the bootloader address of 0x0003 c800,

    the hex file of bootloader:

    020000040003F7 :10C80000A8300020ADC90300BFC90300C1C903009F :10C810000000000000000000000000000000000018 :10C82000000000000000000000000000C3C9030079 :10C830000000000000000000C5C90300C7C90300D4 :10C84000C9C90300C9C90300C9C90300C9C9030094 :10C85000C9C903000000000059D10300C9C9030081 ... :10D4E0002C2000207C10000020C903000024F40040 :10D4F000000000000000000000000000000000002C :10D50000000000000000000000000000000000001B :08D51000000000000000000013 :020000041000EA :081010004900FFFF00C80300C6 :040000050003C8C16B :00000001FF

    the boot and softdevice are attached.

    boot hex: Boot.hex

    softdevice hex: s110_nrf51822_6.0.0_softdevice(1).hex

    and i compare hex of softdevice. image description left side: hex of softdevice 6.0 in our old project. right side : original hex of softdevice 6.0

Children
  • i found that the hex of softdevice include the address of bootloader(0X0003C800) ..it is different from the original hex of softdevice sdk6.0 without bootloader address.

    ---- original hex of softdevice -- :102DB000349B5F8074800010027001E4B52A01002A :020000041000EA :1010000000400100FFFFFFFFFFFFFFFFFFFFFFFFAB

    :041010004900FFFF95

    :04000005000000C136

    :00000001FF

    original: :041010 00 4900FFFF 95 without bootloader address: 0x0003c800.

    old project: 081010 00 4900FFFF 00C80300 C6 with bootloader address.

    they are different . but the old project can run normally.. this is my

    question. why ? i am not sure that it is modified by other people manually or not..

  • Hawk, Softdevice hex does not include bootloader address. The hex values you are showing must be your dfu app from SDK? It cannot be the hex of the softdevice as far as i know.

    In S1107.0.0 removed putting value in UICR.CLENR0, so from this version softdevice does not put anything in UICR

    The size of the SoftDevice has been increased to 88 kB.
    The FWID is no longer stored in the UICR. Updated versions of the tools (nRFgo Studio, nrfjprog) compatible with this change
    are available as downloads from the Nordic Semiconductor web page.
    The SoftDevice hex file no longer contains the SoftDevice size in the UICR.CLENR0 register. This means that the SoftDevice is
    no longer protected by default. The updated versions of the tools (nRFgo Studio, nrfjprog) will write the SoftDevice size to the UI
    CR.CLENR0 register by default, thereby restoring default protection. Having protection enabled will not allow Device Firmware
    Update to a SoftDevice of larger size than the original, therefore the tools make it optional to not set the UICR.CLENR0 register.
    
  • thanks, the first,i make sure hex of softdevice does not include bootloader address.

Related