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.

AM2432: Replace icss_fwhal Lib File with Source File Cause Ethercat Cannot Enter OP

Part Number: AM2432

Tool/software:

Hi TI Experts,

Customer is working on AM2432 SDK9.0.

They use the following default icss_fwhal source file to replace the lib file.

After replacing icss_fwhal lib file with source file, they recompile the source file, and add into the project below.

However, after doing so their Ethercat cannot enter OP anymore and the LINKSTA LED of PHY keeps blinking (previously it was working file if not replacing the icss_fwhal lib file to source file).

Customer does not know why, would it because that our default icss_fwhal lib file version is not the same as source file?

Thanks,

Kevin

  • Hi Kevin,

    Just to make sure that the EtherCAT firmware is loaded, could you provide the value in register 0x30090000 from the customer's setup? This register value will provide the EtherCAT Firmware version. Also please provide the value in register 0x30090134 register.

    Details of the above register values can be found in the following documentation: TI EtherCAT SubDevice Controller Register List

    Regards,
    Aaron 

  • Hi Aaron,

    Thanks for your reply, customer did more testing recently and finally found this problem is related to the compiler optimization configuration.

    1: If the optimization is O0

    Result: Ethercat could enter OP normally without any problem.

    The register values for 0x30090000 & 0x30090134 are below.

    2: If the optimization is O2

    Result: The program will crash at bsp_init() function (shown below), and Ethercat could not enter OP.

    The register values for 0x30090000 & 0x30090134 are both 0 in this case shown below.

    Could you please help provide some suggestions for customer why this happen?

    Thanks,

    Kevin

  • Thanks Kevin for the details.

    So when the optimization is O2, the application is failing in bsp_init() and hence, the firmware is not getting loaded, hence EtherCAT communication is failing. I'll try to reproduce this from my side investigate further on what may be going wrong.

    Regards,
    Aaron

  • Hi Kevin,

    A quick update regarding the reproduction of the issue:

    2: If the optimization is O2
    • Here are you referring to the optimization of the project?
    • When I keep the optimization of the project to O2 and change the optimization of icss_fwhal to O0, no application crash is observed. I'll have to check further for the optimization setting and see if this is an expected behavior.

    Regards,
    Aaron

  • Hi Aaron,

    Thanks for your reply.

    Customer found the key to solve this problem is to increase the stack size. After increasing the stack size of task1, and change the optimization of icss_fwhal to O0, no application crash is observed.

     Kevin

  • Hi Kevin,

    Setting icss_fwhal to O0 is not a good configuration. It is recommended to keep the fwhal libs to O2 itself. We are currently seeing why the application is crashing for icss_fwhal in O2.

    Regards,
    Aaron