本文介绍了如何将IGH EtherCAT主站移植到米尔NXP i.MX 91开发板上并运行。
https://bbs.elecfans.com/jishu_2499768_1_1.html

米尔基于NXP i.MX91的核心板及开发板,搭载新一代入门级NXP i.MX91处理器,内核Cortex-A55,主频高达1.4 GHz ;支持 LPDDR4 增强可靠性和平台寿命,支持双千兆以太网和双 USB 端口等丰富外设。
一、项目介绍
前面我们介绍了怎么让开发板运行在高实时性的系统环境下,让它满足工业自动化、汽车电子应用要求;米尔NXP i.MX91开发板上面集成了2路RGMII千兆以太网接口,我们可以用它来运行工业以太网通信应用。
二、IGH EtherCAT移植
1. 拉取开源IGH EtherCAT仓库
gitclonehttps://gitlab.com/etherlab.org/ethercat.gitcdethercatsource~/myd-lmx91-toolchain/environment-setup-armv8a-poky-linux
2. 配置用户空间程序
# 运行bootstrap脚本./bootstrap# 配置用户空间程序./configure \ --host=aarch64-poky-linux \ --with-linux-dir=/home/hywing/workspace/myir-imx-linux \ --enable-8139too=no \ --enable-e100=no \ --enable-e1000=no \ --enable-e1000e=no \ --enable-igb=no \ --enable-usb=no \ --enable-generic=yes \ --enable-cycles=yes \ --enable-tool=yes \ --enable-script=yes \ --enable-rtdm=no \ --prefix=/usr/local
3. 编译驱动模块
# 编译主驱动模块:ec_generic.kocd../mastermake -C /home/hywing/workspace/myir-imx-linux M=$(pwd) modules
# 编译通用驱动模块:ec_master.kocd../devicesmake -C /home/hywing/workspace/myir-imx-linux M=$(pwd) modules
4. 安装验证
ethercatlibethercat.solibethercat.aec_generic.koec_master.koethercat.conf
三、EtherCAT配置
1. 网卡配置 :/etc/ethercat.conf。
MASTER0_DEVICE="eth0"MASTER0_BACKUP_DEVICE="eth1"MASTER0_BACKUP="eth1"MASTER0_UPDATE_MS="1"MASTER0_VIRTUAL="no"
2.装载驱动
# 加载主驱动模块sudomodprobe ec_master# 加载通用驱动模块sudo modprobe ec_generic
3.设置开发板为主站状态
./ethercat master
4.获取ESC从站配置信息
从站的配置信息跟上面是一致的,说明EtherCAT通信成功了
四、测试
1. 命令行使能ESC从站LED亮灭。
whiletrue; do ethercat cstruct0x70100x000x000x000x02; sleep0.5; ethercat cstruct0x70100x000x000x000x00; sleep0.5; done;
-
开发板
+关注
关注
25文章
5856浏览量
107721 -
ethercat
+关注
关注
19文章
1208浏览量
40553 -
米尔电子
+关注
关注
1文章
161浏览量
867
发布评论请先 登录
基于全志T507-H的Igh EtherCAT主站案例分享
米尔NXP i.MX 91核心板发布,助力新一代入门级Linux应用开发
【米尔NXP i.MX 91开发板评测】移植运行IGH EtherCAT主站
【TQi.MX6UL试用申请】基于I.MX 6UL的EtherCAT从站的设计
开源!ZYNQ IgH EtherCAT主站方案分享
NXP开发板有哪些?基于NXP i.MX 6UL、i.MX 8M Mini、i.MX 8M Plus、LS1028A的开发板概述

i.MX Linux开发实战指南—基于野火i.MX系列开发板
NXP i.MX 93 开发板#提供高效的机器学习 支持高能效的边缘计算

评论