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

TMS570LC4357: We have adopted the RMII mode circuit design for the Ethernet interface from the TMS570LC4357 HDK development board. However, we are unable to ping the computer host.

Part Number:TMS570LC4357

We are using the official software version v00.04.00, and the configuration in the HCG is as follows:

1、Pin Muxing

2、Input Pin Muxing

3、Special Pin Muxing

4、EMAC Configuration

5、VIM Channel 64-95

6、VIM RAM

7、GCM

8、PLL

May I ask if there are any errors in the configuration on the HCG?

My modifications in project v00.04.00 are as follows:

1、The modifications to the function EMAC_LwIP_Main are as follows:

void EMAC_LwIP_Main (uint8_t * macAddress)
{unsigned int 	ipAddr;uint8_t 		testChar;struct in_addr 	devIPAddress;

	//iommUnlock();
	//iommMuxEnableMdio();
	//iommMuxEnableMii();
	//iommLock();
//	sciInit();
	
	/* Enable the interrupt generation in CPSR register */
	IntMasterIRQEnable();
	_enable_FIQ();

	sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
	sciDisplayText(sciREGx, txtTitle, sizeof(txtTitle));
	sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
	sciDisplayText(sciREGx, txtTI, sizeof(txtTI));
	sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
#ifdef __little_endian__sciDisplayText(sciREGx, txtLittleEndian, sizeof(txtLittleEndian));sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
#elsesciDisplayText(sciREGx, txtBigEndian, sizeof(txtBigEndian));sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
#endif

	/* Initialze the lwIP library, using DHCP.*/
	sciDisplayText(sciREGx, txtEnetInit, sizeof(txtEnetInit));
//	ipAddr = lwIPInit(0, macAddress, 0, 0, 0, IPADDR_USE_DHCP);
	/* Uncomment the following if you'd like to assign a static IP address. Change address as required, and uncomment the previous statement. */

	uint8 ip_addr[4] = { 192, 168, 2, 44 };
	uint8 netmask[4] = { 255, 255, 255, 0 };
	uint8 gateway[4] = { 192, 168, 2, 254 };
	ipAddr = lwIPInit(0, macAddress,
			*((uint32_t *)ip_addr),
			*((uint32_t *)netmask),
			*((uint32_t *)gateway),
			IPADDR_USE_STATIC);
	sciDisplayText(sciREGx, (uint8_t*)"..DONE", sizeof("..DONE"));
	sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
	
	if (0 == ipAddr) {
		sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
		sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));sciDisplayText(sciREGx, txtErrorInit, sizeof(txtErrorInit));sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
	} else { 
		/* Convert IP Address to string */
		devIPAddress.s_addr = ipAddr;
		txtIPAddrItoA = (uint8_t *)inet_ntoa(devIPAddress);
		LocatorConfig(macAddress, "HDK enet_lwip");
	
		/* Initialize the sample httpd server. */
		sciDisplayText(sciREGx, (uint8_t*)"Starting Web Server", sizeof("Starting Web Server"));
//httpd_init();sciDisplayText(sciREGx, (uint8_t*)"..DONE", sizeof("..DONE"));sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));/* Loop forever.  All the work is done in interrupt handlers. */while(1){sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));sciDisplayText(sciREGx, txtTitle, sizeof(txtTitle));sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));sciDisplayText(sciREGx, txtTI, sizeof(txtTI));sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
#ifdef __little_endian__sciDisplayText(sciREGx, txtLittleEndian, sizeof(txtLittleEndian));sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
#elsesciDisplayText(sciREGx, txtBigEndian, sizeof(txtBigEndian));sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
#endif
			sciDisplayText(sciREGx, txtIPAddrTxt, sizeof(txtIPAddrTxt));sciDisplayText(sciREGx, txtIPAddrItoA, 16);
			sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));
			
			sciDisplayText(sciREGx, txtNote1, sizeof(txtNote1));
			sciDisplayText(sciREGx, txtIPAddrItoA, 16);
			sciDisplayText(sciREGx, txtCRLF, sizeof(txtCRLF));/* Before printing the next set, wait for a character on the terminal */
//sciReceive(sciREGx, 1, &testChar);}
	}
}

2、The modifications to the function sciDisplayText are as follows:

void sciDisplayText(sciBASE_t *sci, uint8_t *text,uint32_t length)
{
//while(length--)
//{
//while ((sci->FLR & 0x4) == 4); /* wait until busy */
//sciSendByte(sci,*text++);/* send out text*/
//};
}

3、The modifications in lwiplib.h are as follows:

#define IPADDR_USE_STATIC1
#define IPADDR_USE_DHCP0
#define IPADDR_USE_AUTOIP0

4、The modifications in lwipopts.h are as follows:

#define LWIP_DHCP                       0

My Ethernet configuration on the computer host side is as follows:

IP:192.168.2.43

NETMASK:255.255.255.0

GATEWAY:192.168.2.254

Despite attempting to ping our custom hardware from the computer host, I am unable to establish a successful connection. I cannot identify the cause of the issue.

Yale Li:

Hi,

Could you please post your issue to E2E English forum directly:

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum

The relevant R&D / Application engineer will support you directly. The issue will be better solved.

Thanks~

赞(0)
未经允许不得转载:TI中文支持网 » TMS570LC4357: We have adopted the RMII mode circuit design for the Ethernet interface from the TMS570LC4357 HDK development board. However, we are unable to ping the computer host.
分享到: 更多 (0)