Post Go back to editing

EMAC Rx Overflow detected

Category: Hardware
Product Number: ADSP-SC598

My hardware is SC598-som and somcrr-ezkit rev-a. I use PC to ping the hardware board 1000000 times to test the stability. But after about 100000 times, rx overflow comes up. It is found in the peripherals view of cces, the EMAC1 RX_FIFOOVFL_PCNT register. And no new packets could be received. Please tell  me how to solve this problem.

  • Hi,

    We are checking on your requirement and will get back to you shortly.

    Regards,
    Nandini C

  • Hi,

    Please share your comments on below points to assist you effectively.

    1. Could you please provide a description of your application along with a block diagram? If possible, please share the steps o replicate the issue on our end.

    2. Could you provide details on the number of descriptors being used, as well as their size and speed?

    3. Could you please let us know at which point exactly does the overflow occurs?

    4. What is the rate at which this issue occurs? Is it consistent, or does it vary?

    5. As per HRM "Switching to a new descriptor list is different in the receive DMA compared to the transmit DMA. Switching to a new descriptor list is permitted when the receive DMA is in SUSPEND state, as clarified by the following points:

    • Generally, receive DMA prepares the descriptors in advance.
    • If the receive DMA goes to the SUSPEND state due to the descriptors not being available, a major failure occurs (software is not able to free the filled-up descriptors/buffers). If this issue is not rectified immediately, frames are lost because of a receive FIFO overflow. Therefore, the software is allowed to create a new descriptor list and program the receive DMA to start using it immediately, without going into the STOP state."
    Based on this information, is there any indication of descriptor exhaustion, where there are insufficient free descriptors to handle incoming frames, causing the receiver to enter the SUSPEND state? Additionally, how does the system manage the process of descriptor switching? Is a new descriptor list created and programmed promptly to prevent the RX DMA from being stuck in the suspended state?
    6. What is value of EMAC_RX_FIFOOVFL_PCNT register?

    Regards,
    Nandini.C

  • Hi,

    1.The hardware initialization of EMAC1 is almost same as the emacphyinit example in cces, I only change some parameters. The processing of tcp/ip packets is using LwIP 2.2.0 stack, the DMA Rx callback function will give a semaphore and LwIP takes it for post-processing.
    2.4 descriptors are used now. The size of each data buffer is 800 bytes and the speed is 100MBps in duplex mode. The sending rate of ping packets is one packet per millisecond, with a total of one million packets sent.
    3.Sorry, I could not record the exact point of overflow occurring. I found this phenomenon by observing the IO graph in wireshark.
    4.This issue always occurs, but the exact time is not consistent. Sometimes it occurs after around 100000 ping requests, sometimes around 200000 ping requests.
    5.Now, EmacStatCallback with Event&ADI_EMAC_EVENT_RX_UNAVAILABLE is used for judging the SUSPEND state of program. And when SUSPEND state is detected, I use adi_emac_TxDescriptorPoll() and adi_emac_RxDescriptorPoll() to restart transmission rather than submit a new descriptor list. Further, I don’t know the condition to use resubmit a new list. Or I don’t know the difference between polling and resubmitting a new list.
    6.The value of EMAC_RX_FIFOOVFL_PCNT is different of each time. The values range from a few thousand to tens of thousands, which depends on the time when I find the overflow and suspend the program in cces.


    thanks.

  • Hi,

    Our sincere apologies for the delay in our response.

    We have been working to replicate the issue on our end using the configuration you provided, as well as implementing the poll() API to restart transmission when the SUSPEND state is detected. Unfortunately, we were unable to replicate the issue on our end.
    To assist you more effectively, could you please share the example code you're using, as we understand you are also working with the EZ-kit? This would greatly help us identify the root cause and provide you with the most accurate support.

    Regards,
    Nandini C

  • Hi,
    Sorry for the delayed response. I checked with my superiors regarding sharing the code, but company policies make the process highly restrictive. Would there be another way to offer assistance, perhaps through an offline conversation?

  • Hi,

    Thanks for your response.

    We have contacted you via our private support (processor.support@analog.com) in response to this query. Please check your private messages for further assistance.

    To avoid duplication of efforts, we kindly request that you continue the discussion through that channel.

    Regards,
    Nandini C

  • Hi,
    Could you please tell me how I can send the code over? I added the code to the attachment and sent it to processor.support@analog.com, but this email address has been bouncing the message back.

    Regards.
  • Hi,

    Thank you for sharing the code; we have received it. We will check it on our end and provide you with an update via private support soon.

    Regards,
    Nandini.C