UUID32 ideas for NRF52840?

I'm writing firmware for a NRF52840 that must have a 32bit UUID to maintain backward compatibility with an existing product specification. The NRF52840 has a 64bit UUID that is broken into two 32bit registers: NRF_FICR->DEVICEADDR[0] and NRF_FICR->DEVICEADDR[1]. 

What would be the best way to accomplish my goals? I would ideally like to use one of the 32bit addresses but I'm not sure how they are generated. Is this possible, or should I attempt some sort of method that derives a uuid32 from the uuid64? An example might be a 32-bit CRC of the 64 bits. It's worth noting that this product will be produced at low volumes compared to U32_MAX.

Thanks!

Parents Reply Children
  • I have a project that needs a 32bit unique id (or unique-ish since the quantity of devices is low).  Can this be accomplished directly or indirectly with the NRF_FICR->DEVICEADDR[ ]

  • I see. In that case you can use DEVICEADDR or DEVICEID from FICR. There are two of these, and in total these give you 128 bits that are randomly generated in production. If you don't want to use the same as is used for static BLE address, it makes sense to pick the DEVICEID (this is not used by the SDK in any way, so it is only ment for custome ruse in any way thay you see fit). As you just need 32 bit, you can pic just NRF_FICR->DEVICEID[0] or NRF_FICR->DEVICEID[1], it does not matter which you choose.

    Note that as these are randomly generated there is no guarantee that the number will be unique, but if you are producing a low number of devices, the likelyhood of collisions can be small.

Related