完善资料让更多小伙伴认识你,还能领取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)); ] |
|
|
|
|
|
只有小组成员才能发言,加入小组>>
351 浏览 1 评论
546 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
790 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
660 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1140 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
87浏览 29评论
325浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
262浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
211浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
69浏览 13评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-29 04:15 , Processed in 1.018478 second(s), Total 60, Slave 49 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号