[etherlab-dev] EtherCAT-Master on ARM9 using RTAI/Xenomai

Stefan Schramm stefan.schramm at imms.de
Wed Nov 11 18:07:16 CET 2009


I tried running the master on an AT91 CPU using RTAI or Xenomai. The 
system freezes after the RT task was started. If I used the normal Linux 
timers it worked. The reason is that the macros for reading an writing 
the EC datagrams defined in ecrt.h (e.g. EC_WRITE_U16) may result to 
unaligned memory access. On ARM CPUs this causes an exception, which 
normally is catched by the Linux kernel. This does not work with RTAI or 

I attached a patch which solves the problem. If the master is running on 
an ARM CPU I changed the macros. 16, 32 and 64 bit operations are 
splitted in multiple 8 bit accesses.

I tested it with kernel and RTAI 3.7. and with kernel 
using Xenomai

Best regards

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ethercat-devel-dbc617badc33-arm.patch.gz
Type: application/x-gzip
Size: 902 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-dev/attachments/20091111/0c89fb2b/attachment-0003.bin>

More information about the Etherlab-dev mailing list