Difference between revisions of "Xenomai RTSerial"
Line 24: | Line 24: | ||
<!-- /*********************************************************************************************************/ --> | <!-- /*********************************************************************************************************/ --> | ||
{{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }} | {{:Templateimpl:using | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }} | ||
+ | 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. | ||
+ | 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. | ||
+ | |||
+ | === Loading the driver === | ||
+ | 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. | ||
+ | |||
+ | ==== X86 16550A ==== | ||
+ | ==== IMX6 rt_imx_uart ==== | ||
+ | |||
+ | |||
+ | === Configuring the serial port === | ||
+ | === Performing serial transactions === | ||
<!-- /*********************************************************************************************************/ --> | <!-- /*********************************************************************************************************/ --> | ||
Line 29: | Line 41: | ||
<!-- /*********************************************************************************************************/ --> | <!-- /*********************************************************************************************************/ --> | ||
{{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }} | {{:Templateimpl:examples | initials=MW | title=Xenomai RTSerial | desc=Xenomai RTSerial | project=OE 5.0 }} | ||
+ | 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. | ||
+ | |||
+ | cross-link | ||
+ | output output output | ||
+ | blah blah blah | ||
<!-- /*********************************************************************************************************/ --> | <!-- /*********************************************************************************************************/ --> |
Revision as of 14:14, 3 March 2016
Contents
General Information
Xenomai provides a RTDM profile for serial device drivers enabling real-time UART serial communication. The RTDM serial driver provides the necessary user-space API to perform serial port configuration and communication. The following sections will outline the use of the user-space interface and provide basic examples.
Xenomai RTSerial
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. 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.
Loading the driver
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.
X86 16550A
IMX6 rt_imx_uart
Configuring the serial port
Performing serial transactions
Examples
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.
cross-link output output output blah blah blah