Other Parts Discussed in Thread: OMAPL138
Hello,
I want to read data from ethernet-I send data from my PC (for example ping ipaddress) I and want to read this in my program. I use enet_echo example from OMAPL138_StarterWare_1_10_03_03. My code:
int main(void)
{
unsigned char macArray[6] = MAC_ADDRESS;
unsigned int ipAddr;
/* Set up the UART2 peripheral */
UartSetUp();
/* Set up the pin multiplex for EMAC and MDIO and enable PSC */
EMACPinMuxSetup();
PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_EMAC, PSC_POWERDOMAIN_ALWAYS_ON,
PSC_MDCTL_NEXT_ENABLE);
EMACIntrSetUp();
/* Initialze the lwIP library, using DHCP.*/
#if STATIC_IP_ADDRESS
ipAddr = lwIPInit(0, macArray, STATIC_IP_ADDRESS, 0, 0, IPADDR_USE_STATIC);
#else
ipAddr = lwIPInit(0, macArray, 0, 0, 0, IPADDR_USE_DHCP);
#endif
IpAddrDisplay(ipAddr);
LocatorConfig(macArray, "evmAM1808 enet_lwip");
/* Initialize the sample echo server. */
echo_init();
/* Loop forever. All the work is done in interrupt handlers. */
while(1)
{
; /* Perform nothing */
}
}
/*
** Interrupt Handler for Core 0 Receive interrupt
*/
static void EMACCore0RxIsr(void)
{
//HERE I THINK I SHOULD READ DATA
int p;
p=(EMAC_RXCP(0)); //DOESNT WORK
#ifdef _TMS320C6X
IntEventClear(SYS_INT_EMAC_C0RX);
#else
IntSystemStatusClear(SYS_INT_C0_RX);
#endif
lwIPRxIntHandler(0);
}
Generally I want to send data through ethernet between two lcdk boards omap l138.
I can see EMAC and MDIO registers but nothing changes when I send ping IP from my PC. It should be?
Mark