在ti 15.4stack中可以用CCFGRead_IEEE_MAC()直接获取 ,这个该怎么操作。
我在 15.4 stack 文档中 并未找到相关信息
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.
在 CC1310: cc1310 sensor program - Sub-1 GHz forum - Sub-1 GHz - TI E2E support forums
Read IEEE MAC address from CC13xx
uint32_t * addrPtr1 = (uint32_t *)(FCFG1_BASE + FCFG1_O_MAC_15_4_0);
uint32_t * addrPtr2 = (uint32_t *)(FCFG1_BASE + FCFG1_O_MAC_15_4_1);
to addrPtr1 and addrPtr2
启用 另一个MAC 读取
#include "api_mac.h"
#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));
Errors #20 identifier "ApiMac_extAddr," is undefined
OR
#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;
Warrning #552-D varible "macAddress" was set but never used
Errors #20 identifier "ApiMac_extAddr," is undefined
这个错误可以在开头定义
ApiMac_sAddrExt_t ApiMac_extAddr;