完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
Dear Sir,
您好,请问TM4C129X 系类的MCU,内部以太网控制器: (1)每个芯片有自己的MAC出厂MAC地址么? (2)MAC地址可以随意修改么?比如说,将我们自己的常用设备的MAC地址写进去,可以么? (3)如何修改MAC地址? 请帮忙回答上述问题,非常感谢支持! Leo |
|
相关推荐
2 个讨论
|
|
|
出厂会有默认地址
MAC当然可以随意修改 3、修改MAC //***************************************************************************** // //! Sets the MAC address of the Ethernet controller. //! //! param ui32Base is the base address of the Ethernet controller. //! param ui32Index is the zero-based index of the MAC address to set. //! param pui8MACAddr is the pointer to the array of MAC-48 address octets. //! //! This function programs the IEEE-defined MAC-48 address specified in //! e pui8MACAddr into the Ethernet controller. This address is used by the //! Ethernet controller for hardware-level filtering of incoming Ethernet //! packets (when promiscuous mode is not enabled). Index 0 is used to hold //! the local node's MAC address which is inserted into all transmitted //! packets. //! //! The controller may support several Ethernet MAC address slots, each of which //! may be programmed independently and used to filter incoming packets. The //! number of MAC addresses that the hardware supports may be queried using a //! call to EMACNumAddrGet(). The value of the e ui32Index parameter must //! lie in the range from 0 to (number of MAC addresses - 1) inclusive. //! //! The MAC-48 address is defined as 6 octets, illustrated by the following //! example address. The numbers are shown in hexadecimal format. //! //! AC-DE-48-00-00-80 //! //! In this representation, the first three octets (AC-DE-48) are the //! Organizationally Unique Identifier (OUI). This is a number assigned by //! the IEEE to an organization that requests a block of MAC addresses. The //! last three octets (00-00-80) are a 24-bit number managed by the OUI owner //! to uniquely identify a piece of hardware within that organization that is //! to be connected to the Ethernet. //! //! In this representation, the octets are transmitted from left to right, //! with the ``AC'' octet being transmitted first and the ``80'' octet being //! transmitted last. Within an octet, the bits are transmitted LSB to MSB. //! For this address, the first bit to be transmitted would be ``0'', the LSB //! of ``AC'', and the last bit to be transmitted would be ``1'', the MSB of //! ``80''. //! //! The address passed to this function in the e pui8MACAddr array is //! ordered with the first byte to be transmitted in the first array entry. //! For example, the address given above could be represented using the //! following array: //! //! uint8_t g_pui8MACAddr[] = [ 0xAC, 0xDE, 0x48, 0x00, 0x00, 0x80 ]; //! //! If the MAC address set by this function is currently enabled, it remains //! enabled following this call. Similarly, any filter configured for //! the MAC address remains unaffected by a change in the address. //! //! return None. // //***************************************************************************** void EMACAddrSet(uint32_t ui32Base, uint32_t ui32Index, const uint8_t *pui8MACAddr) [ // // Parameter sanity check. // ASSERT(ui32Index < NUM_MAC_ADDR); ASSERT(pui8MACAddr); // // Set the high 2 bytes of the MAC address. Note that we must set the // registers in this order since the address is latched internally // on the write to EMAC_O_ADDRL. // HWREG(ui32Base + EMAC_O_ADDRH(ui32Index)) = ((HWREG(ui32Base + EMAC_O_ADDRH(ui32Index)) & 0xFFFF0000) | pui8MACAddr[4] | (pui8MACAddr[5] << 8)); // // Set the first 4 bytes of the MAC address // HWREG(ui32Base + EMAC_O_ADDRL(ui32Index)) = (pui8MACAddr[0] | (pui8MACAddr[1] << 8) | (pui8MACAddr[2] << 16) | (pui8MACAddr[3] << 24)); ] |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
600 浏览 0 评论
1653 浏览 0 评论
2095 浏览 0 评论
为啥BQ7693003DBTR芯片在和BQ769X0盒子通讯时收不到信号?
1542 浏览 0 评论
DSP 28027F 开发板 XDS100v2调试探针诊断日志显示了 Error -150 (SC_ERR_FTDI_FAIL)如何解决
1385 浏览 0 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
1794浏览 29评论
2820浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
1748浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
1666浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
1681浏览 13评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-14 17:11 , Processed in 0.902655 second(s), Total 57, Slave 45 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2829