UICR — User information configuration registers
用户使用寄存器 0x10001080~0x100010FC
使用nrfjprog写UICR
id0=$(echo ${UUID} | cut -c 1-8)
nrfjprog -f nrf52 --memwr 0x10001080 --val "0x"${id0}
id1=$(echo ${UUID} | cut -c 9-16)
nrfjprog -f nrf52 --memwr 0x10001084 --val "0x"${id1}
id2=$(echo ${UUID} | cut -c 17-24)
nrfjprog -f nrf52 --memwr 0x10001088 --val "0x"${id2}
id3=$(echo ${UUID} | cut -c 25-32)
nrfjprog -f nrf52 --memwr 0x1000108c --val "0x"${id3}
读UICR
#define BEACON_INFO 0x10001080
#define BEACON_INFO_LEN 36
uint8_t read_data[BEACON_INFO_LEN];
memcpy(read_data, (uint8_t *)BEACON_INFO, BEACON_INFO_LEN);