Hello,
I am trying to implement telnet server on a EK-TM4C1294 evaluation board. Being new to new to Ethernet and TCP/IP programming I have taken many parts of code from the example enet_lwip.
Also, I did try to use relative paths for all header and source files but could not get it working, so I tried a crude method of collecting all .c and .h files in the project directory. I also changed the include paths in the in those source and header files.
Just after the initialization is completed the execution stops in a while loop in the startup file which handles unexpected interrupts. I narrowed down the source of interrupt.
It seems that as soon as the function EMACTxEnable in emac.c is completed the NIS bit and the Transmit Buffer Unavailable bit in the Ethernet MAC DMA Interrupt Status Register(EMACDMARIS) are set to 1.
Same happens with EMACRxEnable function, the Receive Buffer Unavailable and AIS bits are set to 1.
What could be the problem?
Code:
SysCtlMOSCConfigSet(SYSCTL_MOSC_HIGHFREQ);
g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
PinoutSet(true, false);
lwIPInit(g_ui32SysClock, mac_id, HEXADECIMAL_IP_ADDR, HEXADECIMAL_NETMASK, HEXADECIMAL_GATEWAY, IPADDR_USE_STATIC);
UARTprintf("lwip_init..!!\n\n");
It prints only "lwip_init" on the terminal every time.
Thank you.