Part Number:CC1310
在ti 15.4stack中可以用CCFGRead_IEEE_MAC()直接获取 ,这个该怎么操作。
我在 15.4 stack 文档中 并未找到相关信息
likang LI:
在 CC1310: cc1310 sensor program – Sub-1 GHz forum – Sub-1 GHz – TI E2E support forums
Read IEEE MAC address from CC13xxuint32_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
,
Kevin Qiu1:
上面的方法是正确的,CCFGRead_IEEE_MAC()在CC1310上不可用,CC1312上可以
我修正了之前的回复
,
likang LI:
启用 另一个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
,
Kevin Qiu1:
likang LI 说: Errors #20 identifier "ApiMac_extAddr," is undefined
这个错误可以在开头定义
ApiMac_sAddrExt_t ApiMac_extAddr;
,
likang LI:
Thank!
重新把ApiMac_extAddr 函数定义内容 在复制 到 sensor.c
,
Kevin Qiu1:
这样也可以,或者用外部声明也可以
extern ApiMac_sAddrExt_t ApiMac_extAddr;
,
likang LI:
Thank!
,
likang LI:
尝试MAC 读取 , DEBUG 后Expressions 并无 数据