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?
...
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);
}
Hilscher Gesellschaft fuer Systemautomation mbH
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.
... 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.
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.Hilscher Gesellschaft fuer Systemautomation mbH
If the "atMidCfgTbl" is not anymore used inside of the config.c file it is a death code fragment.
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?
Hilscher Gesellschaft fuer Systemautomation mbH
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.
Andreas Jacob
Hilscher Gesellschaft fuer Systemautomation mbH
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.