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

UICR : reading after writing.

nRF52832 Product Specification v1.4 states:

11.3 Writing to user information configuration registers (UICR)

User information configuration registers (UICR) are written in the same way as Flash.
After UICR has been written, the new UICR configuration will only take effect after a reset.

However my experience is that the following code segment demonstrates the values are available immediately after writing.

    uint32_t dateCompiled=0x28162908;

         NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
    NRF_UICR->CUSTOMER[0] = dateCompiled;
    NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos;

    if(NRF_UICR->CUSTOMER[0]  != dateCompiled ) NRF_LOG_INFO("dateCompiled NOT stored to UICR  \r\n"); 
    if(NRF_UICR->CUSTOMER[0]  == dateCompiled ) NRF_LOG_INFO("dateCompiled IS  stored to UICR  \r\n"); 

Can someone clarify the Specification statement.

Parents
  • Hi Dennis, 

    User information configuration registers (UICR) are written in the same way as Flash.
    After UICR has been written, the new UICR configuration will only take effect after a reset.

     relates to the UICR registers that are used for configuration of the chip, i.e.

    • PSELRESET[0]
    • PSELRESET[1]
    • APPROTECT
    • NFCPINS

    The values written to these registers will be available immediatly as the UICR registers behave like FLASH. However, the values will not be clocked in/latched in before after a reset. 

    Best regards
    Bjørn

Reply
  • Hi Dennis, 

    User information configuration registers (UICR) are written in the same way as Flash.
    After UICR has been written, the new UICR configuration will only take effect after a reset.

     relates to the UICR registers that are used for configuration of the chip, i.e.

    • PSELRESET[0]
    • PSELRESET[1]
    • APPROTECT
    • NFCPINS

    The values written to these registers will be available immediatly as the UICR registers behave like FLASH. However, the values will not be clocked in/latched in before after a reset. 

    Best regards
    Bjørn

Children
Related