littleshrimp 发表于 2017-12-15 01:20
你读的是哪个地址 或者把代码贴出来看下
Unique device serial number
The BlueNRG-2 device has a uni ...
这是代码
void flash_read_mac(void)
{
uint32_t mac_24bits_ieee, mac_24bits_com, i;
uint8_t mac[6];
mac_24bits_ieee = *(volatile int *)(0x100007F4);
mac_24bits_com = *(volatile int *)(0x100007F4 + 4);
for (i = 0; i < 4; i++)
{
mac = (uint8_t)(mac_24bits_ieee >> 8 * i);
}
for (i = 0; i < 2; i++)
{
mac[i+4] = (uint8_t)(mac_24bits_com >> 8 * i);
}
PRINTF("##---[%X] [%X] ----- ", mac_24bits_ieee, mac_24bits_com);
for(i=0; i