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

Flash/load UICR without erase

Hi,

Is it possible to write to the UICR (with SES) without erasing it first?

Normally the boot loader sets the correct values in UICR, but for development I want to have some fallback values written to the UICR (mostly PSELRESET and REGOUT). But when I configure an UICR section, SES also erases the UICR, loosing the boot loader values.

Since the fallback values and the boot loader values are always the same, there is no need for some kind of check, it can simply write te values to the UICR.

I would prefer these constants written during loading, to keep my code clean.

Thanks in advance.

Kind regards,

Remco Poelstra

Parents
  • Hi,

    Unfortunately, I'm not aware of any ways to do this from SES (except from writing the UICR from the code). I was thinking that you could do it in the "Load end script" config in the Target script section, but it seems like adding "TargetInterface.pokeUint32(0x10001018, 0xFE000)" does also erase the full UICR, even with the MemorySections in UICR removed.

    Maybe you can ask in the Segger forum if they have any solutions for this?

    You can certainly write the values with nrfjprog (ex: nrfjprog --memwr 0x10001304 --val 0x00000000), but this would be outside of SES.

    Best regards,
    Jørgen

Reply
  • Hi,

    Unfortunately, I'm not aware of any ways to do this from SES (except from writing the UICR from the code). I was thinking that you could do it in the "Load end script" config in the Target script section, but it seems like adding "TargetInterface.pokeUint32(0x10001018, 0xFE000)" does also erase the full UICR, even with the MemorySections in UICR removed.

    Maybe you can ask in the Segger forum if they have any solutions for this?

    You can certainly write the values with nrfjprog (ex: nrfjprog --memwr 0x10001304 --val 0x00000000), but this would be outside of SES.

    Best regards,
    Jørgen

Children
Related