Maximum Ethernet Speed with XMCLib and XMC4800 on Relax Kit v1 on 100 Mbit/s not good

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi,

I am evaluating the maximum speed which could be achieved by the XMC4800 on the Relax Kit v1.

I am using a self implemented bare bone UDP packet builder and the function XMC_ETH_MAC_SendFrame() from XMCLib.

Latest DAVE 4.1.x with latest XMCLibs. uC set on 144 Mhz and ETH-PHY and ETH configured and setup as in the demo "XMC4700/XMC4800 Web Server Demo including MicroSD card access".

Forcing to 10 Mbit/s on each side I get a little bit over 1 MebiByte/s as transfer rate with a 1024 byte UDP payload. This is saturated.

Measured via PC on Windows with Wireshark with an Intel Pro 1 GBit/s NIC.

Using auto negotiaton I get 100 Mbit/s on each side as expected.

Now I get 6,72 MebiByte/s as transfer rate with a 1024 byte UDP payload. Transfer lasts ~1,5 s for 10 MebiByte.
This is not even close to saturation which should be around 11 MebiByte/s.


This is the main loop on sending.


for (uint16_t i = 0; i < packetCount; i++) {
while (ETH_SendFrame((uint8_t*) &udpIp4Packet, frameLen))
;
}


packetCount is 10 * 1024 and frameLen is 1066 (1024 UDP payload + 42 bytes header).

ETH_SendFrame() returns with 1 after 4 TX frames, which is expected, since the TX buffer size is 4. It gets 0 as soon as new data could be put into the buffers.
Raising the buffer size does not speed up. Also using the optimizer does not help. But as one could see by the return of 1 of ETH_SendFrame() there is no prozessor bottleneck.

Is this what i should expect? Only 60% maximum speed on 100 MBit/s?

Thanks for help.
0 Likes
4 Replies
Not applicable
Any feedback?

I disabled all offloading (crc generation) to see if it the cause. But the speed stays the same.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Thanks for your feedback.
I was able to reproduce your measurements. I got initially with the original code, 59Mbit/s.

I have managed to increase the transmit performance to 88Mbit/s by changing the BUS_MODE settings in the XMC_ETH_MAC_Init function as follow:

eth_mac->regs->BUS_MODE = ETH_BUS_MODE_ATDS_Msk | /* Increase enhanced descriptor to 8 WORDS, required when the Advanced Time-Stamp feature or Full IPC Offload Engine is enabled */
ETH_BUS_MODE_AAL_Msk | /* the AHB interface generates all bursts aligned to the start address LS bits */
ETH_BUS_MODE_FB_Msk | /* DMA attempts to execute fixed-length Burst transfers on the AHB Master interface */
(0x10 << ETH_BUS_MODE_PBL_Pos); /* maximum Burst length */

Please give it a try and let us know if you have any feedback.

Best regards,
Jesus
0 Likes
Not applicable
Now I get 9,41 MebiByte/s netto with 1024 bytes UDP payload per packet.

NICE! Thanks!

Any negative side effects on this?
0 Likes
Not applicable
This is a reserved bit, isn't it?
0 Likes