Hello,
I had some performance problems while receiving data using a TCP socket (< 100kB/s). Some TCP error counters started rising during transmission (e.g. tcps.RcvBadSum, tcps.OOPack).
After some debugging I found out that the nimu driver doesn't care about the DSP's prefetch buffer. This sometimes results in invalid RX packet data.
There are two solutions:
1.: Use a 128 Byte gap in front of each packet buffer:
int32_t Setup_Rx (NETIF_DEVICE* ptr_net_device)
{
...
pktLen = ptr_net_device->mtu + ETHHDR_SIZE + 4; /* ETh Header + 4 bytes of FCS */
pktLen += 128; // => 128 Byte gap in order to prevent prefetch buffer problems
...
Cppi_setData (Cppi_DescType_HOST, pCppiDesc, (uint8_t *)Convert_CoreLocal2GlobalAddr((uint32_t)pDataBuffer+128), pktLen);
2.: Invalidate the prefetch buffer before reading the packet:
EmacRxPktISR()
{
....
if((uint32_t)(pHostDesc->buffPtr) & EMAC_EXTMEM )
{
CSL_XMC_invalidatePrefetchBuffer();
CACHE_invL2((void *) pHostDesc->buffPtr, pHostDesc->buffLen, CACHE_WAIT);
}
Maybe someone can use this information to update the nimu driver.
Ralf