Hello,
I need to read the unique serial number from a nordic NRF 52832 device. This number is necessary for our production testing.
I have the latest SDK.
Thanks!
Hello,
I need to read the unique serial number from a nordic NRF 52832 device. This number is necessary for our production testing.
I have the latest SDK.
Thanks!
Someone asked a related question which I answered previously:
https://devzone.nordicsemi.com/f/nordic-q-a/42671/how-to-find-out-nrf52-chip-revision
The FICR register region also contains DEVICEID and DEVICEADDR registers. These indicate the unique per-chip device identification (which I think is as close to a serial number as you can get) and the per-chip BLE station address. You can also determine the part (52832 vs 52840), variant, package code, and the amount of RAM and flash present. Refer to the FICR section in the nRF52832 reference manual (product specification). As my example shows, you should be able to write some simple code to read the values of these registers.
-Bill
Someone asked a related question which I answered previously:
https://devzone.nordicsemi.com/f/nordic-q-a/42671/how-to-find-out-nrf52-chip-revision
The FICR register region also contains DEVICEID and DEVICEADDR registers. These indicate the unique per-chip device identification (which I think is as close to a serial number as you can get) and the per-chip BLE station address. You can also determine the part (52832 vs 52840), variant, package code, and the amount of RAM and flash present. Refer to the FICR section in the nRF52832 reference manual (product specification). As my example shows, you should be able to write some simple code to read the values of these registers.
-Bill
Note that the DeviceID is guaranteed unique, but the DEVICEADDR is "random" - so may not be unique.
CORRECTION: Despite what the documentation says, The DeviceID is not guaranteed unique - it is also random!
Which leads to: https://devzone.nordicsemi.com/f/nordic-q-a/2112/how-to-get-6-byte-mac-address-at-nrf51822/9000#9000
"The BLE address we provide is a random static address, which means that it is random generated .... The high order of randomness (46 bits are random) in this type of address does not provide 100 % security wrt. two devices having the same address, but the probability is quite low."
(my emphasis)
you should be able to write some simple code to read the values of these registers
Indeed; eg,
NRF_LOG_INFO("SAADC Low Power Example; built on " __DATE__ " at " __TIME__ " for " BOARD_STR ); NRF_LOG_INFO("DevAddr %08X %08X", NRF_FICR->DEVICEADDR[1], NRF_FICR->DEVICEADDR[0] );
I always do that in development so that, when looking back through old recorded logs, I can tell what software was used, and what it was running on.
Thank you for this information. That is what I needed!
Is there way to do similar approach in nrf Connect SDK 2.8.0?
The name of the registers, which comes from the MDK, is equal in the nRF5 SDK and in NCS. So apart from that you can't use "NRF_LOG_INFO()", the approach is the same.
Try something like:
LOG_INF("DevAddr %08x %08x", NRF_FICR->DEVICEADDR[1], NRF_FICR->DEVICEADDR[0]);
or
printk("DevAddr %08x %08x\r\n", NRF_FICR->DEVICEADDR[1], NRF_FICR->DEVICEADDR[0]);
Best regards,
Edvin