Can't receive Ethernet frames

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Can't receive Ethernet frames

825 次查看
jrmymllr
Contributor I

Hi,

 

I have a M52259EVB board that I'm using to develop firmware for future custom MCF52259 boards. 

 

At this point, I'm just trying to transmit and receive something over Ethernet.  I won't be using a TCP/IP stack anyway, so currently I have things very simple and stripped down. 

 

I have a transmit function that I have set up to be called when I press one of the eval board buttons.  That seems to work.  In the debugger, I can see that many FEC registers change (EIR, RMON_T_PACKETS, RMON_T_BC_PKT, RMON_T_P64, RMON_T_OCTETS, IEEE_T_FRAME_OK, IEEE_T_OCTETS_OK) after I have pressed this button.  I can also see the Activity LED on the eval board blink, and my computer is recieving data.

 

However, when I send data to the board the only indication it is receiving somthing is that the Activity LED blinks.  But no FEC registers change, and the RxBD (buffer descriptor) status does not change.  I used Processor Expert to configure the FEC.  I have promiscuous mode enabled. 

 

Considering it can transmit, shouldn't it be set up to Rx?  What config bits would prevent Rx in this situation?  Sorry for the slightly vague question, but I'll start with this vs. posting a bunch of messy test code.

标签 (1)
0 项奖励
回复
3 回复数

569 次查看
PaoloRenzo
Contributor V

Hi

 

Another quick idea might be to compare all your FEC registers after your configuration/init with another TCP/IP stack like Inteniche or RTCS (MQX) after configuration/init to make sure all your registers look OK. As you know, there are a lot of reigsters! Then check for obvious differences like MAC address or stuff like that. Also check EIMR

 

If this is OK, then you can check buffer descriptors:

 

1. >Try polling during rx. Check EIR. Maybe Interrupt controller is not configured correctly or global mask is not set low enough for your configuration (like 0).

 

2 .>To reduce variables in the equation, try internal loopback, this way you will exercise tx-rx in one action. Also if your PHY supports it, try external loopback.

 

Hope this helps you

 

Regards

0 项奖励
回复

569 次查看
jrmymllr
Contributor I

I actually used both Paolo's and Mark's suggestions.  I compared the registers with a MQX build, and found several differences.  But I zeroed in on RDAR based on the suggestion and based on the datasheet description.  I added a line to my code to set the RDAR bit and now the interrupt bit gets set when it Rx data!  Yay!

0 项奖励
回复

569 次查看
mjbcswitzerland
Specialist V

Hi

 

Check that Rx buffer descriptor polling is enabled: RDAR = 0

 

Then check that the buffer descriptors are configured correctly (simulator to Tx) with the empty bit set in each descriptor (0x8000).

 

Regards

 

Mark

 

0 项奖励
回复