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.

RTOS/AM4377: Different .xml file with EtherCAT sample code

Part Number: AM4377
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

I have succeeded EtherCAT with EEPROM emulation(on QSPI ROM),

but another .xml file is not working on booting.

I've found the problem is at "while(u16PdiCtrl != 0x80);(in HW_Init() of tieschw.c)".

This means "u16PdiCtrl" is 0x80, but another .xml file has 0x08.(even if I use Ti_ESC.xml)

What does mean "u16PdiCtrl" value? And Can't I use another .xml file with EtherCAT sample code?

Thank you.

  • The EtherCAT experts have been notified. They will respond here.
  • Hi Yong-kyoung, from \ecat_appl\EcatStack\tieschw.c file I see u16PdiCtrl is in a do-while loop waiting for ESC to started. Is your new .xml based on TI's one? if so, which modifications you did?. Have you opened your new .xml in XML Notepad in order to check correctness? How did you upload XML file to EEPROM?

    thank you,
    Paula
  • I've uploaded "AM4377/4379 Drive" in 'TI_ESC.xml'.
    That image has 0x05 in first byte, but first byte has 0x80 in sample ethercat code(full-feature, 'tiesc_eeprom.h').
    After upload binary, and reboot, initialization stuck in that do-while loop.
    Upload is done by TwinCAT2, "ESC Access", binary check by "upload".
    So, I want to know about that value in first byte. Because I'm gonna use another .xml file my company used.
    Thank you.
  • Hi Yong-kyoung, The EEPROM binary PDI control (first two byte in EEPROM binary - corresponds to register 0x140 and 0x141 ) needs to match what the stack is expecting if not the code with just loop.

    From an ESI EEPROM configuration document, I see that register 0x140 gets 0x05 if "SPI" is selected, and  "uController async 16 bit" assign 0x140 to 0x08.

    Maybe, a way to resolve the issue would be to convert sysbios_ind_sdk_02.01.03.02\sdk\protocols\ethercat_slave\ecat_appl\esi\TI_ESC.xml  to a binary and then generate 'tiesc_eeprom.h'. Final step, rebuild. Below link with instructions

    Generating ESI Header file From ESI xml

    Another way, could be to Generate EEPROM binary file using Twincat (as you did it before) and find a tool to convert this binary to XML, do your changes and convert it back. A tool like this might exist. However, personally, I am not aware of any. If you find one please let me know.

    Third option, could be to change the stack "HW_Init" function (tieschw.c) to match your ESI EEPROM settings. But you have to be careful your configuration makes sense and it is correct...

    Forth option, change your EEPROM binary header (first 7 words) to match TI's EEPROM binary file.

    I am attaching a couple of snapshots for your reference only, not that you need to match any, but just to have and idea...

    TI Ethercat slave EEPROM binary example:

    ET1100 config ESI EEPROM Header Example

    hope this helps, thank you,

    Paula