This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC2652R7:如何读取自己的 IEEE ( MAC)地址

Guru**** 2465890 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1176380/cc2652r7-how-to-read-own-ieee-mac-address

器件型号:CC2652R7

我只想从我的程序中读取我自己的 IEEE 地址、请为此提供 API 建议

此致

Jagdish K

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您可以使用以下代码从 CC26xx 器件读取 IEEE-MAC 地址。

    #include"hw_memmap.h"
    #include"hw_fcfg1.h"
    #include"hw_types.h"
    uint64_tmacAddrLsb;
    uint64_tmacAddrMsb;
    uint64_tmacAddress;
    
    macAddrLsb=HWREG(FCFG1_BASE+FCFG1_O_MAC_15_4_0);
    macAddrMsb=HWREG(FCFG1_BASE+FCFG1_O_MAC_15_4_1);
    macAddress=(uint64_t)(macAddrMsb<<32)+macAddrLsb;

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我看到 了 NLME_GetExtAddr、这是该返回本身的 IEEE 64位地址

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    是的、该 API 还返回器件自己的 IEEE 64位地址。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您确认