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

Write to UICR CUSTOMER register not working

Hi,

Update:

Module: nRF52832

SDK v 14.2, SD v5.0, windows platform

I am trying to write to save a value to UICR customer register. My routine for saving the value to the register goes like this: 

            err_code = sd_softdevice_disable();
            if(err_code == 0)
            {
              NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Een<<NVMC_CONFIG_WEN_Pos;
              while(NRF_NVMC->READY == NVMC_READY_READY_Busy){};

              NRF_UICR->CUSTOMER[4] = 0x0A0A0A0A;

              NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren<<NVMC_CONFIG_WEN_Pos;
              while(NRF_NVMC->READY == NVMC_READY_READY_Busy){};
              printf("HW calibration exited.\r\n");
              nrf_delay_ms(5);
              NVIC_SystemReset();
            }

While debugging, i can see the CONFIG register is changed to Wen and after writing, changed back to Ren. But after rebooting, i dont see the value being written to the register. 

Would  any of you what i am doing wrong here? Followed the process as mentioned in some of the forums here and the reference manual for NRF52832.

Thank you.

Parents
  • I too have an issue here.  From our manufacturing shell I CAN write the customer registers; but if I try and program the registers when the softdevice is running using the same routine; I get a HW exception when trying to program. On restart I see no changed customer registers. Its like some kind of protection mechanism has been configured when the soft device was started.

Reply
  • I too have an issue here.  From our manufacturing shell I CAN write the customer registers; but if I try and program the registers when the softdevice is running using the same routine; I get a HW exception when trying to program. On restart I see no changed customer registers. Its like some kind of protection mechanism has been configured when the soft device was started.

Children
Related