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

UICR and RAM discrepancies

HI,

I've been using the Nordic Command Line Tools to do the following:

  • program an example hex file to the SoC
  • read the code, ram, and uicr registers and save to file A
  • program a different example hex file
  • read the code, ram, and uicr registers and save to file B
  • compare the code, ram and uicr files A and B
  • program the original example hex file to the Soc
  • read the code, ram and uicr registers and save to file C
  • compare files A and C

I've noticed that the ram file C never matches ram file A.

I've noticed the UICR files C and A match sometimes but not always.

I was wondering if you can tell me why the ram files don't match when I'm using --chiperase and why the UICR register content would be different when programing the same code to the device?

  • Hi,

    I've noticed that the ram file C never matches ram file A.

    This is expected. Unused RAM will be uninitialized, so even if you program firmware that does exactly the same and runs the code in the exact same way, the RAM content will still not be identical. Also, even with a dead-simple application that does not depend on the outside world, it would be difficult to get the same RAM content, since for instance, you would need to stop and read the RAM content at the exact same point (to get the same stack contact). 

    I've noticed the UICR files C and A match sometimes but not always.

     Using the --chiperase option will do a complete erase, including UICR. Therefore, the flash you read back after programming should be identical on all chips. A possible reason for UICR to be different is if the UICR is being written to by your firmware, which is sometimes done. Is that the case?

Related