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

How to get nRF51822 serial number and HW ID through SEGGER?

Dear Nordic Developer Zone,

At this time, I am able to program nRF51822 chips using the nrfjprog software : great.

I plan to use nrfjprog software driven by a custom C# software in production line to program bunch of nRF51822 chips.

Of course, I would like keep traces of all programmed chips. So here is my question : How can I retrieve the chip serial number and chip hardware ID like NRF51822_QFAA_C0?

Best regards

Parents
  • Further to this, if I'm looking for a globally unique identifier for an instance of my product, which is the best field to use? Are these others also options?

    ER[0] 0x080 Encryption root, bit 31-0 ER[1] 0x084 Encryption root, bit 63-32 ER[2] 0x088 Encryption root, bit 95-64 ER[3] 0x08C Encryption root, bit 127-96 IR[0] 0x090 Identity root, bit 31-0 IR[1] 0x094 Identity root, bit 63-32 IR[2] 0x098 Identity root, bit 95-64 IR[3] 0x09c Identity root, bit 127-96

    If I use DEVICEID, do I need to concatenate DEVICEID[0] and DEVICEID[1] in order to get something that's guaranteed to be unique?

    I'll be using this in code, not from the Segger, in case that makes any difference.

Reply
  • Further to this, if I'm looking for a globally unique identifier for an instance of my product, which is the best field to use? Are these others also options?

    ER[0] 0x080 Encryption root, bit 31-0 ER[1] 0x084 Encryption root, bit 63-32 ER[2] 0x088 Encryption root, bit 95-64 ER[3] 0x08C Encryption root, bit 127-96 IR[0] 0x090 Identity root, bit 31-0 IR[1] 0x094 Identity root, bit 63-32 IR[2] 0x098 Identity root, bit 95-64 IR[3] 0x09c Identity root, bit 127-96

    If I use DEVICEID, do I need to concatenate DEVICEID[0] and DEVICEID[1] in order to get something that's guaranteed to be unique?

    I'll be using this in code, not from the Segger, in case that makes any difference.

Children
  • This is really an unrelated questions, and would be better off posted separately. In practice, no register is guaranteed to be unique, but the DEVICEID registers are randomly generated in production of the chip. By combining these, you have a 64-bit random number, giving fairly small chances of collisions.

    However, if you need something truly guaranteed being unique, this is something you'll have to manage in your own production, by writing a serial number of some kind to UICR. If you have further questions on this, please post it separately.

Related