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

NRFFW registers in the UICR get erased when I write to the CUSTOMER registers by loading a binary file through JLink

I'm trying to understand why this happens.

My application uses the softdevice, which configures some NRFFW registers. I program my application, bootloader, SoftDevice via nrfjprog.

Then, I write 8 bytes to the CUSTOMER registers via a binary file through Jlink to address 0x10001080.

Parents
  • Hello,

    'nrfjprog --memwr 0x10001080 --val <value>' should work. Please make sure you are not appending the ' --sectorerase' option in your case as that will erase the entire UICR section before writing. --sectorease will be needed if you are updating an existing value.

    The bootloader uses UICR->NRFFW[0] and UICR->NRFFW[1] to inform the MBR of its start address and where the MBR param flash page has been allocated. These are included in the bootloader image. But other UICR configurations such as UICR.PSELRESET is usually set at runtime by the startup code (in system_nrf52840.c). The Softdevice does not store configurations to UICR or FLASH.

    Best regards,

    Vidar

Reply
  • Hello,

    'nrfjprog --memwr 0x10001080 --val <value>' should work. Please make sure you are not appending the ' --sectorerase' option in your case as that will erase the entire UICR section before writing. --sectorease will be needed if you are updating an existing value.

    The bootloader uses UICR->NRFFW[0] and UICR->NRFFW[1] to inform the MBR of its start address and where the MBR param flash page has been allocated. These are included in the bootloader image. But other UICR configurations such as UICR.PSELRESET is usually set at runtime by the startup code (in system_nrf52840.c). The Softdevice does not store configurations to UICR or FLASH.

    Best regards,

    Vidar

Children
No Data
Related