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.

LP-AM243: EtherCAT MAC address used in communication messages between slave computers

Part Number: LP-AM243

Hi TI,

     I would like to ask how the MAC addresses in the Ethernet frame headers change between EtherCAT slaves. I have an image that can help complete my question.

  • Hi,

    The MAC Address configuration is done from the EtherCAT master. The EtherCAT slave device just sets the Second Bit of the first byte of the Source MAC to acknowledge the updation.

    Regards,

    Aaron 

  • Hi Aaron,

        Thank you for your response. However, I still have a question. When the host sends a packet, the source MAC address is "00:00:00:......" and the destination MAC address is "01:01:05:01:00:00". According to your explanation, after the slave processes it correctly, it will write an acknowledgment bit, and at this point, the source MAC address should become "02:00:00:00:....." while the destination MAC address remains the same. However, after processing the data, the source MAC address in the return frame is "01:01:05:01:00:00" and the destination MAC address is "02:00:00:00:.....". This is exactly the opposite of what I understand. I believe the source MAC address of the return frame should be "02:00:00:00:....." and the destination MAC address should be "01:01:05:01:00:00".

    Regards,

    Qiang

  • Hi,

    So the EtherCAT master (say with MAC address of 01:01:01:01:01:01) sends out a broadcast frame (Destination - FF:FF:FF:FF:FF:FF) to the devices connected to the network. Once the frame is processed within the SubDevice, the Destination MAC address will be (FF:FF:FF:FF:FF:FF) and Source MAC address will be (03:01:01:01:01:01).

    I hope this clarifies your query.

    Regards,

    Aaron

  • Hi Aaron,

        Yes, I agree with your point of view, but I am using the LP-AM243 with the EtherCAT slave demo from the SDK, and the captured packet shows the source MAC address as '01:01:05:01:00:00' and the destination MAC address as '02:00:00:00:.....'. This is exactly the opposite of what we expected, and I am very confused.

    Regards,

    Qiang

  • Hi Qiang,

    This seems to be a configuration mismatch from the EtherCAT Master. Can you let us know which EtherCAT master is being used for your validation ? 

    Only the source MAC address is modified when using the default settings in the slave device, such that outgoing and incoming frames can be distinguished by the master.

    Regards,

    Aaron

  • Hi Aaron,

    I followed the steps for 'Connect to PLC TwinCAT3' and attempted to control the LED. This process did not involve setting the MAC address. The EtherCAT Master is my own computer.

    Regards,

    Qiang

  • Thanks for the information Qiang. Can you also mention the SDK version and the example you are using? I will check this internally and get back to you.

    Regards,

    Aaron

  • Hi Aaron,

    I am using “ind_comms_sdk_am243x_09_01_00_03”.

    Regards,

    Qiang

  • Thanks for the input Qiang. I'll analyze this and get back to you.

    Regards,

    Aaron

  • Hi Qiang,

    The MAC address is completely dependent on the EtherCAT master. Based on the topology, the master will invoke the addressing of the SubDevices in the EtherCAT network. The application does not provide MAC address to the master. From the EtherCAT SubDevice's point of view, it just updates the second bit of the first byte of the Source MAC to acknowledge the updation.

    Regards,

    Aaron

  • Hi Aaron,

    Thank you very much for your assistance. You mentioned that MAC is determined by the Master. Do you think the Source MAC Address (SMAC) and Destination MAC Address (DMAC) captured during transmission and reception comply with the EtherCAT protocol? I couldn't find any details regarding SMAC and DMAC in the protocol.

    Regards,

    Qiang

  • Hi Qiang,

    Do you think the Source MAC Address (SMAC) and Destination MAC Address (DMAC) captured during transmission and reception comply with the EtherCAT protocol?
    •  There is no need to administer MAC-addresses or IP-addresses in EtherCAT. EtherCAT slaves are addressed by position addressing, station alias or using Device ID. You can refer to the EtherCAT documentation for more details regarding the addressing of the SebDevices in the network.

    Regards,

    Aaron