> the FEC simply doesn't send out the packet.
I don't believe that. If the FEC wasn't sending then it should be reporting some sort of error code. I'm pretty sure that the FEC sent the packet over the interface to the PHY chip.
If the FEC truly isn't finishing the transmit, the only reason I can think of would be buffer starvation. The memory system couldn't keep up with the data and the FIFOs underran at that point. Since the FIFOs are preloaded before the transmission starts, it is possible that an underrun could happen after 960 bytes. But you should be getting EIR[UN] (Transmit FIFO underrun) if this happens. Check for this.
That chip doesn't support external SDRAM like the ones I'm used to, so I assume you're transmitting from SRAM and not from some memory on the FlexBus.
Check the Priority bits in the RAMBAR to make sure the FEC has priority over the CPU. Make sure you don't have other DMA happening that might be starving the FEC.
> I can check it via wireshark
There are too many things between the FEC and Wireshark, and they have all sorts of different reasons to drop or not forward packets.
The Ethernet controller on the PC you're running Wireshark on won't receive a packet that has an error, so it won't forward it to Wireshark, and so Wireshark won't report anything. It can't "see" broken packets. If you're running Wireshark on a Linux box, then check the Ethernet statistics for received Framing or CRC errors (/sys/class/net/eth0/statistics, or somewhere like that). If you're going through a single switch you might see CRC errors.
The only way you can know what the FEC is doing is to monitor the pins between it and the PHY. I'm guessing it is sending the whole packet.
You've probably got your PC and your device plugged into an Ethernet switch. Switches can drop/abort packets on errors. Ditch it and connect the PC directly to the device (you may need a crossover cable). That might allow you to receive packets. There are reasons why the switch might be refusing to forward your packets.
Here's what I think is going wrong. I've seen this before. I remember a machine that sent packets that could send short packets anywhere, and long packets directly to PCs on the 10BASE-T ethernet, but which wouldn't go through a hub. The problem was that the CRYSTAL on the transmitter was out of spec. I seem to remember the ethernet specifications require that the crystal be within 100ppm - yes, Google confirms my memory:
Crystal oscillator frequencies - Wikipedia, the free encyclopedia
Here's what happens if you get that wrong. If there's no intervening switch/hub, the receiver can handle pretty much any sort of frequency error. If there is an intervening switch/hub then the transmitter has to be accurate (but the receiver doesn't). Assume the transmitter is 1000ppm slow. That means that over a 1000 byte message, the last bit will be 8 bit-times later than the switch expected. It has an internal "elasticity buffer" to handle different incoming and outgoing speeds, but it can only handle so much. Hubs used to only allow 4 or 5 bits. I imagine switches should be able to handle more, but they may adhere to the specs. So short packets get through, but when the packet hits the length that overruns/underruns the switch buffer, the switch drops/corrupts the packet.
So check your crystal, or check the output clock from the CPU with an accurate frequency meter. Check the PLL filtering to make sure it doesn't have too much jitter.
Type "MCF52259 FEC long" into the Search on this page and check the other matching posts. Try again without the CPU qualifier and check the results.
Tom