FAQ for XMC4800 EtherCAT

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

cross mob
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
1823.attach


Hi all,

I would like to dedicate this thread specially for the development of EtherCAT using the XMC4800. Please do feel free to post your questions here and we shall do our best to answer these question.

Best Regards
Travis
0 Likes
53 Replies
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
General Questions

1. How many MII ports does the XMC4800 EtherCAT support?
The XMC4800 EtherCAT support only 2 MII ports.

2. How many FMMU and SyncManager are there in the XMC4800 EtherCAT?
There is a total of 8 FMMUs and 8 SyncManagers.

3. Can we use RMII PHY for EtherCAT?
Since RMII PHYs include TX FIFOs, they increase the forwarding delay of an EtherCAT slave device as well as the jitter. RMII is not recommended due to these reasons.

4. How can I connect a serial EEPROM with I2C interface for the EtherCAT system?
The EEPROM emulation mode is used in XMC4800 ECAT with a non-volatile memory (NVRAM) integrated to a micro controller.
Hence an additional external EEPROM chip for the system is not needed.


5. Does the XMC EtherCAT module come with Distributed Clock for Synchronization application?
Yes, it comes with a 64 bit distributed clocks with Sync &Latch signal, generation of synchronous interrupts, synchronous digital output updates and input sampling.

6. What does the Address space of the EtherCAT slave controller consist of in the XMC4800?
In general the EtherCAT Slave Controller has an maximum address space of 64KByte. However for XMC4800, the first block of 4KByte (Offset: 0x0000 to 0x0FFF) is dedicated for registers. The Process Data RAM starts at address offset 0x1000. The size of the Process Data RAM is 8 Kbyte. Please note that the base address begin at address 0x54010000.

7. Is there any quick link to Infineon XMC4800 and XMC4300 EtherCAT?
http://www.infineon.com/cms/en/product/promopages/xmc4300_4800-EtherCAT/

Software Development Questions

1. How can I create the EtherCAT Slave Stack Code?
Currently we are using the SSC (Slave Slack Code) tool provided by Beckhoff to generate the necessary EtherCAT Slave files. These files will be integrated into the DAVE4 for compiling and debugging.

2. Where is the memory location of the EEPROM in XMC4800?
The EEPROM can be found in the logical sectors S4 to S7 of PS4. (0x08010000)

3. Where is the memory location of the 8K Process Data RAM?
The Process Data RAM is located in memory location 0x54011000 to 0x54012FFF.

4. Where is the main software (eg. main.c, SSC code etc) located in the flash memory location?
The main software is located in address location 0x08020000 (sector 8).

5. Does DAVE debugger erase the EEPROM during flash programming of XMC4800?
No. EEPROM is not programmed or updated during flash programming.

6. How is the EEPROM data updated to XMC4800?
The software shall check if the EEPROM area is empty. If it is EMPTY, EEPROM data from eeprom.h will be updated into the EEPROM.

7. How is it possible to overwrite previous EEPROM data with a newer version?
A total flash erase is necessary using J-Link Commander or a function call to erase the EEPROM can be done in the main(). Once the software detected that the EEPROM is empty it shall then update the EEPROM with the newer version from the eeprom.h file.


8. Does the Beckhoff slave stack code support Safety over EtherCAT (FSoE)?
Yes, the Beckhoff slave stack code does support safety over EtherCAT.
https://www.ethercat.org/en/safety.html

Hardware Development Questions

1. What is the recommended PHY selection for EtherCAT Slave implementation?
There is an application note document "AN_PHY_Selection_Guide V2.3.pdf" from BECKHOFF which has a list of recommended PHY selection.
http://www.beckhoff.com.sg/english.asp?download/ethercat_development_products.htm

Getting started with XMC4800
http://www.infineon.com/cms/en/product/evaluation-boards/KIT_XMC48_RELAX_ECAT_V1/productType.html?pr...

