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.

AM3359: EoE adaption of ETG stack

Part Number: AM3359

Hello,

some time ago I wanted to use EoE with the NDK which was a success. At this point of the project there was an issue observeable which seems not to be intended.

I'm using SSC Version 5.12. I'm using the ETG stack based on the ICEv2-Board configuration.

It seems, that receiving and sending via EoE is not supported if done in different tasks. The global variable psWriteMbx defind in the ETG file "mailbox.h" is used in both sending and receiving frames. In the sample EoE application sending and receiving is done in the same task, in most applications this is not the case.

It is possible, that the sample crashes, if another task is created which sends data using EOE_SendFrameRequest(). Usally this problem can be solved by using a lesser priority for the sending task (seems to be the solution for the generic ETG task) than for the ETG MAIN task. But in the TI implmentation the funcion "MBX_CheckAndCopyMailbox" allocates a Write Mailbox, calls HW_EscReadByte() which leads to a signal wait. Then the sending task can call EOE_SendFrameRequest->SendFragment()->MBX_MailboxSendReq()->MBX_CopyToSendMailbox(), which is clearing spWriteMbx. After the Main tasks continius using an invlid mailbox pointer.

Is this a known issue, do you know any walkaround or did I use a wrong sending function for EoE - if this is the case, which is the correct one?

Thank you very much.

  • Hi Martin,

    I was not aware of the issue. We don't really have EoE supported in official PRU-ICSS EtherCAT release.

    I believe EOE_SendFrameRequest() is the correct function for sending.

    You might have to dig into the further to see where the mailbox pointer gets corrupted by setting up a hardware watchpoint from CCS.

    Regards,
    Garrett

  • Hi Garrett,

    I received a response of ETG. Sending and Receiving Frames using EoE is not supported using different task.

    Therefore I added a sending mailbox and check it cyclically after the call of "MainLoop()". Now it works for me.