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.

CC2652P: 基础收发程序如何获取设备IEEE MAC地址

Part Number: CC2652P
Other Parts Discussed in Thread: UNIFLASH

使用的例程是rfEchoTx,请问如何获取设备MAC地址?

  • 你是指要获取设备本身的MAC地址?

  • 可以使用下列的程序

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    #include "hw_memmap.h"
    #include "hw_fcfg1.h"
    #include "hw_types.h"
    uint64_t macAddrLsb;
    uint64_t macAddrMsb;
    uint64_t macAddress;
    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;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 尝试使用YiKai提供的代码,如果只是想查看MAC地址,还可使用uniflash直接读取