2. Where can I find the board design of the XMC4800 Relax EtherCAT kit?
This link provides the PCB footprint of the XMC4800 Relax EtherCAT kit.
http://www.infineon.com/cms/en/product/evaluation-boards/KIT_XMC48_RELAX_ECAT_V1/productType.html?pr...
0 Likes
User10683
Level 1
Level 1
Hi.

I did a fresh install of DAVE 4.2.2 64bit and wanted to use the EtherCat APP. I did as described under usage of the app's documentation, but the code generation finishes with an error, saying that I should check the problems view.
But the problems view is empty! And the required "Infineon_XMC_ECAT_SSC_Config.xml" file is not copied to the ECAT_SSC folder.

Thanks for your answers

Matthias
0 Likes
User10683
Level 1
Level 1
Hi again,

I tried the 32 bit version, and this one works as it should. But now my problem is as follows:
The code compiles without errors. I delete the flash with JLink, but the function E_EEPROM_XMC4_IsFlashEmpty() returns false. And so, no EEPROM content is written and the Master finds an incorrect slave.......

Matthias
0 Likes
Not applicable
Hello,
XMC4800 has DC support, but how can it be enabled? I tried to enable DC-synchronization with the latest version of the EtherCAT slave example and the Hands-on-Training sample project, but to no avail, seems like there's something missing in the sync ISR init functions.. see http://www.infineonforums.com/threads/3830-Settings-for-DC-syncronous-%28or-SM-SYNC0%29-mode
0 Likes
Not applicable
Hi ,

Generally Ethercat uses cyclic communication mode.

I am planning to use Ethercat Acyclic communication mode for application data transfer.

I have found some Ethercat Slave device needs a cyclic communication to avoid stopping the working.

Dies XMC4800 device needs a cyclic communication to avoid stopping the work? or still it work with ethercat in acyclic communication.

Does it possible with XMC4800?
0 Likes
Not applicable
Hi Waiting for reply...
0 Likes
Not applicable
Hi,
Refer to the first reply to thread which is being updated per the queries on the thread.
0 Likes
User11412
Level 1
Level 1
How I Can modify the example code XMC4800_Relax_EtherCat_APP_Slave_SSC for using the Distribut clock (Sync0 interrupt) ?
Thanks
0 Likes
Not applicable
Hi
Is there extra payload of the ARM processor when using EtherCAT or does the extra processor in the EtherCAT module handle all?
Many thanks in advance!
Elin
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
The CPU only take care in the processing of the Slave Stack Code which is necessary in most EtherCAT system. There is no extra CPU in the EtherCAT module.
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
Hello, I have some questions about EtherCAT and synchronous mode.
So I followed the tutorial of the ECAT Apps to set up cyclic EtherCAT communication.

I had a look in MainLoop().
Apparently it is not running in free run mode because bEscIntEnabled and bEcatFirstOutputsReceived are true, so the If condition are not respected.
It should be running in Synchron mode.

But where is the ISR ?

According to the comment on ecatappl.c, "if the application is running in ECAT Synchron Mode the function ECAT_Application is called from the ESC interrupt routine (in mcihw.c or spihw.c)".
But I don't have mcihw.c or spihw.c file.
So where the ESC interrupt routine is called ?
And where the ESC interrupt routine is written ?
And also something strange, I put a 10 seconds delay on the while(1U) :
while(1U)
{
MainLoop(); // EtherCAT Loop, generated automatically
cpuPauseMilliSecond(10000);

}

And with it the EtherCAT communication is not working.
And it should if the Synchron mode is set isn't it ?

You can find a copy of my project.

Any ideas ?
Thank,
Nicolas
0 Likes
Not applicable
Hello,
Allude to the main answer to string which is being redesigned per the questions on the string.
0 Likes
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
Hi Nicolas,
please get the latest examples (ETHCAT_SSC_XMC48 and ETHCAT_SSC_XMC43) also distributed within DAVE4 and which is using distributed clocks.
The connection of SSC to ISR you will find implemented inside main.c - also mentioned inside the documentation of the examples.

Michael
0 Likes
Not applicable
Hello,
I downloaded, configured and ran your example.
I saw the ISR connected to sync0 and sync1.


