5 hardware access, Hardware access, Er 5 hardware access. t – BECKHOFF ET9300 User Manual
Page 14
12
Application Note ET9300
5
Hardware Access
The Slave Stack Code is executable on multiple platforms and controller architectures. This chapter
describes the available hardware implementations/settings and how to implement a new user specific
hardware access.
To support multiple hardware architectures the SSC includes multiple settings to fulfill the specific
hardware requirements. Table 1: Hardware Related Settings includes a list of the defined hardware
settings (located in ecat_def.h or in the SSC Tool).
Table 1: Hardware Related Settings
Define
Description
EL9800_HW
Hardware access if the slave code is executed on the PIC mounted on
EL9800 EtherCAT Evaluation Kit from Beckhoff Automation GmbH. It
includes PIC initialization and ESC access via SPI. This configuration
could also be used if the SSC needs to be adapted to any other 8 or
16Bit µC which accesses the ESC via SPI.
PIC24
Activates the configuration for the Microchip PCI24HJ128GP306 µC
which is mounted on the EL9800 EtherCAT Evaluation board since
Revision 4A. This setting shall only active if define “EL9800_HW” is
also set.
PIC18
Activates the configuration for the Microchip PIC18F452 µC which is
mounted on the EL9800 EtherCAT Evaluation board, Revision 2. This
setting shall only active if define “EL9800_HW” is also set.
MCI_HW
Generic MCI implementation. Can be used if any kind of memory
interface face is used to access the ESC.
FC1100_HW
Specific hardware implementation for the FC1100 PCI EtherCAT slave
card from Beckhoff. Used on Win32 operating system.
CONTROLLER_16BIT
This setting shall be used if the slave code is built for a 16Bit µC.
CONTROLLER_32BIT
This setting shall be used if the slave code is built for a 32Bit µC.
ESC_16BIT_ACCESS
If this setting is set, then only 16Bit aligned accesses will be performed
on the ESC.
ESC_32BIT_ACCESS
If this setting is set, then only 32Bit aligned accesses will be performed
on the ESC.
MBX_16BIT_ACCESS
If this setting is set, then the slave code will only access mailbox data
16Bit aligned. If the mailbox data is copied to the local µC memory and
the define “CONTROLLER_16BIT” is set, then this define should also
be set.
BIG_ENDIAN_16BIT
These define needs to be set if the µC always accesses external
memory 16Bit wise. It works in big endian format and the switching of
Low Byte and High Byte is done in hardware.
BIG_ENDIAN_FORMAT
This setting shall be set if the µC works in big endian format.
The settings “EL9800_HW”, “PIC24”, “PIC18”, MCI_HW”, “FC1100_HW” are used to activate a
predefined hardware access implementation. An extract of platforms/ µC is listed in Table 2:
Recommended Hardware Configurations including the recommended settings. Some of the
configurations can also be selected if a new project is created with the SSC Tool (see comment). If
none of these settings are used, then user specific hardware access files need to be added to the