Writing into KDR Registers of Cryptocell

  //set life cycle state to secure so you can write into KDR registers only once.

  //copy key from flash to KDR registers
  NRF_CC_HOST_RGF->HOST_IOT_KDR1 = *((uint32_t *)(DEVICE_SECRET_ADDRESS + 0x00000004));
  NRF_CC_HOST_RGF->HOST_IOT_KDR2 = *((uint32_t *)(DEVICE_SECRET_ADDRESS + 0x00000008));
  NRF_CC_HOST_RGF->HOST_IOT_KDR3 = *((uint32_t *)(DEVICE_SECRET_ADDRESS + 0x0000000C));

  //DEBUG: check if the key was copied
    retcode = 0;

I use the above code to copy the device root key from the flash region. The if condition at the end results to FALSE always whcih implies that the key was not copied into the registers. Also the LCS_VALID_FLAG reads as invalid via a debugger. What is the right way to write into the device root key registers?