Settings for DC-syncronous (or SM+SYNC0) mode

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

cross mob
Not applicable
Hello everyone,
I tried to get DC clock synchronization working on the XMC4800 EtherCAT kit -- both with the current "XMC4800 Relax EtherCat Slave SSC" (http://www.infineon.com/dgdl/Infineon-XMC4800_Relax_EtherCat_Slave_SSC-GS-v01_00-EN.ZIP?fileId=5546d...) as well as the "HOT_XMC48_ECAT_GettingStarted" from http://www.infineonforums.com/threads/3552-XMC4800_HOT-EtherCAT-Getting-Started-with-XMC4800-relax-k... .
I basically set AL_EVENT_ENABLED, DC_SUPPORTED, and ECAT_TIMER_INT in the SSC tool to '1'. however, looking into the stack code, I saw that actually everything looking like configuring the SYNC0 ISR actually does nothing -- like that part is just not implemented (c.f. ECAT0_Init_SYNC0_INT() in ECAT0.c). What am I actually missing?
Thanks very much for any hint!
BR, Chris
0 Likes
10 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi ctess,

So sorry about it, I am also in the process of trying this which is pretty new to me too. Please give me some time and I will post an example on this if I get it working.

Best Regards
Travis
0 Likes
Not applicable
Hello,

I was looking into getting the DC synchronization working for XMC4800 and I came across this thread. Is there any update regarding this? Can you direct me as to how to observe this feature of EtherCAT on XMC?


Best Regards,
Dhanashree
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi,


Firstly at the TwinCAT you have to enable the DC.

If you are using the XMC4800 relaxkit you can direct the SYNC pulse to the GPIO P1.14 which you can observe this on a scope or see the LED turns on.
Typically the SYNC pulse interval should be around 4msec.

Of course you can also link the SYNC pulse to the ERU which will trigger an interrupt on the XMC48.
0 Likes
Not applicable
Hi,

Thank you for the above help.
I tried it. I enabled the DC from TWINCAT. I tried to direct the SYNC pulse to P1.14 by using the code below

UINT16 ALEvent = HW_GetALEventRegister_Isr();
BOOL SYNC_BIT_0 = SYNC0_EVENT & ALEvent;
XMC_GPIO_SetOutputLevel(P_LED1, MAP2LEVEL(SYNC_BIT_0));

but I get a continuously high signal at P1.14.
Can you tell me what I am doing wrong?
Thank you
0 Likes
Not applicable
Hi dvaidya,
with the new version 2.2 of the XMC EtherCAT kit SSC Slave App, I *think* you don't have to do anything special for enabling DC sync any more, look here
http://www.infineon.com/cms/en/product/evaluation-boards/KIT_XMC48_RELAX_ECAT_V1/productType.html?pr... and download "XMC4800 Relax EtherCAT® APP Slave SSC"

I used this as starting point and just enabled DC sync in TwinCAT (no special settings, just in the Box's settings on the DC tab, select DC instead of SM in the dropdown) and it worked 🙂

However, there's something weird with DC on (doesn't happen with SM sync): after about 5mins, the application seems to drop packets (the lost packets counter in TwinCAT stays at 0/0, however), but when sending consecutively numbered data from the slaves to the master, I can observe that there's here and there a packet missing.
Has anyone any kind of idea why? As mentioned, it doesn't happen with SM.

Best, Chris
0 Likes
Not applicable
Hi ctess,

I understand that the DC sync is working but are you able to observe the SYNC0 pulsed signal ? I wanted to know how to probe this signal to verify on scope if all slaves have similar signal.
I tried with the above mentioned method I just get a continuously high signal. So am I observing something wrong or is the DC really working?

How are you verifying this feature?

Best regards,
Dhanashree
0 Likes
Not applicable
Hello,

I was able to verify it from the ISR of SYNC0 and the slaves are observed to be in series. But I observed that if I reset/ disconnect one of the slaves (other than the first slave which is the reference clock for the etherCAT system)
then that slave does not get synced back to the network. I need to re scan from the twinCAT (PC) which is my master to get all of them synced again. Is there any feature I need to enable to avoid this?
Shouldn't this be done by the master automatically?

Thank you
0 Likes
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
dvaidya wrote:
Hi,

Thank you for the above help.
I tried it. I enabled the DC from TWINCAT. I tried to direct the SYNC pulse to P1.14 by using the code below

UINT16 ALEvent = HW_GetALEventRegister_Isr();
BOOL SYNC_BIT_0 = SYNC0_EVENT & ALEvent;
XMC_GPIO_SetOutputLevel(P_LED1, MAP2LEVEL(SYNC_BIT_0));

but I get a continuously high signal at P1.14.
Can you tell me what I am doing wrong?
Thank you


Hi dvaidya,
the easiest way to connect e.g. the SYNC0-signal to an output port is to the following
1. Add a DIGITAL_IO APP and configure it for output/push pull
2. Right click ECAT_SSC APP and select HW signal connections from context menu
3. Set source signal from Not Selected to sync_out0. Set your DIGITAL_IO APP you have added before as the Target.
4. Right click yout DIGITAL_IO APP and select Manual Pin Allocator from context menu. For SYNC0 you can select P3.7 or P1.14.
5. Start code generation and rebuild your project.

I just verified and this procedure works.

Kind Regards

Michael
0 Likes
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
ctess wrote:
Hi dvaidya,
with the new version 2.2 of the XMC EtherCAT kit SSC Slave App, I *think* you don't have to do anything special for enabling DC sync any more, look here
http://www.infineon.com/cms/en/product/evaluation-boards/KIT_XMC48_RELAX_ECAT_V1/productType.html?pr... and download "XMC4800 Relax EtherCAT® APP Slave SSC"

I used this as starting point and just enabled DC sync in TwinCAT (no special settings, just in the Box's settings on the DC tab, select DC instead of SM in the dropdown) and it worked 🙂

However, there's something weird with DC on (doesn't happen with SM sync): after about 5mins, the application seems to drop packets (the lost packets counter in TwinCAT stays at 0/0, however), but when sending consecutively numbered data from the slaves to the master, I can observe that there's here and there a packet missing.
Has anyone any kind of idea why? As mentioned, it doesn't happen with SM.

Best, Chris


Hi ctess,
can you describe your test setup in more detail. Where do you increment your "counter" in slave and how do you verify on the host?
Which host-SW do you use?

Kind Regards

Michael
0 Likes
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
dvaidya wrote:
Hello,

I was able to verify it from the ISR of SYNC0 and the slaves are observed to be in series. But I observed that if I reset/ disconnect one of the slaves (other than the first slave which is the reference clock for the etherCAT system)
then that slave does not get synced back to the network. I need to re scan from the twinCAT (PC) which is my master to get all of them synced again. Is there any feature I need to enable to avoid this?
Shouldn't this be done by the master automatically?
Thank you

Hi dvaidya,
I tried to reproduce what you are saying using TwinCAT3 as a host, but I cannot confirm.
I've used two XMC4800 Relax Kits.
I've tested disconnecting/reconnecting RJ45, reset and complete power cycles of 2nd slave.
Always after some seconds the 2nd slave shows RUN-LED again static turned on and the slave is back in sync?!

Kind Regards

Michael.
0 Likes