完善资料让更多小伙伴认识你,还能领取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)); ] |
|
|
|
|
|
只有小组成员才能发言,加入小组>>
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
684 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
600 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1055 浏览 1 评论
741 浏览 0 评论
普中科技F28335开发板每次上电复位后数码管都会显示,如何熄灭它?
525 浏览 1 评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
166浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
128浏览 14评论
在使用3254进行录音的时候出现一个奇怪的现象,右声道有吱吱声,请教一下,是否是什么寄存器设置存在问题?
127浏览 13评论
TLV320芯片内部自带数字滤波功能,请问linein进来的模拟信号是否是先经过ADC的超采样?
123浏览 12评论
GD32F303RCT6配置PA4 ADC引脚,将PA2代替key功能,PA2连接时无法实现预期功能,为什么?
53浏览 10评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 01:29 , Processed in 1.114174 second(s), Total 63, Slave 49 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号