K64 ENET TXF vs TXB

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

K64 ENET TXF vs TXB

Jump to solution
1,031 Views
JHinkle
Senior Contributor I

I'm getting a TXB and not a TXF interrupt flag being set at random times.

I can't find any documentation that would explain why.

TXF fires when the message has been sent.

TXB fires when the enhanced buffer has been updated.

So under what circumstances would I expect a buffer update but not a complete transmission?

Thanks for any comments

Joe

Tags (1)
0 Kudos
Reply
1 Solution
905 Views
JHinkle
Senior Contributor I

Answered my own question.

The TXB was from a prior xmit.

I was NOT getting a TXF because the buffer ask to be sent was not on a 8 byte boundary, so the ENET just stalls.

View solution in original post

0 Kudos
Reply
4 Replies
906 Views
JHinkle
Senior Contributor I

Answered my own question.

The TXB was from a prior xmit.

I was NOT getting a TXF because the buffer ask to be sent was not on a 8 byte boundary, so the ENET just stalls.

0 Kudos
Reply
905 Views
mjbcswitzerland
Specialist V

Hi

It is possible to set up an Ethernet (IP) frame to be constructed in multiple Tx buffers (eg. the first sends the Ethernet header, the second IP, the third TCP, the forth the payload). The TXB will be set for each transmitted buffer but the TXF only set when the complete frame (4 buffers) have been sent.
When there is one buffer for each frame these flags should be "about equivalent" and only the TXF needs to be actually used (unmasked).

Regards

Mark

0 Kudos
Reply
905 Views
JHinkle
Senior Contributor I

Thanks for the comment Mark but I'm not using Linked buffers.

Right now I only use TXF to fire a IRQ that releases a semaphore to say the message has been sent.

The system occasionally hangs and I found when it does it's because the TXB is true but not TXF.

The Enhanced Buffer descriptor identifies the data as being "LAST" so I should have gotton the TXF which has lead to my question.

XmitRingDescr[0].Status = ETX_L | ETX_TC | ETX_W;    // set L and TC and wrap bits

Any ideas?

Thanks.

Joe

0 Kudos
Reply
905 Views
mjbcswitzerland
Specialist V

Joe

Maybe you could use the TXB instead of the TXF since they should be about equvalent for your requirement.

I don't have much experience with the TXF on the K64 becauue it is not needed for general Ethernet operation - only to do things like you do (I use it to control link activity LEDs sometimes when the PHY LED is not suitable or it needs to be displayed on diferent outputs but don't remember doing intensive and long period testing of this activity).
I have however set the TXF interrupt im all K60F, K61F and K70F projects since they can miss a waiting TX frame unless a

TDAR = TDAR_TDAR;

retrigger is performed after a frame has been sent (although only experienced when cache aliasing is enabled). With these devices I never experienced a TXF problem though.

Regards

Mark

0 Kudos
Reply