iMX6 SDK Ethernet driver: MAC transmit problem

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

iMX6 SDK Ethernet driver: MAC transmit problem

Jump to solution
1,232 Views
shefft
Contributor IV

2

2

2

Gonna need some Freescale FAE expertise for this one.  I'm using the Platform SDK and modifying it for a Nitrogen6x board with the Micrel 9021 PHYs.  When I set up a TxBD and then hit the control tx ready bit, the packet never transmits.  TxBD ready bit is never cleared, no event interrupt.

There is no hardware problem because ethernet works just fine in Uboot.  I've gone through and set up my registers for the MAC and PHY to match exactly what Uboot is doing - no luck.  Some kind of IOMUX issue?  I've been through all that though, including getting some help on these forums to do it correctly and using Uboot as a guide as well.  Bringing in some hardware help soon to take a closer look at some signals on the board to see if we can find something wrong.

Labels (2)
0 Kudos
1 Solution
749 Views
shefft
Contributor IV

2

Finally found a solution:

After a couple weeks of seeing the behavior be so different when using the debugger, setting breakpoints, etc, today I stumbled across the solution.

The SDK send function requires a 1 sec delay to be added in order for the transmit to occur.  I don’t understand why this is, but in my experimentation it can’t be shorter than this.  It may need to be between setting the TxBD ready bit and setting TDAR high, that’s where I have it.  It now works consistently.

Why would Uboot work fine without this extra delay? Maybe the steps that Uboot includes for the flushing of the data cache accomplishes the same thing.  Something for Freescale engineers to take a look at.

View solution in original post

0 Kudos
3 Replies
749 Views
shefft
Contributor IV

2

The clock from the PHY looks fine, but the behavior is exactly the same as if the clock was not present.

0 Kudos
750 Views
shefft
Contributor IV

2

Finally found a solution:

After a couple weeks of seeing the behavior be so different when using the debugger, setting breakpoints, etc, today I stumbled across the solution.

The SDK send function requires a 1 sec delay to be added in order for the transmit to occur.  I don’t understand why this is, but in my experimentation it can’t be shorter than this.  It may need to be between setting the TxBD ready bit and setting TDAR high, that’s where I have it.  It now works consistently.

Why would Uboot work fine without this extra delay? Maybe the steps that Uboot includes for the flushing of the data cache accomplishes the same thing.  Something for Freescale engineers to take a look at.

0 Kudos
749 Views
shefft
Contributor IV

2

Very very strange:  it turns out this delay is only needed when running with the ARM DS-5 Eclipse debugger, which is how I loaded the SDK during development.  Using bootelf from Uboot to run the SDK, the transmit works fine.  Thanks ARM!  Or maybe it's yet another Eclipse special, who knows.  Be careful out there.

0 Kudos