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

NRF52832 serial number

Hello,  I am working on the BMD-300 Series Evaluation Kit with nrf52832 microcontroller and I tried accessing the serial number of my nrf52832, with these functions:

 m_device_id1 = NRF_FICR->DEVICEID[0];

 m_device_id2 = NRF_FICR->DEVICEID[1];

the probleme is m_device_id1m_device_id2 is different from the serial number printed on the microcontroller.

Are the device_id and serial number not the same thing and if they aren't wich one is a unique number that I can use in my code.

Thank you.

  • The Rigado BMD-350 prints the MAC address on the module, but this can be lost if the chip is erased without first reading the value (although it can be recreated). You might find my notes helpful:

    /**@note
     *
     * Rigado has defined a MAC address stored within NRF_UICR, which matches the address inscribed on
     * the module. The Nordic examples (eg uart on which the pump is based)
     * use the Device Id in NRF_FICR to form a MAC address, which is different and fixed
     *
     * The 6-byte BLE Rigado MAC address is stored in the nRF52832 UICR at NRF_UICR_BASE+0x80 LSB first.
     * address during programming. Modules with factory firmware AA and AB are provided
     * with full memory protection enabled, not allowing the UICR to be read via the SWD interface. If
     * performing a full-erase, the MAC can then only be recovered from the 2D barcode and humanreadable text.
     * Modules with factory firmware code AC and later no longer enable read-back
     * protection from the factory, allowing the MAC address to be read with an SWD programmer.
     *
     * UICR Register (94:54:93:XX:YY:ZZ) see BMD-350 Data Sheet v2.0:
     * NRF_UICR + 0x80 (0x10001080): MAC_Addr [0] (0xZZ)
     * NRF_UICR + 0x81 (0x10001081): MAC_Addr [1] (0xYY)
     * NRF_UICR + 0x82 (0x10001082): MAC_Addr [2] (0xXX)
     * NRF_UICR + 0x83 (0x10001083): MAC_Addr [3] (0x93)
     * NRF_UICR + 0x84 (0x10001084): MAC_Addr [4] (0x54)
     * NRF_UICR + 0x85 (0x10001085): MAC_Addr [5] (0x94)
     *
     * Nordic MAC Address
     * ==================
     * DA:88:19:2D:84:27 from DE5FDA88192D8427
     *
     * Last 2 bits in 48-bit stream - top 2 bits in last byte of Device Address
     * 00 Public
     * 01 Static
     * 10 Resolvable
     * 11 Non-Resolvable
     *
     * Note that even though the address is "Random", it is invariant and never changes
     * for a specific Nordic device as the NRF_FICR->DEVICEADDR registers are Read-Only
     */

Related