Hello,
I'm using the enet_ewip sample code as reference. With this project, I managed to get the TI's HTML page.
So my hardware is OK. Also tried it with static IP.
My code is:
static err_t (tcp_acceptHandler (void *arg, struct tcp_pcb *pcb, err_t err)
{
return ERR_OK;
}
void lwIPHostTimerHandler (void)
{
}
void SysTickIntHandler (void)
{
lwIPTimer (SYSTICKMS);
}
int main (void)
{
ip_addr_t ipaddr;
ui32SysClock = SysCtlClockFreqSet (SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480,
120000000); //ui32SysClock
ROM_SysTickPeriodSet (ui32SysClock / SYSTICKMHZ);
ROM_SysTickEnable ();
ROM_SysTickIntEnable ();
ROM_IntPrioritySet (INT_EMAC0, ETHERENT_INT_PRIOEITY);
ROM_IntPrioritySet (INT_EMAC0, ETHERENT_INT_PRIOEITY);
ipaddr.addr = 0xC0A80103; //192.168.1.3
ROM_FlashUserGet (&ui32User0, &ui32User1);
lwIPInit (ui32SysClock, pui8MACArray, ipaddr.addr, 0xFFFF0000,
0xFFFF0000,IPADDR_USE_STATIC);
pTcp = tcp_new ();
tcp_bind (pTcp, IP_ADDR_ANY, 6100);
tcp_listen (pTcp);
tcp_accept (pTcp, tcp_acceptHandler);
while (1);
}
Upon running, SysTickIntHandler and lwIPHostTimerHandler are called constantly.
When I tried to connect from a windows application, tcp_acceptHandler is not called.
Can you help ?
The enet_lwip sample contains also the lines:
LocatorInit ();
LocatorMACAddrSet (pui8MACArray);
What is the role of those lines ?
Thanks,
Zvika