TI中文支持网
TI专业的中文技术问题搜集分享网站

TM4C1294读不到有效地MAC地址

        TM4C1294 MAC地址是不是每颗芯片都有内置的MAC地址,为什么我找了很多TM4C1294芯片的MAC地址都是0xFFFFFFFF,芯片都是新的,我使用的是官方例程的代码,一直读不到正确的MAC地址,是不是芯片根本没有预置MAC地址。

//
// Configure the hardware MAC address for Ethernet Controller filtering of
// incoming packets. The MAC address will be stored in the non-volatile
// USER0 and USER1 registers.
//
MAP_FlashUserGet(&ui32User0, &ui32User1);

//
// Convert the 24/24 split MAC address from NV ram into a 32/16 split MAC
// address needed to program the hardware registers, then program the MAC
// address into the Ethernet Controller registers.
//
pui8MACArray[0] = ((ui32User0 >> 0) & 0xff);
pui8MACArray[1] = ((ui32User0 >> 8) & 0xff);
pui8MACArray[2] = ((ui32User0 >> 16) & 0xff);
pui8MACArray[3] = ((ui32User1 >> 0) & 0xff);
pui8MACArray[4] = ((ui32User1 >> 8) & 0xff);
pui8MACArray[5] = ((ui32User1 >> 16) & 0xff);

xyz549040622:

我读到的也是都是0xff,但是可以自己写个进去,重新读出来就对了。

hongchen:

回复 xyz549040622:

但是生产的时候自己写进去就不太现实,太繁琐了。难道TI没有事先申请MAC地址。

赞(0)
未经允许不得转载:TI中文支持网 » TM4C1294读不到有效地MAC地址
分享到: 更多 (0)