TS-7250-V3 TS-SER2: Difference between revisions

From embeddedTS Manuals
m (Links auto-updated for 2022 re-branding ( http://www.embeddedarm.com/products/board-detail.php?product=TS-SER2 →‎ http://www.embeddedTS.com/products/board-detail.php?product=TS-SER2))
No edit summary
 
(One intermediate revision by one other user not shown)
Line 10: Line 10:
}}
}}


The TS-SER2 provides two RS-232, RS-485 half duplex or full duplex (RS-422) ports and a parallel port.
The TS-SER2 provides two RS-232, RS-485 half duplex or full duplex (RS-422) ports and a parallel port. Refer to the [[TS-SER2]] manual for hardware documentation. The parallel port is currently not supported on this platform.


Refer to the [[TS-SER2]] manual for hardware documentation.
{{:TS-7250-V3 16550 Notes}}


The parallel port is currently not supported on this platform.
This below example will set up the serial devices for a TS-SER2 with JP 14 through JP18, COMB 6, and COMA 5 jumpers installed.  Open the device tree at arch/arm/boot/dts/imx6ul-ts7250v3.dtsi. Add the highlighted section to the device tree and recompile.
 
The TS-ISO485 implements 16550A based UARTs which requires a kernel driver.  Under Linux this requires a device tree change.  See the [[#Compile the kernel|Kernel compile section]] for more details about getting set up the compile the kernel.
 
This below example will set up the serial devices for a TS-ISO485 with JP 14 through JP18, COMB 6, and COMA 5 jumpers installed.  Open the device tree at arch/arm/boot/dts/imx6ul-ts7250v3.dts. Add the highlighted section to the device tree and recompile.
<source lang=json highlight="13-33" line>
<source lang=json highlight="13-33" line>
pc104bus: fpgaisa@50 {
pc104bus: fpgaisa@50 {
Line 29: Line 25:
#address-cells = <0x1>;
#address-cells = <0x1>;
#size-cells = <0x1>;
#size-cells = <0x1>;
status = "okay";


/* TS-SER2 COMA */
/* TS-SER2 COMA */
Line 39: Line 33:
interrupt-parent = <&fpga_intc>;
interrupt-parent = <&fpga_intc>;
interrupts = <14>;
interrupts = <14>;
status = "okay";
};
};


Line 50: Line 42:
interrupt-parent = <&fpga_intc>;
interrupt-parent = <&fpga_intc>;
interrupts = <15>;
interrupts = <15>;
status = "okay";
};
};
};
};

Latest revision as of 10:32, 29 September 2023

TS-SER2
Ts-ser2.jpg
Product Page
8-bit IO

The TS-SER2 provides two RS-232, RS-485 half duplex or full duplex (RS-422) ports and a parallel port. Refer to the TS-SER2 manual for hardware documentation. The parallel port is currently not supported on this platform.

This peripheral implements 16550A based UARTs which require a kernel driver. Under Linux this requires a device tree change. See the Kernel compile section for more details about getting set up the compile the kernel.

In general for 16550 UARTs we recommend these kernel config options:

CONFIG_HZ_PERIODIC=y
CONFIG_HZ_1000=y
CONFIG_SERIAL_8250_TS=y

The default kernel is ideal for low power, but has some tradeoffs with latency. A 16550 only has a 16 byte FIFO and needs to be serviced with relatively low latency, so a the above options make the latency far more deterministic. These changes are necessary to run at 115200 and not drop any data.

This below example will set up the serial devices for a TS-SER2 with JP 14 through JP18, COMB 6, and COMA 5 jumpers installed. Open the device tree at arch/arm/boot/dts/imx6ul-ts7250v3.dtsi. Add the highlighted section to the device tree and recompile.

pc104bus: fpgaisa@50 {
	compatible = "technologic,pc104-bus";
	reg = <0x50 0x4>;

	ranges = <0 0 0x1000>;
	reset-gpio = <&gpio3 7 0>;

	#address-cells = <0x1>;
	#size-cells = <0x1>;

	/* TS-SER2 COMA */
	ts16550@2e8 {
		compatible = "technologic,ts16550";

		reg = <0x2e8 8>;
		interrupt-parent = <&fpga_intc>;
		interrupts = <14>;
	};

	/* TS-SER2 COMB */
	ts16550@3e8 {
		compatible = "technologic,ts16550";

		reg = <0x3e8 8>;
		interrupt-parent = <&fpga_intc>;
		interrupts = <15>;
	};
};

On the next boot check the "dmesg" output to verify it loaded:

root@tsimx6:~# dmesg | grep ts16550
[    2.259413] ts16550 50004050.fpgaisa:ts16550@2e8: Adding 16550 UART ttyS0
[    2.268166] ts16550 50004050.fpgaisa:ts16550@3e8: Adding 16550 UART ttyS1

Now that these are loaded:

Device Description
/dev/ttyS0 COMA
/dev/ttyS1 COMB

In this mode COMA/COMB are full duplex RS-485 (RS-422). See the TS-ISO485 manual for mroe details on the HD jumpers to use half duplex.