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.

How to accelerate Software Update by FOE

Other Parts Discussed in Thread: SYSBIOS

Hello Everybody,

I actually work with an ARM3359 which is part of an ethercat network whit a KPA Master.

I am workin on the sofware update by FOE.

At the first time, I have made a transfer with mailbox whose size was 128 k : the delay for the complete transfer was 40 sec.

So I tried to increase the mailbox size in order to accelerate the transfer: I have configured a size of 256k. But nothing changes: the delay for the transfer was always of 40 sec...

I asked KPA why... They made wireshark trace and they conclude that  "Slave signals that it is ready to receive new portion of FoE data only after 60 requests (on the average). It looks like a slave's specific behavior. So you could try to accelerate data processing by improving your slave's application ".

Is there anyone to help me on this subject ?

Thanks a lot,

Laurence

  • Hi,

    I will forward this to the ISDK team.
  • Hi.

    Which SDK version are you using?

    I had the same issues with am335x_sysbios_ind_sdk_1.0.0.6 : slow communication over mailbox data (CoE & EoE; FoE shares the same acyclic slot in every ethercat frame)

    So, I discovered that mailbox data is processed inside the "MainLoop" function, called inside a do-while loop, in tiescappl.c.

    This loop has a delay of 1ms when I/O update is not running, and 100ms when running (!):

        if(u8Err == 0)
        {
            bRunApplication = TRUE;
            do
            {
                MainLoop();
                if ( !bEcatOutputUpdateRunning )
                {
        			Task_sleep (1);
                }
                else
                {
        			Task_sleep (100);
                }
            } while (bRunApplication == TRUE);
        }

    So, mailbox communication turns from fast to extremely slow when ethercat master switches from "stop" to "run"!

    I've replaced all these TaskSleep() with a TaskYeld(). This dramatically speeds up mailbox communication.

    Keep in mind that if someone keeps preempting the task which calls MainLoop() function, you will end up with poor performances with FoE.

  • Hello Eugenio

    Thanks for your answer!

    I’m using am335x_sysbios_ind_sdk_1.0.0.8.

    The code that runs MainLoop is not the same:

     

       if(u8Err == 0)

       {

           bRunApplication = TRUE;

           do

           {

               MainLoop();

               #if !defined (EXEC_FROM_IRAM) && !defined (XIP_NOR)  

              

               if(get_app_reload_flag() == 0xAA)

               {

                   if(pre_reload_acts() == 0)

                   {

                       BIOS_exit(100);

                   }

               }

               #endif

               Task_yield();    

           } while (bRunApplication == TRUE);

       }

     

    So I don’t see any great delay that could explain the slow communication transfer by FOE.

    Do you have another idea to explain that ?

     

    Thanks a lot,

     

    LAurence

  • Task_yield() yields to other tasks with the same priority.
    So if you've other tasks in your system running with higher priority, maybe they are keeping your ethercat task from being executed at a reasonable frequency.
    Try UIA instrumentation to analyse the Main_loop() execution timings.