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.

TMS320F28388S: did not report error when Ethercat cable disconnection

Part Number: TMS320F28388S

Hi Expert,

My customer are using F28388S for servo application with Ethercat, they faced an issue that did not report error when Ethercat cable disconnection.

Test condition:

one Ethercat PLC master, one servo product based on F28388S, one servo product based on competitor device.

all three product are connected together by cable and work normally with Ethercat, then disconnect the cable between the master and F28388S product by hand, then on competitor device will report error and register 0x440 will changed from 1 to 0, but there is no error reported by F28388S and the register is still 1.

would you help suggest how to fix this issue?

  • Hi Strong,

    How are you checking the 0x440 register on the F2838x device?

    0x440 is for watchdog status documented below. It can remain 1 when the Watchdog process data is disabled.

    I will check if this bit gets set to zero when disconnecting a cable in our SW examples, or if there are other error bits set.

    Best,

    Kevin

  • Hi Kevin,

    When disconnecting a cable, 0x440 should be turn to 0 as what other competitor device do, not all the Master can reproduce this issue at F28388, but some specific Master will do.

  • Hi Strong,

    If it works for some Masters, but not others, maybe the Masters are configuring the ESC differently.

    Have they checked the registers below as well to make sure the PD Watchdog is enabled OK? Do these other PD WD registers differ between the working / non-working cases?

    Best,

    Kevin

    Edit: Please check WD_DIV value as well.

  • Strong,

    Can they verify that the F2838x ESC gets to the Operational State before the physical cable disconnection occurs for the non-working case? Based on the below, I believe it has to get to OP state for the WD timeout event to occur:

    Best,

    Kevin

  • Hi Kevin,

    0x400,0x420,0x442, and 0x0804 register is ok.

    below are the value of these register:

    Register: value

    0x400:  2498

    0x420:  1000

    0x440: always 1 when disconnected the cable

    0x442: 257

  • Hi Strong,

    They look OK, however 0x442: 257 implies that the watchdog did expire once at some point.

    0x0804 register is ok.

    0x804 was missing from your list. Primarily wanting to check that Watchdog Trigger Enable bit is set to 1 however.

    If all of these are correct we still need to confirm that the F2838x slave had previously reached the Operational state. If the Operational state was never reached then I don't believe the Watchdog timeouts will properly occur.

    To check device states see the registers 0x120,0x121 (AL Control) and 0x130,0x131 (AL Status).

    One other set of registers to check related to Physical Link Loss are the Error counters below:

    Please check these and provide data back.

    Best,

    Kevin

  • Hi Strong,

    After performing some tests on my set-up, it looks like the Link Status bits of register below should change when a cable disconnection occurs.

    Register PHY Port y (port number y=0 to 3) Status (0x0518+y)

    Best,

    Kevin

  • Hi Kevin,

    any suggestion for customer what need to configure?

    customer feedback that 0x804 should be no problem, 

    both register 0x120 and 0x130 value is 8.

  • customer think 0x0518 should not be used to report the error.

  • Hi Strong,

    both register 0x120 and 0x130 value is 8.

    OK, so operational state is reached.

    Based on the information, I'm not certain yet why the register 0x440 is staying equal to 1 after cable disconnect. A Watchdog timeout must have occurred since 0x442 = 0x0101. Maybe register 0x440 is being cleared for some reason.

    not all the Master can reproduce this issue at F28388, but some specific Master will do.

    That fact that this behavior is only being seen for some masters is important. There must be some difference in initialization / configuration for the device to behave differently.

    Best,

    Kevin

  • Kevin,

    If use other competitor slave controller, there is no this issue.

    what do you mean for the difference? is it the Master issue? 

    There must be some difference in initialization / configuration for the device to behave differently.

  • Strong,

    Kevin is OOO for the next few days, I'm going to ask some other to take a look and reply back, but likely best case it will be Monday/Tues before they are able to reply.  Appreciate your understanding here.

    Best,

    Matthew

  • Hi Strong,

    If use other competitor slave controller, there is no this issue.

    what do you mean for the difference? is it the Master issue? 

    The combination of the specific master and F2838x slave / ESC slave stack is causing the issue. The F2838x ESC registers can be changed by the EtherCAT master, therefore the specific problematic masters may be putting the F2838x ESC into a state where 0x440 isn't changing to 0 while other masters are not causing this same state.

    Tracing back the ESC register access and EtherCAT traffic differences in the working vs. non-working master cases seems like the right step to take.

    Best,

    Kevin

  • Kevin,

    customer feedback that there are too many ESC registers and may not be able to check all these registers for the difference between different master and slave, would you suggest any specific ESC registers that need to be checked?

  • Hi Strong,

    Suggestions for registers to check were provided in offline email. Also suggestion to use wireshark to analyze frames and trace register access of the master. Details for using Wireshark provided by ETG below:

    https://www.ethercat.org/memberarea/en/knowledge_base_E3DFFB9A73A146DC8C10F7B8896D72F7.htm

    One question about SSC usage, is ESC_SM_WD_SUPPORTED set to 0 or 1 in 'ecat_def.h' file? This will somewhat alter how the PD watchdog is implemented in software.

    Best,

    Kevin