iMX6 SDK Ethernet driver: MAC transmit problem

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

iMX6 SDK Ethernet driver: MAC transmit problem

跳至解决方案
2,145 次查看
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.

标签 (2)
0 项奖励
回复
1 解答
1,662 次查看
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 项奖励
回复
3 回复数
1,662 次查看
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 项奖励
回复
1,663 次查看
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 项奖励
回复
1,662 次查看
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 项奖励
回复