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.

PRU-ICSS-INDUSTRIAL-SW: How to realize EtherCAT Status LEDs using PRU-ICSS-Industrial-SW?

Part Number: PRU-ICSS-INDUSTRIAL-SW

Hi TI,

when developing an EtherCAT Slave with AM65xx Evaluation Board using PRU-ICSS Industrial SW, I also would like to realize the required Status LEDs (L/A (Link/Act and RUN) on some of the existing digital outputs.

Is there already some functionality included in the software package, which allows me to control some LED for this purpose? If yes, where is this function located and how can I use it?

Thanks for your help.

Best regards,

Felix

  • Hi,

    Which SDK are you using ? EtherCAT slave is supported with SDK 7.1 on AM65x. Please refer to this migration guide.

    LED examples are provided with the RTOS PDK (inside RTOS SDK). You can checkout board_diag_led and board_diag_ledIndustrial example applications under pdk/packages/ti/build

    Regards

    Vineet

  • Hi Vineet,

    I think I found the cause of my problem, but I still need some assistance to get it working. (I am using SDK 7.1 and I followed the migration guide. My EtherCAT Application is also working in TwinCAT - with the exception of the status LEDs).

    There is a function called ECAT_SetLedIndication() (in ecatappl.c), which gets called in MainLoop() (also in ecatappl.c), which should do the job of blinking the EtherCAT Run/Err LEDs.

    However, my application throws errors, when I try to use the default main() function:

    void main(void)
    {
        /* initialize the Hardware and the EtherCAT Slave Controller */
    #if FC1100_HW
        if(HW_Init())
        {
            HW_Release();
            return;
        }
    #else
        HW_Init();
    #endif
        MainInit();
    
        bRunApplication = TRUE;
        do
        {
            MainLoop();
            
        } while (bRunApplication == TRUE);
    
        HW_Release();
    #if _PIC24
        return 0;
    #endif
    }

    As a workaround, I used the main function from tiescappl.c:

    int main()
    {
        common_main();
        return 0;
    }

    With this function, my EtherCAT Application is working. But the status LEDs do not, since there is no call of MainInit().

    Why do I get errors when trying to use the default main function? I build the application using the provided projectCreate.bat tool. So the CCS project should be fine.

    Thanks again for your help.

  • Hi Felix,

    Sorry, re-opening this thread after some time.

    Is this issue still open ?

    Regards

    Vineet

  • Hi Vineet,

    thanks for your help. You can close this issue.

    Regards,

    Felix