industrialNETworXnetx

jr

jr

| 19.04.2007 | 10:44 | 7 replies

EtherCAT Slave Resources

Hi,
is there any document describing the configuration of an EtherCAT Slave?

- which interrupts have to be configured?
- which PHY devices are necessary? What is the proper contents of the indiviual atrXPhy[] entries (OUI, ...)?

- which Tasks beside the EtherCAT Protocol Tasks and the AP-Task have to be configured?

- which PIO resources are necessary?

- which Hardware-Timers are necessary?

- which XC resources are necessary?

...

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 19.04.2007 | 11:36

Hi jr,

on the Hilscher web page (in the section Manuals - Protocol Stacks) are some manuals for the EtherCAT stack.
Currently exists no special documentation for the config.c file ,which describes all needed settings for the EtherCAT stack.

Here for you should take a look into the config.c file of an EtherCAT API-Example.

There you will see all needed configurations for the EtherCAT.

jr

jr

| 24.04.2007 | 19:37

Hi AJ,
that's exactly what i'm doing. But i would like to understand what i'm reading.
E. g. the EtherCAT config file contains FIQ Instances, and i found no explanation for this.
Furthermore, in FromKernel(), there is no call for ToKernel(). Is this call dispensable in general?

void FAR FromKernel(void)
{
 volatile RX_FATAL erXFat=RX_OK;
  RX_HANDLE hHandle;

/* Load all the Drivers and Peripherals not included in the ROM-Kernel here */
if((erXFat = LoadDrivers(atrXDrvCfgPost,
MAX_CNT(atrXDrvCfgPost)))!=0) {
goto fault;
}

return;

fault:
/* Loop forever here, to keep the "erXFat" variable debugable */
while(1==1);
}

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 25.04.2007 | 06:54

Hi jr,

the ARM has two levels of external interrupt - FIQs and IRQs.
The FIQ instances are "Fast Interrupts".

- FIQs have a higher priority than IRQs in two ways:
- Serviced first when multiple interrupts arise.
- Servicing an F IQ disables IRQs
- IRQs will not be serviced until after FIQ handler exits.
- FIQs are designed to service interrupts as quickly as possible.
- FIQ vector is last in vector table.
- Allows handler to be run sequentially from that address
- FIQ mode has 5 extra banked registers (r8-r12)
- Interrupt handlers must always preserve non-banked registers
- Can have multiple FIQ sources, but avoid nested FIQs for best system performance

The used FIQ-Instance from the config file includes the Interrupt Name and the Interrupt number, similar to the "standard" Interrupt Instance.
We only need these both parameter's because it exists only one FIQ.

jr wrote:
... in FromKernel(), there is no call for ToKernel(). Is this call dispensable in general?

Here we have to take care, which version of the operating system rcX is used.
Normally it is only used in old rcX V1 projects. Since V2 is this function not anymore available.
In your used rcX V1 API-Example the structure is already changed.

jr

jr

| 25.04.2007 | 09:59

Hi AJ,
thanks for the explanation. In the EtherCAT example, there is also middleware config entry:

CONST RX_MIDDLEWARE_CONFIG_T FAR atMidCfgTbl[]=
{
    {MidLedInit},
    {EcatHalInit},
    {Od2_Init}
};

There is no further reference to this entry in the config file.
Normally, atMidCfgTbl is passed as a parameter to ToKernel(). As ToKernel() is missing, does this mean that atMidCfgTbl is not used?

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 25.04.2007 | 10:07

If the "atMidCfgTbl" is not anymore used inside of the config.c file it is a death code fragment.

jr

jr

| 25.04.2007 | 10:35

Hi AJ,
that's what i supposed. The first access to the Object directory is the call

eRslt = Od2_IdentifyObjDict("ECAT_OD", 0, &hObjDict);

in TaskResource_XXX_InitRemote(). Unfortunately, i didn't find any documentation about the Od2_XXX functions. But i would guess that something like a od2_create or od2_init (like the entry in the middleware config) is necessary before Od2_IndentifyObjDict can be called.

Or is the Object Directory created otherwise?

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 26.04.2007 | 10:42

Hi jr,

the object directory is created by the EtherCAT stack it self.

But here for is the od2_init call necessary.

Sorry, but there is currently no released manual available.
All available manuals are download able on the Hilscher web page.

Login