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/AM3359: EtherCAT issue

Part Number: AM3359


Tool/software: TI-RTOS

Hello Everyone and Happy New Year !!!

This post concerns an identical problem that I have mentioned in a previous post (AM3359: EtherCAT issue in ISDK) but with the new installed Texas architecture.

I have updated the new release:

  • pdk_am335x_1_0_7
  • PRU-ICSS-EtherCAT_Slave_01.00.04.02 patched with the new release from Beckoff 5.12

My application is running on a board with 8 cards.

Each card is equiped with an ARM3359.

All these cards are part of an Ethercat Network which is driven by a master Ethercat.

On each processor, a same software is running. This software was built from the "ethercat slave "project model.

In this project, the EcatStack code use 2 tables to initialize the PRU: HostProc[] and FrameProc[].

 

These tables are given in the installed directory: C:\ti\PRU-ICSS-EtherCAT_Slave_01.00.04.02\protocols\ethercat_slave\firmware\v1.0.

This is my problem : When I start my board, my Ethercat networt starts, I scan the bus and no slave are seen !!!!

So I tried to make this test: I plug only the first slave, I scan the bus, the salve is well seen, then I connect the 2nd slave, I scan the bus, the 2 slaves are seen, I connect the 2rd slave, I scan the bus, The 3 slaves are seen....

In fact, with all my tests, it seems that there is a problem in the initialization of the second port of my slave !

 

During all my debug tests, I tried to initialize the PRU with a previous version of HostProc[] and FrameProc[].

These tables are given in the installed directory: C:\ti\sysbios_ind_sdk_02.01.03.02\sdk\protocols\ethercat_slave\firmware\v1.0

And, now, everything is ok !!!!

My 8 slaves are seen at reset and everythin is working.

 

So it seems that the PRU initialization is different between the 2 versions of the tables: can you tell me what it is and what can I do to have a recent version that works correctly ?

I join you the 2 versions of tables initialization !

Thanks a lot for you help

Laurence

ecat_frame_handler_bin_new.h

ecat_frame_handler_bin_old.h

ecat_host_interface_bin_new.h

