Porting instructions - Manual - PROFINET Driver

How to port PROFINET Driver

Portfolio
PROFINET Development Kits
Product
PROFINET Driver
Software version
v3.1.0
Edition
03/2024
Language
en-US (original)

Implementing a new PROFINET device driver

  1. Define one of the compile switches PSI_EDDS_CFG_HW_PACKET32, PSI_CFG_EDDS_AFPACKET, PSI_EDDI_CFG_SOC in the build configuration.
  2. Implement a PROFINET device driver with all the functions described above in this section
    1. For EDDS link the Packet32 lower layer table in the structure EPS_BOARD_EDDS_TYPE.
    2. For EDDI set the corresponding memory sections, start parameter etc. in the structure EPS_BOARD_EDDI_TYPE.
  3. Register/install the driver when EPS_APP_INSTALL_DRV_OPEN() is called.

  4. Set EDD dependent structures at EPS_PNDEV_OPEN_FCT (see section EPS_PNDEV_OPEN_FCT)

Sample

See one of the EPS drivers such as "eps_wpcapdrv@PNDriver Windows" or "eps_pndevdrv@PNDriver Linux" in section Integration of an EDDS lower layer implementation into PN Device Driver.

Note

If you use a SIEMENS Ethernet adapter such as SOC1 or PNDevDriver as the Ethernet device driver, physically contiguous host memory is needed for fetching and storing Ethernet frames from and into host RAM via DMA. The memory is used for acyclic frames (called NRT memory in PN Stack) and cyclic IO data frames (called CRT memory in PN Stack).

On most OSes like Linux or Windows, this kind of memory can be allocated only with prioritized access level, e. g. in kernel space. For example, in PN Driver CP1625 Host example implementation, EPS solves this problem by using the kernel-mode driver PNDevDriver. The kernel-mode driver is called in the PN Device Driver. See \pn_run\src\pnboards\eps\epssys\src\eps_pndevdrv.c.

On an embedded system where the systems integrator designs the memory layout, this memory can be set to a static region in the RAM using a linker file and linker symbols.