---
title: "The real EtherCAT Controller by Raspberry pi 4"
url: "https://maker.wiznet.io/WIZnet/projects/the-real-ethercat-controller-by-raspberry-pi-4/"
markdown_url: "https://maker.wiznet.io/WIZnet/projects/the-real-ethercat-controller-by-raspberry-pi-4/md"
type: "UCC: User Created Content"
author: "thanhtam-h"
author_url: "http://www.simplerobot.net/"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "thanhtam-h"
original_url: "http://www.simplerobot.net/"
published: "2023-02-07"
language: "en"
likes: 1
views: 597
comments: 1
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# The real EtherCAT Controller by Raspberry pi 4

> Raspberry pi 4 came with a built-in gigabit Ethernet controller, a big jump compared to its predecessors.

Original author: thanhtam-h (source: http://www.simplerobot.net/)

## Article

## **The key**

Raspberry pi 4 came with a built-in gigabit Ethernet controller, a big jump compared to its predecessors. PiCAT4 utilizes this invention and build real-time EtherCAT Master on the built-in Ethernet port. It provides faster and more reliable EtherCAT communication. Here are what the PiCAT4 has.

## **OS and kernel**

- 64-bit Debian OS (Raspberry Pi OS)

- 64-bit realtime kernel with Xenomai 3.1

- Better performance with low latency and jitter

- ROS enabled (optional)

## **The EtherCAT Master**

- IgH EtherCAT Master

- Real-time native driver for Broadcom genet network controller (built-in network of raspberry pi 4)

- Real-time driver model (RTDM) API

## **Compatible with Raspberry pi 4 B and Computer Module 4**

[![](https://1.bp.blogspot.com/-9ew0fctkJtY/YH1IGy46xyI/AAAAAAAABGU/2FR0fmSfBKAwI2HUyFnmWTX6NsBq9FS3ACLcBGAsYHQ/w279-h204/RASP_PI_4_B_8GB_01.png)](https://1.bp.blogspot.com/-9ew0fctkJtY/YH1IGy46xyI/AAAAAAAABGU/2FR0fmSfBKAwI2HUyFnmWTX6NsBq9FS3ACLcBGAsYHQ/s2048/RASP_PI_4_B_8GB_01.png)[![](https://1.bp.blogspot.com/-7PWA_1bMPpM/YH1IJCqCzUI/AAAAAAAABGY/XVBIbaoloHkeM_44buWlT80Im86AZ4bNgCLcBGAsYHQ/w299-h199/cm4.png)](https://1.bp.blogspot.com/-7PWA_1bMPpM/YH1IJCqCzUI/AAAAAAAABGY/XVBIbaoloHkeM_44buWlT80Im86AZ4bNgCLcBGAsYHQ/s407/cm4.png)

PiCAT4 works for both Raspberry Pi 4 Model B and Computer Module 4

## **EtherCAT Configuration UI tool**

- Web-based application

- Parsing slave information from ESI files

- Mapping/re-mapping slave PDO

- Json configuration file output

[![](https://1.bp.blogspot.com/-lkrns1EDl5c/YG6XFqSgX-I/AAAAAAAABFY/Q5ksPH5Uvbw2dudnqFAeEBGAUq8pAhNdwCLcBGAsYHQ/s16000/ecat_config.png)](https://1.bp.blogspot.com/-lkrns1EDl5c/YG6XFqSgX-I/AAAAAAAABFY/Q5ksPH5Uvbw2dudnqFAeEBGAUq8pAhNdwCLcBGAsYHQ/s1800/ecat_config.png)

## **Automatic code generation**

- Generate EtherCAT application in C/C++ language

- Realtime and non-realtime application options

- Generate code from json configuration file or by scanning actual bus

| [![](https://1.bp.blogspot.com/-BUUIuwz9zOE/YIVGLdeb4CI/AAAAAAAABG0/IIgVjyhUJyIxighCgrzzRpjihnnloH44gCLcBGAsYHQ/s16000/codeGen.PNG)](https://1.bp.blogspot.com/-BUUIuwz9zOE/YIVGLdeb4CI/AAAAAAAABG0/IIgVjyhUJyIxighCgrzzRpjihnnloH44gCLcBGAsYHQ/s1045/codeGen.PNG) |
| --- |
| Code generation tool |

## **PiCAT SDK**

- Development kit for PiCAT on Windows

- Eclipse IDE

- Aarch64 cross compiler

- Ported Xenomai and EtherCAT libraries

- Compatible with project output from code generation tool

| [![](https://1.bp.blogspot.com/-AgEt87YhVV4/YG6YOZAKd_I/AAAAAAAABFk/zMTJcytrJDcPDj2M7SO3Tp2-ijzehzWuwCPcBGAYYCw/s16000/eclipse_picat_sdk.PNG)](https://1.bp.blogspot.com/-AgEt87YhVV4/YG6YOZAKd_I/AAAAAAAABFk/zMTJcytrJDcPDj2M7SO3Tp2-ijzehzWuwCPcBGAYYCw/s947/eclipse_picat_sdk.PNG) |
| --- |
| Building a EtherCAT application in PiCAT SDK |

---

Source: https://maker.wiznet.io/WIZnet/projects/the-real-ethercat-controller-by-raspberry-pi-4/
