Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User20965
Level 1
Level 1
Hi,

I am trying to get a custom made EtherCAT board working based on the XMC4800.
We took the Relax Ethercat kit and based our design on that board (Same MCU, same PHYs, ...)

I followed the "XMC4800 EtherCAT APP SSC Firmware Update Slave Example" app note

And I imported version 3.4.0 of the ETHCAT_FWUPDATE_SSC_APPLICATION_XMC48 demo app

I use SSC 5.12

We created our own custom input and output objects in the Excel file.

The problem that I have is this:

In TwinCat 3 we only see data from the slave device updated when the salve goes from Init -> Op mode.
(e.g. I attached a rotary switch to an input value and the correct value is shown whenever I cycle Op -> Init -> Op)

I have no idea what to do anymore.

Also weird is that the two syncmanager interrupts never seem to be hit. (I placed a breakpoint in the handlers)

Best Regards,

Jeroen Vandezande
0 Likes
1 Solution
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
Dear Jeroen,
I would recommend to first start with no modifications from your side (-->unmodified, beside the modifications described inside the example's documentation).
If possible, also please first start with the Relax XMC4800-Kit as a HW-platform.

Once you have shown operation with this setup (following the example's documentation) let's move on with your individual modifications.

From what you describe it is not really clear, if the problem come from your intended modifications (input/output-objects) or unintended mistakes when setting up the example.

Once you start modifying for your purpose:
1. In regard to modify the input/output-objects please be aware that SSC requires the objects need to be aligned to 32bit boundaries. Overall size must be a multiple to 32bits. So you might need to fill the objects with padding-bytes.
To make sure there are no mistakes, please check your EXCEL-sheet (where you describe the input/output-objects) with the ETGwho knows the best. They provide great support on appliance of their SSC-software.
2. In regard to the interrupts: I think they are not triggered as long you stay in free-run-mode. To let them trigger (also needed for distributed clock) the host(TwinCAT) needs to switch the bus into synced-mode.
For this you need to start a cyclic PLC-process there.

General note:
Please do not miss: Once you regenerate the SSC-code, slave's configuration inside the EEPROM (see eeprom.h) might change. The EEPROM content is copied from your binary to the EEPROM-emulation only for the very first startup.
This only happens once and only, if the emulated EEPROM is empty. Otherwise the old/outdated content will be used. This might trigger various strange effects.
So before programming new software, make sure to first delete the complete flash (see examples docu) incl. EEPROM emulation sector.
Also make sure, ESI-file you load into TwinCAT (restart might be required) matches the software (again: EEPROM-configuration) of your node.

Kind Regards

Michael

View solution in original post

0 Likes
1 Reply
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
Dear Jeroen,
I would recommend to first start with no modifications from your side (-->unmodified, beside the modifications described inside the example's documentation).
If possible, also please first start with the Relax XMC4800-Kit as a HW-platform.

Once you have shown operation with this setup (following the example's documentation) let's move on with your individual modifications.

From what you describe it is not really clear, if the problem come from your intended modifications (input/output-objects) or unintended mistakes when setting up the example.

Once you start modifying for your purpose:
1. In regard to modify the input/output-objects please be aware that SSC requires the objects need to be aligned to 32bit boundaries. Overall size must be a multiple to 32bits. So you might need to fill the objects with padding-bytes.
To make sure there are no mistakes, please check your EXCEL-sheet (where you describe the input/output-objects) with the ETGwho knows the best. They provide great support on appliance of their SSC-software.
2. In regard to the interrupts: I think they are not triggered as long you stay in free-run-mode. To let them trigger (also needed for distributed clock) the host(TwinCAT) needs to switch the bus into synced-mode.
For this you need to start a cyclic PLC-process there.

General note:
Please do not miss: Once you regenerate the SSC-code, slave's configuration inside the EEPROM (see eeprom.h) might change. The EEPROM content is copied from your binary to the EEPROM-emulation only for the very first startup.
This only happens once and only, if the emulated EEPROM is empty. Otherwise the old/outdated content will be used. This might trigger various strange effects.
So before programming new software, make sure to first delete the complete flash (see examples docu) incl. EEPROM emulation sector.
Also make sure, ESI-file you load into TwinCAT (restart might be required) matches the software (again: EEPROM-configuration) of your node.

Kind Regards

Michael
0 Likes