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

S130 v2 Soft device size in future and protection

Hi

Question

What is the risk/chance that future revisions (>2.0.0) of S130 will be incompatible with the setting UICR.CLENR0 = 0x1C000?

Background

Today we would like to use S130 V2.0.0 and set UICR.CLENR0 to 0x1C0000. We will then only be able to upgrade to a soft device having a size <= 0x1C000 since we cannot erase UICR once product leaves factory.

Alternately we could use a soft device partitioned in such a way that any code residing after 0x1C000 does not touch protected peripherals or memory, but then that would need to be provided by Nordic.

Not programming UICR.CLENR0 seems not to be an option since at least the call

    sd_mbr_command_t com = {SD_MBR_COMMAND_INIT_SD, };
    err_code = sd_mbr_command(&com);

changes NRF_MPU.RLENR0 to 0x08 which later causes a hard fault in sd_softdevice_vector_table_base_set() at 0x00019C96 STR r0,[r1,#0x00], r1=0x20000004


As described in comments below, later I was not able to reproduce the setting of NRF_MPU.RLENR0 to 0x08. Reason for not being able to reproduce is unclear, but could possibly be related to clearing of low ram. I have not been able to prove this.

Answer to main question:

Yes, if you intend to update the firmware on the chip then you should not set the CLENR0 register.

Related