求助 BlueNRG-2的Unique device serial number读出来全是FF

dallas48 2017-12-21 04:56:17
请教下:

如题 BlueNRG-2的Unique device serial number读出来全是FF

(NRG-1读出来正常)

这里的唯一码是自己写进去的么?

Unique device serial number
The BlueNRG-2 device has a unique six-byte serial number stored at address
0x100007F4: it is stored as two words (8 bytes) at addresses 0x100007F4 and
0x100007F8 with unique serial number padded with 0xAA55.

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<6; i++)
PRINTF("%02X ", mac);
PRINTF("\r\n");
}

NRG-2


NRG-1


...全文
4533 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
天亮后说晚安 2018-01-11
  • 打赏
  • 举报
回复
地址变了吗???????????
6 , chunks.zip<br>This will open a file and read it in "Chunks" of a selected file.<END><br>7 , logging.zip<br>This is a bas that will log installation procedures so the file can be removed later.<END><br>8 , savetree.zip<br>This will save the info in a Tree View. "This technique allows a program to save hierarchical information like the data in a TreeView in a way that is easy to understand."<END><br>11 , OLE.zip<br>Demonstrates the use of OLE.<END><br>12 , gradtxt2.zip<br>"A program for drawing horizontal, rectangular or spherical gradient texts."<END><br>13 , sweepgl.zip<br>This example greatly demonstrates how to use OpenGL in Visual Basic.<END><br>15 , drawdemo.zip<br>This is an excellent example of how to make a paint program with a few extras.<END><br>16 , cube.zip<br>This example demonstrates how to rotate a cube in visual basic.<END><br>17 , sprite1.zip<br>This is an Excellent example on how to use sprites in your program.<END><br>18 , charcreate.zip<br>This is an example of how to assign "characters" to differant pictureboxes. This would be a good starting point for VB game developers.<END><br>19 , breakthrough.zip<br>This demonstrates a simple game in Visual Basic. An excellent example.<END><br>26 , openlib.zip<br>These are the type libs that go with OpenGL. This is used to make 3D text.<END><br>27 , basMath.zip<br>This module contains functions for various math equations. <END><br>28 , calc.zip<br>This is a basic calculator written in Visual Basic.<END><br>29 , stopwatch.zip<br>This shows how to count off time in a Stop Watch format.<END><br>31 , taskhide.zip<br>This will hide your application from the taskbar, Alt+Tab, and Alt+Ctrl+Del.<END><br>32 , newbie.zip<br>This is a nicely done help file for programmers that are new to Visual Basic.<END><br>33 , vbfaq.zip<br>This is AOL's PC Dev Visual Basic FAQ. This is an excellent starting point for begginners.<END><br>34 , Bas.zip<br>it is very good modual for activex<END><br>35, paraviasource.zip<br>This is

3,846

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 无线
社区管理员
  • 无线
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