FEC only works after reset

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FEC only works after reset

646 Views
Jo_Jo
Contributor I

I am using both etheret controllers on an MCF5445.  The first controller works fine, but the second controller won't transmit upon power up.  TDAR is set high, but it just seems to be ignored.  After I reset the chip (without powering it down), and the same code runs again, everything works as expected.  If I power down the chip again, then the second ethernet controller doesn't work again after I power it up.

 

I know this isn't much information, but I feel like I must be configuring the registers properly, or it wouldn't work after resetting it.  As a work around, I just check to see if TDAR is stuck high, and if it is, I reset the chip once.

 

Any ideas?

Labels (1)
0 Kudos
2 Replies

323 Views
TomE
Specialist II

Search for "TDAR", "FEC" and "MCF54455" on this forum. The following post (found searhing for "TDAR") has the opposite problem to you - FEC0 fails but FEC1 is fine:

 

https://community.freescale.com/message/87278#87278

 

They fixed their problem with:

 

After switching the DMA start order to Tx then Rx, the code worked for both FEC0 and FEC1.

 

Now I see that an Ethernet Bus Error (EBERR) is being generated at some point.

 

Read the rest of the above for hints as to what might be wrong with your code.

 

Tom

 

 


0 Kudos

323 Views
Jo_Jo
Contributor I

I figured it out.  I thought I would post the solution in case someone else runs across this. 

 

I was enabling the controllers before I assigned values to ERDSR and ETDSR.  The datasheet says this is the wrong order.  Since neither of these registers gets set by hardware upon a reset, the values presisted after the reboot, which meant that after reboot they were set before I enabled the controller, which is how it should have been before.  The odd thing is that either of the controllers ever worked the first time.

0 Kudos