However, the ISR in Sync0 and Sync1 are never called and the application is running is freerun.
When in Twincat 3 I set up DC-mode using Sync0, the slave goes to safeop, so something wrong, isn't it ?



With my project, I know the application in running in synchron mode because bEscIntEnabled and bEcatFirstOutputsReceived are true.
But where APPL_Application is called() ? How it goes with the SyncManager SM2/3 ?
I didn't find out.
I hope you have some answers.

Thank,
Nicolas
0 Likes
Not applicable
Last week I've received my XMC4800 Relax eval board from DigiKey. I also downloaded and installed DAVE 4.2.6.

When I build the ETHCAT_SSC_XMC48 example project I encountered compilation errors due to missing SSC header files:

'Building file: ../Dave/Generated/ECAT_SSC/ecat_ssc.c'
In file included from ../Dave/Generated/ECAT_SSC/ecat_ssc.c:52:0:
../Dave/Generated/ECAT_SSC/ecat_ssc.h:58:35: fatal error: SSC/Src/applInterface.h: No such file or directory

I understand from the ETHCAT_SSC_XMC48 documentation that I must independently contact the ETG (EtherCAT Technical Group) to obtain the missing SSC source files.

A week has passed since I have contacted ETG. My company is still awaiting membership approval to download the required SSC files. This is an unexpected and disappointing initial user experience. To continue progress on learning the XMC4800 eval board, I have tried to build and debug the XMC4700/XMC4800 blinking LED demo based on XMC Lib.

The Blinky project builds with any errors. However, when I attempt to run the project within DAVE I receive the following error:

'Launching XMC4700_Blinky.elf' has encountered a problem.Error in final launch sequence.
Failed to execute MI command:
-exec -run
Error message from debugger back end:
Don't know how to run. Try 'help target"

Any help in obtaining the missing SSC files will be greatly appreciated. It is suprising and disappointing these files are not provided with either DAVE or the example ETHCAT_SSC project.