ecat_host_interface_bin_old.h

  • The RTOS team have been notified. They will respond here.
  • Hi Lawrence,

    Both •PRU-ICSS-EtherCAT_Slave_01.00.04.02 and the latest code (PRU-ICSS-ETHERCAT-SLAVE 01_00_05_00 released December 2017 - recommended) use the Beckhoff EtherCAT Slave Stack Code (SSC) Version 5.11 and not 5.12.

    Do you see the error with SSC_5.11?
    If so, does the error occur only with the 8 slave configuration?
    The latest release has a number of firmware improvements which recommend it for consideration.

    I don't know if this is applicable to your case, but it is important to users who work with multiple software versions and / or multiple devices. Because each PRU-ICSS protocol version requires a specific Processor SDK, SYS/BIOS, XDCtools, and CCS version, when working with multiple devices (AM335x, AM437x, ...) multiple versions of Processor SDK or/and multiple version of the PRU-ICSS Industrial protocols - we separate the versions in separate directories.

    What works consistently for me is to perform an fresh installation into an empty ti directory. If I wish to maintain several different configurations, I uninstall CCS (so that I only have one version installed) and then rename the ti directory with the Processor SDK, and PRU-ICSS-Industrial I wish to save.

    David
  • Hi David,

    In fact, before updating Beckhoff EtherCAT Slave Stack Code (SSC) version 5.12 I was using version 5.11 and I already had the problem. So, It is not a regression from Beckoff version.

    The problem appears if I chain only 2 slaves: after an hard reset (turn off the power for example), my configuration with 2 slaves doesn't work; no slave are seen on the network while scanning. I have to unplug the 2nd slave, scan the bus (now I see the first slave) then replug the 2nd slave, scan the bus (now I see the 2nd slave).

    As I mentioned, I think it is a problem with port B of the first slave. And If I use PRU initialization with odl version of HostProc[] and FrameProc[], everything work well.

    I only use AM335x.

    I'm going to install PRU-ICSS-ETHERCAT-SLAVE 01_00_05_00 but I think it won't solve my problem....

    I will keep you informed.

    Thanks a lot.

    Laurence

  • Lawrence

    If possible please try PRU-ICSS-ETHERCAT-SLAVE  01_00_05_00. There were both port 0 and port 1 updates.

    David

  • Yes David: I have only changed the 2 tables HostProc[] and FrameProc[] with the new ones found in PRU-ICSS-ETHERCAT-SLAVE 01_00_05_00 and it works. Now, I update all my sources with pdk_am335x_1_0_9 and PRU-ICSS-ETHERCAT-SLAVE 01_00_05_00.
    Thanks for your help
    Laurence
  • Hello David,

    I've a little big problem while updating the try PRU-ICSS-ETHERCAT-SLAVE  01_00_05_00 !!!

    Before doing that I had also updated to pdk pdk_am335x_1_0_9 and I have rebuilded of the libraries for all components.

    Then I've generated both project from PRU: ethercat_slave_full_AM335x_arm (patched with Beckoff stack 5.12) and ethercat_slave_demo_AM335x_arm.

    I thied to compile these 2 projects and: IMPOSSIBLE !!!

    I have the same error while compiling:

    I tried to investigate and find the error.

    In the file am335x_app_pa8fg.c found in the folder AM335x_release\ConfigPkg\cfg I can find the indirection :

    /* Module__startupDoneFxn__C */
    __FAR__ const CT__ti_osal_Settings_Module__startupDoneFxn ti_osal_Settings_Module__startupDoneFxn__C = ((CT__ti_osal_Settings_Module__startupDoneFxn)0);
    But, if I search for the type CT__ti_osal_Settings_Module__startupDoneFxn There's no definition for this type.

    For example, in the previous command:

    /* Module__loggerFxn8__C */
    __FAR__ const CT__ti_osal_Settings_Module__loggerFxn8 ti_osal_Settings_Module__loggerFxn8__C = ((CT__ti_osal_Settings_Module__loggerFxn8)0);
    If I seacrh for the type CT__ti_osal_Settings_Module__loggerFxn8 I can find its definition il the file C:\ti\pdk_am335x_1_0_9\packages\ti\osal\Settings.h:

    /* Module__loggerFxn8 */
    typedef xdc_runtime_Types_LoggerFxn8 CT__ti_osal_Settings_Module__loggerFxn8;
    __extern __FAR__ const CT__ti_osal_Settings_Module__loggerFxn8 ti_osal_Settings_Module__loggerFxn8__C;
    #ifdef ti_osal_Settings_Module__loggerFxn8__CR
    #define ti_osal_Settings_Module__loggerFxn8__C (*((CT__ti_osal_Settings_Module__loggerFxn8*)(xdcRomConstPtr + ti_osal_Settings_Module__loggerFxn8__C_offset)))
    #else
    #define ti_osal_Settings_Module__loggerFxn8 (ti_osal_Settings_Module__loggerFxn8__C)
    #end

    And tis is the same for all types defined !!!!

    There's only a mistake on Module__startupDoneFxn__C.

    Of course, I tried to put a same definition in the file Settings.h:

    /* Module__startupDoneFxn__C */
    typedef xdc_runtime_Types_startupDoneFxn CT__ti_osal_Settings_Module__startupDoneFxn;
    __extern __FAR__ const CT__ti_osal_Settings_Module__startupDoneFxn ti_osal_Settings_Module__startupDoneFxn__C;
    #ifdef ti_osal_Settings_Module__startupDoneFxn__CR
    #define ti_osal_Settings_Module__startupDoneFxn__C (*((CT__ti_osal_Settings_Module__startupDoneFxn*)(xdcRomConstPtr + ti_osal_Settings_Module__startupDoneFxn__C_offset)))
    #else
    #define ti_osal_Settings_Module__startupDoneFxn (ti_osal_Settings_Module__startupDoneFxn_C)
    #endif

    But of course it doesn't work and I have an error while compiling the osal library:

    In file included from /ti/PDK_AM~2/packages/ti/binary/pruss_app_sorte_slave/obj/icev2AM335x/a8host/release/pruss_app_sorte_slave_configuro/package/cfg/sorte_icev2am335x_app_pa8fg.c:43:0:
    /ti/PDK_AM~2/packages/ti/osal/Settings.h:191:9: error: unknown type name 'xdc_runtime_Types_startupDoneFxn'
     typedef xdc_runtime_Types_startupDoneFxn CT__ti_osal_Settings_Module__startupDoneFxn;

    Did you ever make the compilation for these projects ?

    Did it succeeded ?

    Can you tell me why it doen't work and help me to fix the problem ?

    Thanks a lot for your help.

     

    Laurence

  • Hi Lawrence

    I was able to run the application without problem. But it looks like you have a installation issue.
    It looks like you have also posted this question in e2e.ti.com/.../2412115
    I have answered that posting. Let me close this one.
    David

  • ok david: you can close this post.

    i'm going to have a look to my installation and i will tell you on the other post.

    thanks

    Laurence