uint32_t deviceID[2];
union
{
    uint32_t  DW;
    uint8_t   B[4];
} device_ID;
//read device ID


deviceID[0] = NRF_FICR->DEVICEID[0];
deviceID[1] = NRF_FICR->DEVICEID[1];

device_ID.DW=deviceID[0];


SEGGER_RTT_printf(0, " deviceID[0] 0x%#08x\n",deviceID[0]);
SEGGER_RTT_printf(0, " deviceID[1] 0x%#08x\n",deviceID[1]);
SEGGER_RTT_printf(0, " device_ID.B[0] 0x%#02x\n",device_ID.B[0]);

 

 0>  deviceID[0] 0x973E21A8
 0>  deviceID[1] 0x00674E53
 0>  device_ID.B[0] 0xA8

 

验证一下

 

posted on 2017-10-11 10:46  陌鉎こ城sHi  阅读(546)  评论(0编辑  收藏  举报