This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM437X: EtherCAT Master real-time fluctuation

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: AM4377

Hello,

       The hardware of my side is ti's arm am4377, the software is ti's SDK 5.2, and the kernel version is preempt RT 4.14.79, as shown in the following figure:

       

      I work as the EtherCAT master station. After the master station is running, the maximum fluctuation of the real-time system monitored by the master station reaches 225138ns, which exceeds 20% of the master station's synchronization period of 1ms, resulting in the master station's warning,as shown in the following figure:

   

     How can the real-time system be so volatile? Is it not well configured? Thank you!

     And the cyclictest results are as follows:

  • Hi,

    One issue that I see is that is causing the inconsistent results is the -m option is missing from the cyclictest command line.

    This link to a forum post discusses why the -m option is necessary to show consistent results with cyclictest as well as necessary for any RT application.

    Best Regards,

    Schuyler 

  • Hi,Schuyler

        Thank you very much for your reply!

         I added the - m option to cyclictest.As shown in the screenshot below.

        

        

    Please help to see if there is any problem. Thank you very much!

  • Hi,Schuyler

          Do you see any problems here?We are looking forward to your reply. Thank you very much!

  • Hi,Schuyler

         Do you see any problems?We are looking forward to your reply. Thank you very much!

  • Hi,

    I was out of the office last week due holidays in the US. One question I have is why are you choosing to run 5 threads on cyclictest? Is this intended to be representative of your application? 

    Best Regards,

    Schuyler

  • Hi,Schuyler

      Thank you very much for your reply!

      It is not intended to be representative of my application,You can give me a command line of cyclictest according to your requirements.

  • Hi,

    TI did not write cyclictest, it is a product of the RT Linux community which would be able to offer some suggestions as to why you are seeing the variance.

    My suggestion would be to perhaps get better determinism is to launch 5 independent cyclictest applications per the test you are trying to run. When running these individual applications trying running them with different priorities such 80 for one app, 81 for the next and so on.  You might also try specifying a different interval for each thread. If all the threads have the same interval there could be the possibility of thread time wake up collisions. For example try -i of 500, for one thread, -i 600 for the next thread and so on. 

    To summarize, if you are trying to have several RT application threads you will need think about how to schedule them so that they are not fighting for resources at the same time. 

    Best Regards,

    Schuyler