ethernet data sending not working in Xilinx ML 402 board

Status
Not open for further replies.

satya_kola

Newbie level 4
Joined
Aug 19, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Hyderabad, India
Visit site
Activity points
1,362
Hi
i am using Xilinx ML 402 board having vertex 4 fpga.

Hard ware config.
UART,E MAC Lite , DDR RAM.

i written a simple code to send a frame and obsureving in Wire shark software. but no packets are coming.

My code is

#include "xemaclite.h"
#include "xemaclite_i.h"
#include "xemaclite_l.h"
#include "xbasic_types.h"

#include "xparameters.h"
#include "xuartlite.h"

int main()
{
print("stated main\n\b");

u8 b[]={0x00,0x13,0xd4,0x22,0x43,0x50};

u8 buf[]={0x00,0x13,0xd4,0x93,0x40,0x58,0x00,0x13,0xd4,0x22,0x43,0x50,0x80,0x00,0x31,0x32,0x34};

int status;

XEmacLite_Config *MacCfgPtr;
XEmacLite emacInst;


MacCfgPtr = XEmacLite_LookupConfig(XPAR_ETHERNET_MAC_DEVICE_ID);

XEmacLite_CfgInitialize(&emacInst,MacCfgPtr,XPAR_ETHERNET_MAC_BASEADDR);

XEmacLite_SetMacAddress(&emacInst,(u8 *)b);

status=XEmacLite_Initialize(&emacInst,XPAR_ETHERNET_MAC_DEVICE_ID);
if(status==XST_SUCCESS)
print("driver initialized\n\b");
if(status==XST_DEVICE_NOT_FOUND)
print("XST_DEVICE_NOT_FOUND\n\b");
if(status==XST_FAILURE)
print("XST_FAILURE\n\b");



status= XEmacLite_Send(&emacInst, (u8 *)buf,15 );
if(status=XST_SUCCESS)
{
print("data sended\n\b");
}
else
print("error\n\b");



XEmacLite_SendFrame(XPAR_ETHERNET_MAC_BASEADDR,(u8 *)buf,15);
status= XEmacLite_Send(&emacInst, (u8 *)buf,15 );
if(status=XST_SUCCESS)
{
print("data sended\n\b");
}
else
print("error sending frame\n\b");

return 0;
}


i am observing in wire shark for any transmission with my board mac address but no transmission is happening.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…