Any help in running the XMC4700_Blinky simple sample program will be also greatly appreciated.
0 Likes
Not applicable
Hello northcove,
didi you use the SSC tools software given by ETG to generate those files ?
You need to inscribe your company to ETG to be able to download SSC tools.
0 Likes
Not applicable
Hello.
Because I'm used to using the MDK tools when I program some ARM microcontrollers,I copy the example code of official website provide to the latest MDK version(Keil V5.21).
I build the example project and make some changes for the MDK platform(e.g. change #include "malloc.h" into #include "stdlib.h").I finally get 0 erros and 0 warnings.
And then I downloaded the program to the XMC4800 relax kit.However,I found some problems.

The program will run out when I change the state machine of EtherCAT master by TwinCAT2.0.It almost occurred from INIT to PRE-OP.But the phenomenon is not happening every time when
I change the state machine.This is so strange.The same example code that is builded by DAVE is currect,and has no such phenomenon.

So I would like to ask you if you have tried to compile this code with MDK,and have you had this problem.

Thank you, looking forward to your reply.

Example code :XMC4800_Relax_EtherCat_Slave_SSC
Hardware: XMC4800_Relax_Kit and XMC_EtherCAT_Phy_Board-V1
ECAT master: TwinCAT2.0 in PC
0 Likes
Not applicable
Question: is there any instructions/tutorials how to generate code for CiA402 application (motor drive profile)?

I could not generate such app with SSC tool. After I create new SSC project with Infineon template (and subsequently create project from xlsx file), then SSC Application ->CiA402_DEVICE becomes read only with value 0. Any ideas how to proceed? I assume I would need xlsx file for CiA402 profile but I couldn't find any from the Internet.

Any hints would be greatly appreciated, a R&D project is is stuck with this issue. Thanks!
0 Likes
Not applicable
Hi Guys,

I have some general Questions about the XMC4800.

Generally I want to regulate the frequency of a fan with a frequency converter.
>>The xmc4800 should directly communicate with the frequency converter via ethercat.
>>The xmc4800 should do all the math for the controlling.
>>The xmc4800 gets his control paramteres by an digital air flow sensor (at the moment not sure which communication protocol maybe i2c).
>>The xmc4800 shows me all his actual values on a central computer and from this i can change the control parameters.
For example regulation on 4 m/s and i want to change it to 8 m/s. And just have to type it into an web window (or an other interface).
>>The xmc4800 saves the measurements to a sd-card with timestamp.

Thank you 😮
0 Likes
Not applicable
Hi,

do I have to use both EtherCAT-Ports (i.E. do i have to map all the signals to pins in the pin mapping perspective in DAVE)? I only need one EtherCAT Port as the network topology will be a star network. Also I need the Pins unsed by the second EtherCAT-Port (p1) for other Signals.
My hope is that I can simply map all the Signals for EtherCar p0 to the corresponding hardware pins and leave the pin mapping for p1 blank.

Thank you for your answers in advance!
0 Likes
User12779
Level 1
Level 1
Hi,

@ FHK: do you know already more about your question?
I also ask myself if it is possible to only use one EtherCAT port. Or does an EtherCAT Maser usually need two ports?

Best regards
0 Likes
Not applicable
I want to use the RGMII interface for EtherCAT because of space limitations I have on my PCB.

How do I configure EtherCAT interface for RGMII?

What pins do I use in the XMC pinout tool?
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

From the RM:
"EtherCAT slave devices with Ethernet Physical Layer usually support MII interfaces,
some do also support the RMII interface. Since RMII PHYs include TX FIFO’s, they
increase the packet forwarding delay of an EtherCAT slave device as well as the jitter.
RMII as a Ethernet Physical Layer is not supported by the XMC4[78]00 due to these
reasons."

Regards,
Jesus
0 Likes
Not applicable
Hi ,

I'm new to EtherCAT and I was trying to work on EoE. Is there any example for EoE ?

thanks in advance,
Vinay
0 Likes
Not applicable
Hi all,

I'm working on XMC4800 EtherCAT with SSC tool. I've enabled EoE for my application, and I've given a IP address for the XMC. Now, how do I check the communication ? I mean, how do I check the Ethernet packages sent ?

Thanks in advance,
Vinay
0 Likes
Not applicable
Hello What is the HW interface between main CPU and ECAT unit ? SPI ? Or something else ?

Thank you.
0 Likes
Not applicable
It uses the Xilinx OPB,The On chip bus Xilinx OPB is bridged to AHB lite.2874.attach
0 Likes
User14172
Level 2
Level 2
First solution authored First like received
I understund that XMC4800 use an emulate ESC eeprom but this create some problems to read and write the esc eeprom by TwinCAT or other equivalent system.
The most important problem is that for example when I make a "scan devices" by TwinCAT, it doesn't work correcttly and in the three I don't find the XMC_ESC so as I would aspect.
Do you have some suggest in order to solve this issue?
I precise that if I configure in the tree ethercat device XMC_ESC, the ESC go in OP mode correcttly... The problem is just in the read/write eeprom by the TwinCAT features.

Thank you in advance for your support,

Claudio
0 Likes
User14172
Level 2
Level 2
First solution authored First like received
hello alls,
it seems that the problem about the inccorect scan devise was caused by the default product code set to 0 in the esi and in the eeprom generated by the esi.
However I would like that the ethercat slave had the same behaviour of every slaves that have an I2C eeprom, where we are able to write and read the eerpom with TwinCAT or every others equivalent tools.

reading the user maual of the xmc4800 I see that in eeprom emulation mode, it should be possible to read and write the eerpom so as an I2C eeprom...

Is this correct or we have some limitation with this configuration?
0 Likes
Not applicable
Hello all,

we want to build our own EtherCAT slave based on an XMC4800. So far something is runing on the eval board.
Now, we have to build our own Hardware. I thought let's use the BCM5241 PHY like on the eval board but I won't get a datasheet from broadcom. I also found the PHY list from Beckhoff but It seems that only this BCM5241 was tested.
Has anyone practical experience with other PHYs and maybe neccessary changes in the source code? Or does anyone knows a way to get a datasheet from broadcom (for small series customers)?

Thanks in advance,
Martin
0 Likes
Not applicable
Hello,

I'm facing a problem with the demo app (https://www.infineon.com/dgdl/Infineon-Getting-Started_XMC4800_Relax_EtherCat_APP_Slave_SSC-GS-v02_0...) .
I followed all the steps in the tutorial and when I rebuild the active project (step 10 page 21), it fails and the reason is that in ecat_hw.c (in SSC/Src) the variable EEPROM_READ_SIZE is used but is undefined.
I came around the problem by defining it myself in the ecat_def.h.
1) Is it the proper way to do so?
2) Has anyone found a similar problem and if yes what am I doing wrong?

