MCF52259 FEC transmitting two identical frames

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

MCF52259 FEC transmitting two identical frames

Jump to solution
771 Views
jrmymllr
Contributor I

Hi

 

Using M52259EVB and CW 10.1.  Right now I'm doing really simple stuff by transmitting raw Ethernet frames, no IP stack.  A Tx buffer descriptor is set up and contains a pattern in the data field, and I'm just trying to transmit this reliably.   I'm using only one BD, and ETDSR was previously set to the address of the lone Tx BD.  The below code is executed repeatedly, and slowly, by using CW debugger.  The full code that runs at full speed without debugger checks things such as if TX_BD_R is clear before continuing.

 

                NIC_TxBufDescPtr->length = 1500;
                NIC_TxBufDescPtr->status = TX_BD_W | TX_BD_R | TX_BD_L |TX_BD_TC;
                TDAR = TDAR_X_DES_ACTIVE_BITMASK;   

 

When I step over the TDAR line, the board immediately transmits two identical frames in rapid succession.  I have the cable connected to my computer and monitoring with Wireshark.  I do not understand why it is transmitting twice.  Any ideas?

Labels (1)
0 Kudos
Reply
1 Solution
533 Views
scifi
Senior Contributor I

This problem and workarounds are described in the MCU reference manual (21.5.7.1 Duplicate Frame Transmission, MCF52259RM rev. 2).

View solution in original post

0 Kudos
Reply
3 Replies
534 Views
scifi
Senior Contributor I

This problem and workarounds are described in the MCU reference manual (21.5.7.1 Duplicate Frame Transmission, MCF52259RM rev. 2).

0 Kudos
Reply
533 Views
TomE
Specialist II

Having one BD is unusual. it may be prefetching "ahead" and finding the same BD. Try it with at least two BDs.

 

Tom

 

0 Kudos
Reply
533 Views
jrmymllr
Contributor I

You're both correct.  All the searching I did to find the solution to the problem, and it turns out the issue is discussed right in the ref. manual. 

0 Kudos
Reply