Other Parts Discussed in Thread: AM2432
Tool/software:
Hello,
I am working with [enet_layer2_icssg] which I modified for EtherCAT communication experiments.
The Tx Task runs with an interrupt every 500μs, and a frame of about 1300Bytes is sent to the slave periodically each time.
There are no problems with sending and receiving frames, but I found that a delay of about 2s occurs about every 16s.
The measurement was done using the ECAP module from the 500μs interrupt to measure the time when the frame was actually sent from the PHY.
As a result, although it usually takes about 70μs to send, a delay of 90~120μs occurs about 2s every 16s.
For debugging purposes, I stopped using "EnetDma_submitTxPktQ(perCtxt->hTxCh[0], &txSubmitQ);" and set the send task to only create frames and not send them, so naturally there is no delay.
For this reason, I think that if EnetDma_submitTxPktQ is continued to be used, some process such as memory refresh will be performed,
consuming CPU resources and causing high load.
What is the cause of this delay?
SDK mcu_plus_sdk_am243x_11_00_00_15
Board used AM243xEVM / Custom Board (AM2432)
Board has one ICSSG port connected to the slave and the other is disconnected
Code (partially omitted)
// tx EtherFrame EnetQueue_initQ(&txSubmitQ); /* Retrieve TX packets from driver and recycle them */ EnetMp_retrieveFreeTxPkts(perCtxt); /* Dequeue one free TX Eth packet */ txPktInfo = (EnetDma_Pkt *)EnetQueue_deq(&gEnetMp.txFreePktInfoQ); if (txPktInfo != NULL) { /* Fill the TX Eth frame with test content */ txFrame = (EthFrame *)txPktInfo->sgList.list[0].bufPtr; // EtherNet hdr setting pre_fill_ecat_frame(txFrame); // EtherCat data setting fill_ecat_frame(txFrame); txPktInfo->sgList.list[0].segmentFilledLen = 1300; txLen = txPktInfo->sgList.list[0].segmentFilledLen; txPktInfo->sgList.numScatterSegments = 1; txPktInfo->chkSumInfo = 0U; txPktInfo->appPriv = &gEnetMp; EnetDma_checkPktState(&txPktInfo->pktState , ENET_PKTSTATE_MODULE_APP , ENET_PKTSTATE_APP_WITH_FREEQ , ENET_PKTSTATE_APP_WITH_DRIVER); /* Enqueue the packet for later transmission */ EnetQueue_enq(&txSubmitQ, &txPktInfo->node); status = EnetDma_submitTxPktQ(perCtxt->hTxCh[0], &txSubmitQ);