Hi everyone,
I believe that this is very simple but I cannot figure out why the following bitwise operation do not work
Code:
// Get the unique identifier of the device
uint32_t msb;
uint32_t lsb;
lsb = NRF_FICR->DEVICEID[0]; // read the less significant 32bits
msb = NRF_FICR->DEVICEID[1]; // read the most significant 32bits
uint64_t deviceID = (uint64_t)msb << 32 || lsb; // 64 bit unique device identifier
NRF_LOG_INFO("lsb: %x", lsb);
NRF_LOG_INFO("msb: %x", msb);
NRF_LOG_INFO("Device ID: %x", deviceID);
As you can see I can read normally lsb and msb but the deviceID is 1
Any advice?
Nick