請問有誰知道要如何在程式中讀出cc1310的 MAC 位址,謝謝
YiKai Chen:
#include <inc/hw_fcfg1.h>
uint64_t macAddrLsb = HWREG(FCFG1_BASE + FCFG1_O_MAC_15_4_0);
uint64_t macAddrMsb =HWREG(FCFG1_BASE + FCFG1_O_MAC_15_4_1);
uint64_t macAddress = (uint64_t)(macAddrMsb << 32) + macAddrLsb;
da qin zheng sheng:
在芯片内FCFG寄存器地址,以rom方式固定了。
Felix ZF:
Get the Primary IEEE Address
#define FCFG1_BASE 0x50001000 // FCFG1
#define EXTADDR_OFFSET 0x2F0
#define APIMAC_SADDR_EXT_LEN 8 // IEEE Address Length
memcpy(ApiMac_extAddr, (uint8_t *)(FCFG1_BASE + EXTADDR_OFFSET), (APIMAC_SADDR_EXT_LEN));
TI中文支持网
