<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.emacinc.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mwelling</id>
	<title>wiki.emacinc.com - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.emacinc.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mwelling"/>
	<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/wiki/Special:Contributions/Mwelling"/>
	<updated>2026-04-05T19:12:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5379</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5379"/>
		<updated>2016-03-10T00:24:03Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| Complete (03.03.2016-13:06-&amp;gt;MW+)(03.09.2016-09:50-&amp;gt;KY+)|Michael Welling| project=OE 5.0,MW,MG,KY,Complete }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached from the interface before loading the real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target, the &amp;lt;code&amp;gt;fec&amp;lt;/code&amp;gt; device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script to make launching &amp;lt;code&amp;gt;rtnet&amp;lt;/code&amp;gt; easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start&lt;br /&gt;
[  645.330848] initializing loopback...&lt;br /&gt;
[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol&lt;br /&gt;
[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism&lt;br /&gt;
[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;br /&gt;
[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;rtnet&amp;lt;/code&amp;gt; helper script is configured with &amp;lt;code&amp;gt;/etc/rtnet.conf&amp;lt;/code&amp;gt; which determines the IP address of the interface and the slave devices.&lt;br /&gt;
The real-time driver is also specified in the configuration file so that it does not need to be loaded before starting the script, but the Linux driver still must be disassociated with the interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing RTNet driver ===&lt;br /&gt;
&lt;br /&gt;
Xenomai provides real-time versions of the basic networking utilities including &amp;lt;code&amp;gt;rtifconfig&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rtping&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rtroute&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rtiwconfig&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtifconfig&lt;br /&gt;
 rteth0    Medium: Ethernet  Hardware address: 00:00:00:00:00:00&lt;br /&gt;
          IP address: 127.0.0.2  Broadcast address: 127.255.255.255&lt;br /&gt;
          UP BROADCAST RUNNING  MTU: 1500&lt;br /&gt;
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:164476 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 &lt;br /&gt;
          RX bytes:896 (896.0 b)  TX bytes:7031954 (6.7 Mb)&lt;br /&gt;
&lt;br /&gt;
rtlo      Medium: Local Loopback&lt;br /&gt;
          IP address: 127.0.0.1  &lt;br /&gt;
          UP LOOPBACK RUNNING  MTU: 1500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtroute&lt;br /&gt;
Host Routing Table&lt;br /&gt;
Hash    Destination     HW Address              Device&lt;br /&gt;
00      0.0.0.0         00:00:00:00:00:00       rtlo&lt;br /&gt;
01      127.0.0.1       00:00:00:00:00:00       rtlo&lt;br /&gt;
02      127.0.0.2       00:00:00:00:00:00       rtlo&lt;br /&gt;
3F      127.255.255.255 FF:FF:FF:FF:FF:FF       rteth0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtping 127.0.0.1&lt;br /&gt;
Real-time PING 127.0.0.1 56(84) bytes of data.&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=1 time=25.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=2 time=20.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=3 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=4 time=17.0 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=5 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=6 time=18.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=7 time=17.0 us&lt;br /&gt;
^C&lt;br /&gt;
--- 127.0.0.1 rtping statistics ---&lt;br /&gt;
7 packets transmitted, 7 received, 0% packet loss&lt;br /&gt;
worst case rtt = 25.7 us&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5374</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5374"/>
		<updated>2016-03-07T20:27:51Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start&lt;br /&gt;
[  645.330848] initializing loopback...&lt;br /&gt;
[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol&lt;br /&gt;
[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism&lt;br /&gt;
[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;br /&gt;
[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices.&lt;br /&gt;
The real-time driver is also specified in the configuration file so that it does not need to be loaded before starting the script but the Linux driver still must be disassociated with the interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing RTNet driver ===&lt;br /&gt;
&lt;br /&gt;
Xenomai provide real-time versions of the basic networking utilities including rtifconfig, rtping, rtroute and rtiwconfig.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtifconfig&lt;br /&gt;
 rteth0    Medium: Ethernet  Hardware address: 00:00:00:00:00:00&lt;br /&gt;
          IP address: 127.0.0.2  Broadcast address: 127.255.255.255&lt;br /&gt;
          UP BROADCAST RUNNING  MTU: 1500&lt;br /&gt;
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:164476 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 &lt;br /&gt;
          RX bytes:896 (896.0 b)  TX bytes:7031954 (6.7 Mb)&lt;br /&gt;
&lt;br /&gt;
rtlo      Medium: Local Loopback&lt;br /&gt;
          IP address: 127.0.0.1  &lt;br /&gt;
          UP LOOPBACK RUNNING  MTU: 1500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtroute&lt;br /&gt;
Host Routing Table&lt;br /&gt;
Hash    Destination     HW Address              Device&lt;br /&gt;
00      0.0.0.0         00:00:00:00:00:00       rtlo&lt;br /&gt;
01      127.0.0.1       00:00:00:00:00:00       rtlo&lt;br /&gt;
02      127.0.0.2       00:00:00:00:00:00       rtlo&lt;br /&gt;
3F      127.255.255.255 FF:FF:FF:FF:FF:FF       rteth0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtping 127.0.0.1&lt;br /&gt;
Real-time PING 127.0.0.1 56(84) bytes of data.&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=1 time=25.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=2 time=20.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=3 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=4 time=17.0 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=5 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=6 time=18.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=7 time=17.0 us&lt;br /&gt;
^C&lt;br /&gt;
--- 127.0.0.1 rtping statistics ---&lt;br /&gt;
7 packets transmitted, 7 received, 0% packet loss&lt;br /&gt;
worst case rtt = 25.7 us&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5373</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5373"/>
		<updated>2016-03-07T20:26:23Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start&lt;br /&gt;
[  645.330848] initializing loopback...&lt;br /&gt;
[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol&lt;br /&gt;
[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism&lt;br /&gt;
[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;br /&gt;
[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices.&lt;br /&gt;
The real-time driver is also specified in the configuration file so that it does not need to be loaded before starting the script but the Linux driver still must be disassociated with the interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing RTNet driver ===&lt;br /&gt;
&lt;br /&gt;
Xenomai provide real-time versions of the basic networking utilities including rtifconfig, rtping, rtroute and rtiwconfig.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtifconfig&lt;br /&gt;
 rteth0    Medium: Ethernet  Hardware address: 00:00:00:00:00:00&lt;br /&gt;
          IP address: 127.0.0.2  Broadcast address: 127.255.255.255&lt;br /&gt;
          UP BROADCAST RUNNING  MTU: 1500&lt;br /&gt;
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:164476 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 &lt;br /&gt;
          RX bytes:896 (896.0 b)  TX bytes:7031954 (6.7 Mb)&lt;br /&gt;
&lt;br /&gt;
rtlo      Medium: Local Loopback&lt;br /&gt;
          IP address: 127.0.0.1  &lt;br /&gt;
          UP LOOPBACK RUNNING  MTU: 1500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;root@somimx6-xenomai:~# rtrouteHost Routing TableHash    Destination     HW Address              Device00      0.0.0.0         00:00:00:00:00:00       rtlo01      127.0.0.1       00:00:00:00:00:00       rtlo02      127.0.0.2       00:00:00:00:00:00       rtlo3F      127.255.255.255 FF:FF:FF:FF:FF:FF       rteth0&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtping 127.0.0.1&lt;br /&gt;
Real-time PING 127.0.0.1 56(84) bytes of data.&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=1 time=25.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=2 time=20.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=3 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=4 time=17.0 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=5 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=6 time=18.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=7 time=17.0 us&lt;br /&gt;
^C&lt;br /&gt;
--- 127.0.0.1 rtping statistics ---&lt;br /&gt;
7 packets transmitted, 7 received, 0% packet loss&lt;br /&gt;
worst case rtt = 25.7 us&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5372</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5372"/>
		<updated>2016-03-07T20:24:58Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start&lt;br /&gt;
[  645.330848] initializing loopback...&lt;br /&gt;
[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol&lt;br /&gt;
[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism&lt;br /&gt;
[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;br /&gt;
[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices.&lt;br /&gt;
The real-time driver is also specified in the configuration file so that it does not need to be loaded before starting the script but the Linux driver still must be disassociated with the interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing RTNet driver ===&lt;br /&gt;
&lt;br /&gt;
Xenomai provide real-time versions of the basic networking utilities including rtifconfig, rtping, rtroute and rtiwconfig.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtifconfig&lt;br /&gt;
 rteth0    Medium: Ethernet  Hardware address: 00:00:00:00:00:00&lt;br /&gt;
          IP address: 10.0.0.1  Broadcast address: 10.255.255.255&lt;br /&gt;
          UP BROADCAST RUNNING  MTU: 1500&lt;br /&gt;
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:164476 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 &lt;br /&gt;
          RX bytes:896 (896.0 b)  TX bytes:7031954 (6.7 Mb)&lt;br /&gt;
&lt;br /&gt;
rtlo      Medium: Local Loopback&lt;br /&gt;
          IP address: 127.0.0.1  &lt;br /&gt;
          UP LOOPBACK RUNNING  MTU: 1500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtping 127.0.0.1&lt;br /&gt;
Real-time PING 127.0.0.1 56(84) bytes of data.&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=1 time=25.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=2 time=20.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=3 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=4 time=17.0 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=5 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=6 time=18.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=7 time=17.0 us&lt;br /&gt;
^C&lt;br /&gt;
--- 127.0.0.1 rtping statistics ---&lt;br /&gt;
7 packets transmitted, 7 received, 0% packet loss&lt;br /&gt;
worst case rtt = 25.7 us&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtroute&lt;br /&gt;
Host Routing Table&lt;br /&gt;
Hash    Destination     HW Address              Device&lt;br /&gt;
00      0.0.0.0         00:00:00:00:00:00       rtlo&lt;br /&gt;
01      127.0.0.1       00:00:00:00:00:00       rtlo&lt;br /&gt;
02      127.0.0.2       00:00:00:00:00:00       rtlo&lt;br /&gt;
3F      127.255.255.255 FF:FF:FF:FF:FF:FF       rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5371</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5371"/>
		<updated>2016-03-07T20:23:39Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start&lt;br /&gt;
[  645.330848] initializing loopback...&lt;br /&gt;
[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol&lt;br /&gt;
[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism&lt;br /&gt;
[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;br /&gt;
[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices.&lt;br /&gt;
The real-time driver is also specified in the configuration file so that it does not need to be loaded before starting the script but the Linux driver still must be disassociated with the interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing RTNet driver ===&lt;br /&gt;
&lt;br /&gt;
Xenomai provide real-time versions of the basic networking utilities including rtifconfig, rtping, rtroute and rtiwconfig.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtifconfig&lt;br /&gt;
 rteth0    Medium: Ethernet  Hardware address: 00:00:00:00:00:00&lt;br /&gt;
          IP address: 10.0.0.1  Broadcast address: 10.255.255.255&lt;br /&gt;
          UP BROADCAST RUNNING  MTU: 1500&lt;br /&gt;
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:164476 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 &lt;br /&gt;
          RX bytes:896 (896.0 b)  TX bytes:7031954 (6.7 Mb)&lt;br /&gt;
&lt;br /&gt;
rtlo      Medium: Local Loopback&lt;br /&gt;
          IP address: 127.0.0.1  &lt;br /&gt;
          UP LOOPBACK RUNNING  MTU: 1500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtping 127.0.0.1&lt;br /&gt;
Real-time PING 127.0.0.1 56(84) bytes of data.&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=1 time=25.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=2 time=20.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=3 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=4 time=17.0 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=5 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=6 time=18.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=7 time=17.0 us&lt;br /&gt;
^C&lt;br /&gt;
--- 127.0.0.1 rtping statistics ---&lt;br /&gt;
7 packets transmitted, 7 received, 0% packet loss&lt;br /&gt;
worst case rtt = 25.7 us&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5370</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5370"/>
		<updated>2016-03-07T20:23:10Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start&lt;br /&gt;
[  645.330848] initializing loopback...&lt;br /&gt;
[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol&lt;br /&gt;
[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism&lt;br /&gt;
[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;br /&gt;
[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices.&lt;br /&gt;
The real-time driver is also specified in the configuration file so that it does not need to be loaded before starting the script but the Linux driver still must be disassociated with the interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing RTNet driver ===&lt;br /&gt;
&lt;br /&gt;
Xenomai provide real-time versions of the basic networking utilities including rtifconfig, rtping, rtroute and rtiwconfig.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/# rtifconfig&lt;br /&gt;
 rteth0    Medium: Ethernet  Hardware address: 00:00:00:00:00:00&lt;br /&gt;
          IP address: 10.0.0.1  Broadcast address: 10.255.255.255&lt;br /&gt;
          UP BROADCAST RUNNING  MTU: 1500&lt;br /&gt;
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:164476 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 &lt;br /&gt;
          RX bytes:896 (896.0 b)  TX bytes:7031954 (6.7 Mb)&lt;br /&gt;
&lt;br /&gt;
rtlo      Medium: Local Loopback&lt;br /&gt;
          IP address: 127.0.0.1  &lt;br /&gt;
          UP LOOPBACK RUNNING  MTU: 1500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtping 127.0.0.1&lt;br /&gt;
Real-time PING 127.0.0.1 56(84) bytes of data.&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=1 time=25.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=2 time=20.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=3 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=4 time=17.0 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=5 time=17.3 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=6 time=18.7 us&lt;br /&gt;
64 bytes from 127.0.0.1: icmp_seq=7 time=17.0 us&lt;br /&gt;
^C&lt;br /&gt;
--- 127.0.0.1 rtping statistics ---&lt;br /&gt;
7 packets transmitted, 7 received, 0% packet loss&lt;br /&gt;
worst case rtt = 25.7 us&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5369</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5369"/>
		<updated>2016-03-07T18:34:16Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start&lt;br /&gt;
[  645.330848] initializing loopback...&lt;br /&gt;
[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol&lt;br /&gt;
[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism&lt;br /&gt;
[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;br /&gt;
[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices.&lt;br /&gt;
The real-time driver is also specified in the configuration file so that it does not need to be loaded before starting the script but the Linux driver still must be disassociated with the interface.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessing RTNet driver ===&lt;br /&gt;
&lt;br /&gt;
Xenomai provide real-time versions of the basic networking utilities including rtifconfig, rtping, rtroute and rtiwconfig.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/# rtifconfig&lt;br /&gt;
 rteth0    Medium: Ethernet  Hardware address: 00:00:00:00:00:00&lt;br /&gt;
          IP address: 10.0.0.1  Broadcast address: 10.255.255.255&lt;br /&gt;
          UP BROADCAST RUNNING  MTU: 1500&lt;br /&gt;
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:164476 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 &lt;br /&gt;
          RX bytes:896 (896.0 b)  TX bytes:7031954 (6.7 Mb)&lt;br /&gt;
&lt;br /&gt;
rtlo      Medium: Local Loopback&lt;br /&gt;
          IP address: 127.0.0.1  &lt;br /&gt;
          UP LOOPBACK RUNNING  MTU: 1500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5368</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5368"/>
		<updated>2016-03-07T18:10:07Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start&lt;br /&gt;
[  645.330848] initializing loopback...&lt;br /&gt;
[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol&lt;br /&gt;
[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism&lt;br /&gt;
[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;br /&gt;
[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/# rtifconfig&lt;br /&gt;
 rteth0    Medium: Ethernet  Hardware address: 00:00:00:00:00:00&lt;br /&gt;
          IP address: 10.0.0.1  Broadcast address: 10.255.255.255&lt;br /&gt;
          UP BROADCAST RUNNING  MTU: 1500&lt;br /&gt;
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:164476 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 &lt;br /&gt;
          RX bytes:896 (896.0 b)  TX bytes:7031954 (6.7 Mb)&lt;br /&gt;
&lt;br /&gt;
rtlo      Medium: Local Loopback&lt;br /&gt;
          IP address: 127.0.0.1  &lt;br /&gt;
          UP LOOPBACK RUNNING  MTU: 1500&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5367</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5367"/>
		<updated>2016-03-07T18:08:36Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start&lt;br /&gt;
[  645.330848] initializing loopback...&lt;br /&gt;
[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol&lt;br /&gt;
[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism&lt;br /&gt;
[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)&lt;br /&gt;
[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5366</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5366"/>
		<updated>2016-03-07T18:05:29Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
=== Loading a RTNet driver ===&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/# rtnet start[  645.330848] initializing loopback...[  645.334487] RTnet: registered rtlo[  645.355662] RTcfg: init real-time configuration distribution protocol[  645.375986] RTmac: init realtime media access control[  645.400419] RTmac/TDMA: init time division multiple access control mechanism[  645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)[  645.551954] rteth0: tx link down!.&lt;br /&gt;
...&lt;br /&gt;
[  652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }}&lt;br /&gt;
&lt;br /&gt;
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interfaces and the slave devices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5365</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5365"/>
		<updated>2016-03-07T17:51:07Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbinding the Linux fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5364</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5364"/>
		<updated>2016-03-07T17:50:10Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec Ethernet must be unbund from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind&lt;br /&gt;
[   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbind the fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5363</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5363"/>
		<updated>2016-03-07T17:49:42Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec Ethernet must be unbund from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind                                                                                                                                                       [   86.762295] libphy: fec_enet_mii_bus: probed&lt;br /&gt;
[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbind the fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5362</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5362"/>
		<updated>2016-03-07T17:49:09Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec Ethernet must be unbund from the Linux driver and attached to the real-time driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/fec/unbind &lt;br /&gt;
root@somimx6-xenomai:~# echo 2188000.ethernet &amp;gt; /sys/bus/platform/drivers/rt_fec/bind                                                                                                                                                       [   86.762295] libphy: fec_enet_mii_bus: probed[   86.766586] RTnet: registered rteth0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{mbox | type= | text='''Note:''' The warning posted about the clock when unbind the fec driver can be ignored. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5361</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5361"/>
		<updated>2016-03-07T17:37:00Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&lt;br /&gt;
For example on IMX6 target the fec Ethernet driver must be removed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rmmod fec&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux driver is out of the way the real-time driver can be loaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5360</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5360"/>
		<updated>2016-03-07T17:33:29Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* http://www.rtnet.org/&lt;br /&gt;
* https://xenomai.org/rtnet/&lt;br /&gt;
* https://xenomai.org//rtnet-howto/&lt;br /&gt;
* https://xenomai.org/rtnet-installation/&lt;br /&gt;
* https://xenomai.org/rtnet-programming/&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5359</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5359"/>
		<updated>2016-03-07T17:25:18Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP).&lt;br /&gt;
Xenomai provides several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5358</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5358"/>
		<updated>2016-03-07T17:22:44Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
Xenomai use the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of UDP/IP, TCP/IP, IMCP, and ARP.&lt;br /&gt;
RTnet provides a posix API for the Xenomai real-time user-space. Xenomai provide several real-time Ethernet drivers, the stack, and various tools.&lt;br /&gt;
This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information&lt;br /&gt;
as well as discuss programming using the RTnet stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5357</id>
		<title>Xenomai RTNet</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTNet&amp;diff=5357"/>
		<updated>2016-03-07T16:55:25Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:06-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTNet&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTNet&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /***************************************** Background Information ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:bg | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTNet | desc=Xenomai RTNet | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5356</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5356"/>
		<updated>2016-03-04T22:09:56Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
All of the examples below are using SoM-iMX6 for reference.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux CAN driver is unloaded the Xenomai real-time CAN driver can be loaded.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_can_flexcan&lt;br /&gt;
[  662.498586] RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team&lt;br /&gt;
[  662.509318] 2090000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.516398] rtcan: registered rtcan0&lt;br /&gt;
[  662.520047] flexcan 2090000.flexcan: RTCAN device registered (reg_base=c0c70000, irq=142, clock=30000000)&lt;br /&gt;
[  662.529809] 2094000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.536881] rtcan: registered rtcan1&lt;br /&gt;
[  662.540504] flexcan 2094000.flexcan: RTCAN device registered (reg_base=c0c78000, irq=143, clock=30000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=== Configuring CAN interface ===&lt;br /&gt;
With the real-time CAN driver loaded the &amp;lt;code&amp;gt;rtcanconfig&amp;lt;/code&amp;gt; utility can be used to configure the bitrate and modes.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcanconfig rtcan0 --baudrate=125000 start&lt;br /&gt;
[  706.101002] rtcan0: real bitrate 125000, sampling point 87.5%&lt;br /&gt;
[  706.106857] rtcan0: writing ctrl=0x0e312005&lt;br /&gt;
[  706.111091] rtcan0: flexcan_set_bit_time: mcr=0x5980000f ctrl=0x0e312005&lt;br /&gt;
[  706.117801] rtcan0: flexcan_chip_start: writing mcr=0x79a2020f&lt;br /&gt;
[  706.123511] rtcan0: flexcan_chip_start: writing ctrl=0x0e31ac55&lt;br /&gt;
[  706.129581] rtcan0: flexcan_chip_start: reading mcr=0x69a2020f ctrl=0x0e31ac55&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Communicating with CAN ===&lt;br /&gt;
Xenomai provides two command line utilities to communicate with the CAN interface: &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sending a CAN transaction using &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcansend rtcan0 -v -i 0x0 0x82 0x1&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;0x000&amp;gt; [2] 82 01&lt;br /&gt;
Cleaning up...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Receiving a CAN transaction using &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcanrecv rtcan0 -v&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/man1/rtcanconfig/index.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/man1/rtcanrecv/index.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/man1/rtcansend/index.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__can.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5355</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5355"/>
		<updated>2016-03-04T22:09:10Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
All of the examples below are using SoM-iMX6 for reference.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux CAN driver is unloaded the Xenomai real-time CAN driver can be loaded.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_can_flexcan&lt;br /&gt;
[  662.498586] RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team&lt;br /&gt;
[  662.509318] 2090000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.516398] rtcan: registered rtcan0&lt;br /&gt;
[  662.520047] flexcan 2090000.flexcan: RTCAN device registered (reg_base=c0c70000, irq=142, clock=30000000)&lt;br /&gt;
[  662.529809] 2094000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.536881] rtcan: registered rtcan1&lt;br /&gt;
[  662.540504] flexcan 2094000.flexcan: RTCAN device registered (reg_base=c0c78000, irq=143, clock=30000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=== Configuring CAN interface ===&lt;br /&gt;
With the real-time CAN driver loaded the &amp;lt;code&amp;gt;rtcanconfig&amp;lt;/code&amp;gt; utility can be used to configure the bitrate and modes.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcanconfig rtcan0 --baudrate=125000 start&lt;br /&gt;
[  706.101002] rtcan0: real bitrate 125000, sampling point 87.5%&lt;br /&gt;
[  706.106857] rtcan0: writing ctrl=0x0e312005&lt;br /&gt;
[  706.111091] rtcan0: flexcan_set_bit_time: mcr=0x5980000f ctrl=0x0e312005&lt;br /&gt;
[  706.117801] rtcan0: flexcan_chip_start: writing mcr=0x79a2020f&lt;br /&gt;
[  706.123511] rtcan0: flexcan_chip_start: writing ctrl=0x0e31ac55&lt;br /&gt;
[  706.129581] rtcan0: flexcan_chip_start: reading mcr=0x69a2020f ctrl=0x0e31ac55&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Communicating with CAN ===&lt;br /&gt;
Xenomai provides two command line utilities to communicate with the CAN interface: &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sending a CAN transaction using &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcansend rtcan0 -v -i 0x0 0x82 0x1&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;0x000&amp;gt; [2] 82 01&lt;br /&gt;
Cleaning up...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Receiving a CAN transaction using &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcanrecv rtcan0 -v&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/man1/rtcanconfig/index.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/man1/rtcanrecv/index.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/man1/rtcansend/index.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__can.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5354</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5354"/>
		<updated>2016-03-04T22:07:57Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux CAN driver is unloaded the Xenomai real-time CAN driver can be loaded.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_can_flexcan&lt;br /&gt;
[  662.498586] RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team&lt;br /&gt;
[  662.509318] 2090000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.516398] rtcan: registered rtcan0&lt;br /&gt;
[  662.520047] flexcan 2090000.flexcan: RTCAN device registered (reg_base=c0c70000, irq=142, clock=30000000)&lt;br /&gt;
[  662.529809] 2094000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.536881] rtcan: registered rtcan1&lt;br /&gt;
[  662.540504] flexcan 2094000.flexcan: RTCAN device registered (reg_base=c0c78000, irq=143, clock=30000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=== Configuring CAN interface ===&lt;br /&gt;
With the real-time CAN driver loaded the &amp;lt;code&amp;gt;rtcanconfig&amp;lt;/code&amp;gt; utility can be used to configure the bitrate and modes.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcanconfig rtcan0 --baudrate=125000 start&lt;br /&gt;
[  706.101002] rtcan0: real bitrate 125000, sampling point 87.5%&lt;br /&gt;
[  706.106857] rtcan0: writing ctrl=0x0e312005&lt;br /&gt;
[  706.111091] rtcan0: flexcan_set_bit_time: mcr=0x5980000f ctrl=0x0e312005&lt;br /&gt;
[  706.117801] rtcan0: flexcan_chip_start: writing mcr=0x79a2020f&lt;br /&gt;
[  706.123511] rtcan0: flexcan_chip_start: writing ctrl=0x0e31ac55&lt;br /&gt;
[  706.129581] rtcan0: flexcan_chip_start: reading mcr=0x69a2020f ctrl=0x0e31ac55&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Communicating with CAN ===&lt;br /&gt;
Xenomai provides two command line utilities to communicate with the CAN interface: &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sending a CAN transaction using &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcansend rtcan0 -v -i 0x0 0x82 0x1&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;0x000&amp;gt; [2] 82 01&lt;br /&gt;
Cleaning up...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Receiving a CAN transaction using &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcanrecv rtcan0 -v&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/man1/rtcanconfig/index.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/man1/rtcanrecv/index.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/man1/rtcansend/index.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__can.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5353</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5353"/>
		<updated>2016-03-04T22:04:53Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux CAN driver is unloaded the Xenomai real-time CAN driver can be loaded.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_can_flexcan&lt;br /&gt;
[  662.498586] RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team&lt;br /&gt;
[  662.509318] 2090000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.516398] rtcan: registered rtcan0&lt;br /&gt;
[  662.520047] flexcan 2090000.flexcan: RTCAN device registered (reg_base=c0c70000, irq=142, clock=30000000)&lt;br /&gt;
[  662.529809] 2094000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.536881] rtcan: registered rtcan1&lt;br /&gt;
[  662.540504] flexcan 2094000.flexcan: RTCAN device registered (reg_base=c0c78000, irq=143, clock=30000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=== Configuring CAN interface ===&lt;br /&gt;
With the real-time CAN driver loaded the &amp;lt;code&amp;gt;rtcanconfig&amp;lt;/code&amp;gt; utility can be used to configure the bitrate and modes.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcanconfig rtcan0 --baudrate=125000 start&lt;br /&gt;
[  706.101002] rtcan0: real bitrate 125000, sampling point 87.5%&lt;br /&gt;
[  706.106857] rtcan0: writing ctrl=0x0e312005&lt;br /&gt;
[  706.111091] rtcan0: flexcan_set_bit_time: mcr=0x5980000f ctrl=0x0e312005&lt;br /&gt;
[  706.117801] rtcan0: flexcan_chip_start: writing mcr=0x79a2020f&lt;br /&gt;
[  706.123511] rtcan0: flexcan_chip_start: writing ctrl=0x0e31ac55&lt;br /&gt;
[  706.129581] rtcan0: flexcan_chip_start: reading mcr=0x69a2020f ctrl=0x0e31ac55&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Communicating with CAN ===&lt;br /&gt;
Xenomai provides two command line utilities to communicate with the CAN interface: &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sending a CAN transaction using &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcansend rtcan0 -v -i 0x0 0x82 0x1&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;0x000&amp;gt; [2] 82 01&lt;br /&gt;
Cleaning up...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Receiving a CAN transaction using &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcanrecv rtcan0 -v&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5352</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5352"/>
		<updated>2016-03-04T22:04:23Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux CAN driver is unloaded the Xenomai real-time CAN driver can be loaded.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_can_flexcan&lt;br /&gt;
[  662.498586] RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team&lt;br /&gt;
[  662.509318] 2090000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.516398] rtcan: registered rtcan0&lt;br /&gt;
[  662.520047] flexcan 2090000.flexcan: RTCAN device registered (reg_base=c0c70000, irq=142, clock=30000000)&lt;br /&gt;
[  662.529809] 2094000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.536881] rtcan: registered rtcan1&lt;br /&gt;
[  662.540504] flexcan 2094000.flexcan: RTCAN device registered (reg_base=c0c78000, irq=143, clock=30000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=== Configuring CAN interface ===&lt;br /&gt;
With the real-time CAN driver loaded the &amp;lt;code&amp;gt;rtcanconfig&amp;lt;/code&amp;gt; utility can be used to configure the bitrate and modes.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/usr/demo# rtcanconfig rtcan0 --baudrate=125000 start&lt;br /&gt;
[  706.101002] rtcan0: real bitrate 125000, sampling point 87.5%&lt;br /&gt;
[  706.106857] rtcan0: writing ctrl=0x0e312005&lt;br /&gt;
[  706.111091] rtcan0: flexcan_set_bit_time: mcr=0x5980000f ctrl=0x0e312005&lt;br /&gt;
[  706.117801] rtcan0: flexcan_chip_start: writing mcr=0x79a2020f&lt;br /&gt;
[  706.123511] rtcan0: flexcan_chip_start: writing ctrl=0x0e31ac55&lt;br /&gt;
[  706.129581] rtcan0: flexcan_chip_start: reading mcr=0x69a2020f ctrl=0x0e31ac55&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Communicating with CAN ===&lt;br /&gt;
Xenomai provides two command line utilities to communicate with the CAN interface: &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sending a CAN transaction using &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/usr/demo# rtcansend rtcan0 -v -i 0x0 0x82 0x1&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;0x000&amp;gt; [2] 82 01&lt;br /&gt;
Cleaning up...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Receiving a CAN transaction using &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# rtcanrecv rtcan0 -v&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5351</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5351"/>
		<updated>2016-03-04T21:51:49Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux CAN driver is unloaded the Xenomai real-time CAN driver can be loaded.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_can_flexcan&lt;br /&gt;
[  662.498586] RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team&lt;br /&gt;
[  662.509318] 2090000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.516398] rtcan: registered rtcan0&lt;br /&gt;
[  662.520047] flexcan 2090000.flexcan: RTCAN device registered (reg_base=c0c70000, irq=142, clock=30000000)&lt;br /&gt;
[  662.529809] 2094000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.536881] rtcan: registered rtcan1&lt;br /&gt;
[  662.540504] flexcan 2094000.flexcan: RTCAN device registered (reg_base=c0c78000, irq=143, clock=30000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=== Configuring CAN interface ===&lt;br /&gt;
With the real-time CAN driver loaded the &amp;lt;code&amp;gt;rtcanconfig&amp;lt;/code&amp;gt; utility can be used to configure the bitrate and modes.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/usr/demo# rtcanconfig rtcan0 --baudrate=125000 start&lt;br /&gt;
[  706.101002] rtcan0: real bitrate 125000, sampling point 87.5%&lt;br /&gt;
[  706.106857] rtcan0: writing ctrl=0x0e312005&lt;br /&gt;
[  706.111091] rtcan0: flexcan_set_bit_time: mcr=0x5980000f ctrl=0x0e312005&lt;br /&gt;
[  706.117801] rtcan0: flexcan_chip_start: writing mcr=0x79a2020f&lt;br /&gt;
[  706.123511] rtcan0: flexcan_chip_start: writing ctrl=0x0e31ac55&lt;br /&gt;
[  706.129581] rtcan0: flexcan_chip_start: reading mcr=0x69a2020f ctrl=0x0e31ac55&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Communicating with CAN ===&lt;br /&gt;
Xenomai provides two command line utilities to communicate with the CAN interface: &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sending a CAN transaction using &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/usr/demo# rtcansend rtcan0 -v -i 0x0 0x82 0x1&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;0x000&amp;gt; [2] 82 01&lt;br /&gt;
Cleaning up...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Sending a CAN transaction using &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/usr/demo# rtcansend rtcan0 -v -i 0x0 0x82 0x1&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;0x000&amp;gt; [2] 82 01&lt;br /&gt;
Cleaning up...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5350</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5350"/>
		<updated>2016-03-04T21:48:44Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux CAN driver is unloaded the Xenomai real-time CAN driver can be loaded.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_can_flexcan&lt;br /&gt;
[  662.498586] RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team&lt;br /&gt;
[  662.509318] 2090000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.516398] rtcan: registered rtcan0&lt;br /&gt;
[  662.520047] flexcan 2090000.flexcan: RTCAN device registered (reg_base=c0c70000, irq=142, clock=30000000)&lt;br /&gt;
[  662.529809] 2094000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.536881] rtcan: registered rtcan1&lt;br /&gt;
[  662.540504] flexcan 2094000.flexcan: RTCAN device registered (reg_base=c0c78000, irq=143, clock=30000000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=== Configuring CAN interface ===&lt;br /&gt;
With the real-time CAN driver loaded the &amp;lt;code&amp;gt;rtcanconfig&amp;lt;/code&amp;gt; utility can be used to configure the bitrate and modes.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/usr/demo# rtcanconfig rtcan0 --baudrate=125000 start&lt;br /&gt;
[  706.101002] rtcan0: real bitrate 125000, sampling point 87.5%&lt;br /&gt;
[  706.106857] rtcan0: writing ctrl=0x0e312005&lt;br /&gt;
[  706.111091] rtcan0: flexcan_set_bit_time: mcr=0x5980000f ctrl=0x0e312005&lt;br /&gt;
[  706.117801] rtcan0: flexcan_chip_start: writing mcr=0x79a2020f&lt;br /&gt;
[  706.123511] rtcan0: flexcan_chip_start: writing ctrl=0x0e31ac55&lt;br /&gt;
[  706.129581] rtcan0: flexcan_chip_start: reading mcr=0x69a2020f ctrl=0x0e31ac55&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Communicating with CAN ===&lt;br /&gt;
Xenomai provides two command line utilities to communicate with the CAN interface: &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;rtcanrecv&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sending a CAN transaction using &amp;lt;code&amp;gt;rtcansend&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
root@somimx6-xenomai:/usr/demo# rtcansend rtcan0 -v -i 0x0 0x82 0x1&lt;br /&gt;
interface rtcan0&lt;br /&gt;
s=3, ifr_name=rtcan0&lt;br /&gt;
&amp;lt;0x000&amp;gt; [2] 82 01&lt;br /&gt;
Cleaning up...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5349</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5349"/>
		<updated>2016-03-04T21:43:42Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux CAN driver is unloaded the Xenomai real-time CAN driver can be loaded.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_can_flexcan&lt;br /&gt;
[  662.498586] RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team&lt;br /&gt;
[  662.509318] 2090000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.516398] rtcan: registered rtcan0&lt;br /&gt;
[  662.520047] flexcan 2090000.flexcan: RTCAN device registered (reg_base=c0c70000, irq=142, clock=30000000)&lt;br /&gt;
[  662.529809] 2094000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.536881] rtcan: registered rtcan1&lt;br /&gt;
[  662.540504] flexcan 2094000.flexcan: RTCAN device registered (reg_base=c0c78000, irq=143, clock=30000000)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=== Configuring CAN interface ===&lt;br /&gt;
With the real-time CAN driver loaded the rtcanconfig utility can be used to configure the bitrate and modes.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/usr/demo# rtcanconfig rtcan0 --baudrate=125000 start&lt;br /&gt;
[  706.101002] rtcan0: real bitrate 125000, sampling point 87.5%&lt;br /&gt;
[  706.106857] rtcan0: writing ctrl=0x0e312005&lt;br /&gt;
[  706.111091] rtcan0: flexcan_set_bit_time: mcr=0x5980000f ctrl=0x0e312005&lt;br /&gt;
[  706.117801] rtcan0: flexcan_chip_start: writing mcr=0x79a2020f&lt;br /&gt;
[  706.123511] rtcan0: flexcan_chip_start: writing ctrl=0x0e31ac55&lt;br /&gt;
[  706.129581] rtcan0: flexcan_chip_start: reading mcr=0x69a2020f ctrl=0x0e31ac55&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5348</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5348"/>
		<updated>2016-03-04T21:41:07Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# lsmod&lt;br /&gt;
Module                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the standard Linux CAN driver is unloaded the Xenomai real-time CAN driver can be loaded.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_can_flexcan&lt;br /&gt;
[  662.498586] RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team&lt;br /&gt;
[  662.509318] 2090000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.516398] rtcan: registered rtcan0&lt;br /&gt;
[  662.520047] flexcan 2090000.flexcan: RTCAN device registered (reg_base=c0c70000, irq=142, clock=30000000)&lt;br /&gt;
[  662.529809] 2094000.flexcan supply xceiver not found, using dummy regulator&lt;br /&gt;
[  662.536881] rtcan: registered rtcan1&lt;br /&gt;
[  662.540504] flexcan 2094000.flexcan: RTCAN device registered (reg_base=c0c78000, irq=143, clock=30000000)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=== Configuring CAN interface ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5347</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5347"/>
		<updated>2016-03-04T21:37:22Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.&lt;br /&gt;
&lt;br /&gt;
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:/usr/demo# lsmodModule                  Size  Used by&lt;br /&gt;
can_raw                 6668  0 &lt;br /&gt;
can                    28850  1 can_raw&lt;br /&gt;
rt_fec                 14450  0 &lt;br /&gt;
rtnet                  51349  1 rt_fec&lt;br /&gt;
fec                    37316  0 &lt;br /&gt;
flexcan                 9971  0 &lt;br /&gt;
can_dev                11309  1 flexcan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
root@somimx6-xenomai:~# rmmod flexcan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5346</id>
		<title>Xenomai RTCAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTCAN&amp;diff=5346"/>
		<updated>2016-03-04T21:26:01Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:04-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTCAN&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTCAN&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard&lt;br /&gt;
SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed&lt;br /&gt;
to configure, and communicate using the command line utilities provided with Xenomai.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTCAN | desc=Xenomai RTCAN | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5345</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5345"/>
		<updated>2016-03-04T20:08:10Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exists and is loaded for the target on hand, it will provide device nodes at &amp;lt;code&amp;gt;/dev/rtdm/rtserX&amp;lt;/code&amp;gt; where X is replaced by the number of each port.&lt;br /&gt;
The device nodes are then accessed to configured and communicate the underlying serial ports. The following subsections will outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the serial port by default. If the desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from the serial it is useful to wait for an event to occur before reading:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,&lt;br /&gt;
		       strerror(errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo sends data from one serial port and receives it on another. To run the demo make sure the RTDM driver is loaded and connect the first two ports via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__serial.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/rtdm_2uapi_2serial_8h.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/cross-link_8c-example.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5344</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5344"/>
		<updated>2016-03-04T20:07:51Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exists and is loaded for the target on hand, it will provide device nodes at &amp;lt;code&amp;gt;/dev/rtdm/rtserX,/code&amp;gt; where X is replaced by the number of each port.&lt;br /&gt;
The device nodes are then accessed to configured and communicate the underlying serial ports. The following subsections will outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the serial port by default. If the desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from the serial it is useful to wait for an event to occur before reading:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,&lt;br /&gt;
		       strerror(errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo sends data from one serial port and receives it on another. To run the demo make sure the RTDM driver is loaded and connect the first two ports via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__serial.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/rtdm_2uapi_2serial_8h.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/cross-link_8c-example.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5343</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5343"/>
		<updated>2016-03-04T19:55:46Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from the serial it is useful to wait for an event to occur before reading:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,&lt;br /&gt;
		       strerror(errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo sends data from one serial port and receives it on another. To run the demo make sure the RTDM driver is loaded and connect the first two ports via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__serial.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/rtdm_2uapi_2serial_8h.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/cross-link_8c-example.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5342</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5342"/>
		<updated>2016-03-04T19:55:13Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When reading from the serial it is useful to wait for event to occur before reading:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,&lt;br /&gt;
		       strerror(errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo sends data from one serial port and receives it on another. To run the demo make sure the RTDM driver is loaded and connect the first two ports via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__serial.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/rtdm_2uapi_2serial_8h.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/cross-link_8c-example.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5341</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5341"/>
		<updated>2016-03-04T01:20:50Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case if reading from the serial it is useful to wait for event to occur before reading:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,&lt;br /&gt;
		       strerror(errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo sends data from one serial port and receives it on another. To run the demo make sure the RTDM driver is loaded and connect the first two ports via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__serial.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/rtdm_2uapi_2serial_8h.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/cross-link_8c-example.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5340</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5340"/>
		<updated>2016-03-04T01:18:26Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case if reading from the serial it is useful to wait for event to occur before reading:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,&lt;br /&gt;
		       strerror(errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo sends data from one serial port and receives it on another. To run the demo make sure the RTDM driver is loaded and connect the first two ports via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== External Links ===&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__serial.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/rtdm_2uapi_2serial_8h.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/cross-link_8c-example.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5339</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5339"/>
		<updated>2016-03-04T01:16:39Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case if reading from the serial it is useful to wait for event to occur before reading:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,&lt;br /&gt;
		       strerror(errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== External Links ===&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__rtdm__serial.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/rtdm_2uapi_2serial_8h.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/cross-link_8c-example.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5338</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5338"/>
		<updated>2016-03-04T01:13:04Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case if reading from the serial it is useful to wait for event to occur before reading:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,&lt;br /&gt;
		       strerror(errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== External Links ===&lt;br /&gt;
* https://xenomai.org/documentation/trunk/html/api/group__rtserial.html&lt;br /&gt;
* https://xenomai.org/documentation/xenomai-3/html/xeno3prm/cross-link_8c-example.html&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5337</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5337"/>
		<updated>2016-03-04T01:08:06Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case if reading from the serial it is useful to wait for event to occur before reading:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,&lt;br /&gt;
		       strerror(errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5336</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5336"/>
		<updated>2016-03-04T01:07:20Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
Performing serial transactions is as simple as reading and write to the rtser file descriptor.&lt;br /&gt;
&lt;br /&gt;
Sending the contents of a buffer over the serial port:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	ret = write(fd, buffer, sizeof(buffer));&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Receiving serial port input data into buffer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	ret = read(fd, buffer, sizeof(buffer));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the case if reading from the serial it is useful to wait for event to occur before reading:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &amp;amp;rx_event);	if (err) {		printf(&amp;quot;ioctl error on RTSER_RTIOC_WAIT_EVENT %s\n&amp;quot;,		       strerror(errno));	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5335</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5335"/>
		<updated>2016-03-04T00:46:39Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(-errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(-errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5334</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5334"/>
		<updated>2016-03-04T00:43:34Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
[  528.026096] rtser2 on IMX UART2: membase=0xc0c20000 irq=60 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	int fd;&lt;br /&gt;
	int err;&lt;br /&gt;
...&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;open error %s\n&amp;quot;, strerror(-errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;ioctl error %s\n&amp;quot;, strerror(-errno));&lt;br /&gt;
		goto error;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5333</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5333"/>
		<updated>2016-03-04T00:39:04Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
[  528.026096] rtser2 on IMX UART2: membase=0xc0c20000 irq=60 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	int fd;&lt;br /&gt;
&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {&lt;br /&gt;
		printf(&amp;quot;can't open rtser0, %s\n&amp;quot;,&lt;br /&gt;
		       strerror(-errno));&lt;br /&gt;
		return -errno;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);&lt;br /&gt;
	if (err) {&lt;br /&gt;
		printf(&amp;quot;error while ioctl, %s\n&amp;quot;,&lt;br /&gt;
		       strerror(-errno));&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5332</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5332"/>
		<updated>2016-03-04T00:36:56Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
[  528.026096] rtser2 on IMX UART2: membase=0xc0c20000 irq=60 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static const struct rtser_config my_config = {&lt;br /&gt;
	.config_mask       = 0xFFFF,&lt;br /&gt;
	.baud_rate         = 115200,&lt;br /&gt;
	.parity            = RTSER_DEF_PARITY,&lt;br /&gt;
	.data_bits         = RTSER_DEF_BITS,&lt;br /&gt;
	.stop_bits         = RTSER_DEF_STOPB,&lt;br /&gt;
	.handshake         = RTSER_DEF_HAND,&lt;br /&gt;
	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,&lt;br /&gt;
	.rx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.tx_timeout        = RTSER_DEF_TIMEOUT,&lt;br /&gt;
	.event_timeout     = 1000000000, /* 1 s */&lt;br /&gt;
	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,&lt;br /&gt;
	.event_mask        = RTSER_EVENT_RXPEND,&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	int fd;&lt;br /&gt;
&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {		printf(&amp;quot;can't open rtser0, %s\n&amp;quot;,		       strerror(-errno));		return -errno;	}&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);	if (err) {		printf(&amp;quot;error while ioctl, %s\n&amp;quot;,		       strerror(-errno));	}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5331</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5331"/>
		<updated>2016-03-04T00:31:41Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
[  528.026096] rtser2 on IMX UART2: membase=0xc0c20000 irq=60 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static const struct rtser_config my_config = {	.config_mask       = 0xFFFF,	.baud_rate         = 115200,	.parity            = RTSER_DEF_PARITY,	.data_bits         = RTSER_DEF_BITS,	.stop_bits         = RTSER_DEF_STOPB,	.handshake         = RTSER_DEF_HAND,	.fifo_depth        = RTSER_DEF_FIFO_DEPTH,	.rx_timeout        = RTSER_DEF_TIMEOUT,	.tx_timeout        = RTSER_DEF_TIMEOUT,	.event_timeout     = 1000000000, /* 1 s */	.timestamp_history = RTSER_RX_TIMESTAMP_HISTORY,	.event_mask        = RTSER_EVENT_RXPEND,};&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
	int fd;&lt;br /&gt;
&lt;br /&gt;
	fd = open(&amp;quot;/dev/rtdm/rtser0&amp;quot;, 0);&lt;br /&gt;
&lt;br /&gt;
	if (fd &amp;lt; 0) {		printf(&amp;quot;can't open rtser0, %s\n&amp;quot;,		       strerror(-errno));		return -errno;	}&lt;br /&gt;
	err = ioctl(fd, RTSER_RTIOC_SET_CONFIG, &amp;amp;my_config);	if (err) {		printf(&amp;quot;error while ioctl, %s\n&amp;quot;,		       strerror(-errno));	}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5330</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5330"/>
		<updated>2016-03-04T00:20:35Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
[  528.026096] rtser2 on IMX UART2: membase=0xc0c20000 irq=60 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5329</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5329"/>
		<updated>2016-03-04T00:20:14Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# echo 2020000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# echo 21e8000.serial &amp;gt; /sys/bus/platform/drivers/imx-uart/unbind&lt;br /&gt;
root@somimx6-xenomai:~# modprobe xeno_imx_uart&lt;br /&gt;
root@somimx6-xenomai:~# dmesg | tail          .&lt;br /&gt;
.&lt;br /&gt;
[  462.425158] console [ttymxc1] disabled&lt;br /&gt;
[  528.025034] rtser0 on IMX UART0: membase=0xc0c10000 irq=58 uartclk=80000000&lt;br /&gt;
[  528.025700] rtser1 on IMX UART1: membase=0xc0c18000 irq=59 uartclk=80000000&lt;br /&gt;
[  528.026096] rtser2 on IMX UART2: membase=0xc0c20000 irq=60 uartclk=80000000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5328</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5328"/>
		<updated>2016-03-04T00:14:34Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-link&lt;br /&gt;
main : write-file opened&lt;br /&gt;
main : write-config written&lt;br /&gt;
main : read-file openedmain : read-config written&lt;br /&gt;
main : write-task createdmain : read-task created&lt;br /&gt;
main : starting write-task&lt;br /&gt;
main : starting read-task&lt;br /&gt;
 Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
  0 |18446744041591572624 |     32118717325 |          738333&lt;br /&gt;
  1 |18446744041591563290 |     32118715326 |          727000&lt;br /&gt;
  2 |18446744041591563957 |     32118716326 |          728667&lt;br /&gt;
  3 |18446744041591561291 |     32118714658 |          724333&lt;br /&gt;
  4 |18446744041591562624 |     32118715992 |          727000&lt;br /&gt;
  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5327</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5327"/>
		<updated>2016-03-04T00:13:23Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
root@somimx6-xenomai:~# /usr/demo/cross-linkmain : write-file openedmain : write-config writtenmain : read-file openedmain : read-config writtenmain : write-task createdmain : read-task createdmain : starting write-taskmain : starting read-task Nr |   write-&amp;gt;irq    |    irq-&amp;gt;read    |   write-&amp;gt;read   |-----------------------------------------------------------  0 |18446744041591572624 |     32118717325 |          738333  1 |18446744041591563290 |     32118715326 |          727000  2 |18446744041591563957 |     32118716326 |          728667  3 |18446744041591561291 |     32118714658 |          724333  4 |18446744041591562624 |     32118715992 |          727000  5 |18446744041591560290 |     32118715326 |          724000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5326</id>
		<title>Xenomai RTSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.emacinc.com/index.php?title=Xenomai_RTSerial&amp;diff=5326"/>
		<updated>2016-03-03T20:52:11Z</updated>

		<summary type="html">&lt;p&gt;Mwelling: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo| NotStarted (03.03.2016-13:01-&amp;gt;MW+)|Michael Welling| project=OE 5.0,MW,NotStarted }}&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Xenomai RTSerial&lt;br /&gt;
|titlemode=append&lt;br /&gt;
|keywords=&lt;br /&gt;
|description=Xenomai RTSerial&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /****************************************  Page Description Text  ****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  General Information  *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:geninfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication.&lt;br /&gt;
The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication.&lt;br /&gt;
The following sections will outline the use of the user-space interface and provide basic examples.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************  Using/Working With  ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Given the RTDM serial port driver exist and is loaded for the target on hand, it will provide a device nodes at /dev/rtdm/rtserX where X is replaced by the number of the port.&lt;br /&gt;
This device node is then accessed to configured and communicate using the underlying port. The following sections with outline loading the driver, configuring the port, and performing basic serial transactions.&lt;br /&gt;
&lt;br /&gt;
=== Loading the driver ===&lt;br /&gt;
Typically there will be a Linux kernel driver associated with the port. If desired device is associated with a Linux driver the driver must be unloaded or the device must be unbound from the driver. Below are examples of loading the RTDM driver for some supported targets.&lt;br /&gt;
&lt;br /&gt;
==== x86 16550A ====&lt;br /&gt;
&lt;br /&gt;
==== iMX6 rt_imx_uart ====&lt;br /&gt;
&lt;br /&gt;
=== Configuring the serial port ===&lt;br /&gt;
=== Performing serial transactions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*****************************************       Examples        *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
Xenomai provides an example called cross-link which provides an easy way to test serial ports. Essentially the demo send data from one serial port and receives it on another. To run the demo make sure the RTDM driver is load and connect the first two port via a NULL modem cable.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;&lt;br /&gt;
cross-link&lt;br /&gt;
output output output&lt;br /&gt;
blah blah blah&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************     Conclusion      ******************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:conclusion | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /******************************************   More Information   *****************************************/ --&amp;gt;&lt;br /&gt;
&amp;lt;!-- /*********************************************************************************************************/ --&amp;gt;&lt;br /&gt;
{{:Templateimpl:moreinfo | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
{{:Templateimpl:whatnext | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }}&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Mwelling</name></author>
		
	</entry>
</feed>