Thanks a lot for your awesome product,
Mike
0 Likes
Not applicable
...Does really no one has the PHY selection issue? Which PHYs do you use with the XMC4800?

Thanks in advance,
Martin
0 Likes
Not applicable
...Does really no one has the PHY selection issue? Which PHYs do you use with the XMC4800?

Thanks in advance,
Martin
0 Likes
Not applicable
marzoel wrote:
...Does really no one has the PHY selection issue? Which PHYs do you use with the XMC4800?

Thanks in advance,
Martin


I had the same problem with Broadcom.
I successfully used a KSZ8081MLX from Microchip for my application. Only change in the firmware was to write a register in the PHY to change the link LED behavior as described in the Beckhoff selection guide.

Good luck
0 Likes
Not applicable
Hi,

i have a problem regarding the "One Cycle Slave to Slave Communication" Manual. I followed the instructions and got to the point where I have to "create some input data" in the "process_app"-function of the "main.c"-file (slide 17).
There's no such function in my file, so i just added it. When I want to build the project following errors appear:

1.) ../SSC/Src/XMC_ESC.c:263:27: error: 'IN_GENERIC0x6000' undeclared (first use in this function)
2.) SSC/Src/subdir.mk:39: recipe for target 'SSC/Src/XMC_ESC.o' failed
3.) ../SSC/Src/XMC_ESC.c:286:14: error: 'IN_GENERIC0x6000' undeclared (first use in this function)
4.)make: *** [SSC/Src/XMC_ESC.o] Error 1
make: *** Waiting for unfinished jobs....

Have you experienced this problem before and can you tell me where I made an error? Do I have to declare "IN_GENERIC0x6000" by hand...and if yes, where?
I attached a picture of the DAVE-project including the console output.

Thanks in advance,
Andreas

0 Likes
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
Dear Andreas,
The data-type you miss is specified inside the EXCEL-sheet referenced on page 14 of the documentation.
This EXCEL-sheet is used as an input to the SSC-tool to generate the code.
After code generation you will find the definition inside XMC_ESCObjects.h of the generated code.

Kind Regards

Michael
0 Likes
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted
Hello Mike,
your modification in general should be OK.
But to avoid the hack you had to do, you can also stay with SSC5.11 which has not this incompatibility you faced.

In the very near term we will update the ECAT_APP to support also compatibility to the latest SSC5.12 version you are using.

Kind Regards

Michael
0 Likes
MichaelIFX
Employee
Employee
50 replies posted 25 replies posted 10 replies posted

... in regard to PHYs you can use for EtherCAT/XMC.

Any PHY, compatible with ET1100, present inside the PHY selection guide published by BECKHOFF will work with XMC:
e.g. Version 2.4:
https://download.beckhoff.com/download/Document/io/ethercat-development-products/an_phy_selection_gu...

0 Likes
Not applicable
Dear Michael,

maybe you can help me. I try to connect a second board to the existing configuration which is shown in the "HOT_Ethercat_Getting_Started" Tutorial, but no matter what I do just one board is recoginzed as a "SSC-Box" in TwinCAT. The other is just an object without IN and OUTs.
I also followed the "One Cycle Slave to Slave" - Tutorial. Same problem.

Do you have an idea?

Best regards,
Andreas
0 Likes