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.

  • it writes to UICR->BOOTLOADERADDR.

    This needs to be written for softdevice to know that there is a bootloader in the system.

  • Hey guys,

    Just a note: When using nRF52 series devices you do not need to do this. Keil can write and erase the UICR in nRF52 devices using the default J-Link driver no problem. If you are using nRF52 ignore this step in the tutorial and program devices how you normally do, simpler.

    This is only the case for nRF51 as it is more complicated here.

  • 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

  • Hi hawk, what is the confusion here?

  • 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..

1 2