TS-7680 Crossbar

From embeddedTS Manuals

The FPGA includes a Crossbar mux. This allows nearly any output to be assigned any input. An input can be a physical pin, or the output of an FPGA peripheral such as the TXEN generator. Using the Crossbar, it is also possible to re-arrange UART port locations to put UARTs in various IO locations allowing for a large amount of flexibility of the SBC for a specific application.

A tool is provided for easy configuration of the Crossbar muxes. Using 'tshwctl' the current state of the Crossbar muxes can be read and written via environment variables:

root@ts7680:~# tshwctl --get
FPGA_22=GPIO
FPGA_23=GPIO
FPGA_24=GPIO
FPGA_25=GPIO
FPGA_26=GPIO
FPGA_27=GPIO
FPGA_28=GPIO
FPGA_29=GPIO
FPGA_30=GPIO
FPGA_31=GPIO
FPGA_32=GPIO
FPGA_33=GPIO
FPGA_34=GPIO
FPGA_35=GPIO
DC_TXD=UNCHANGED
COM1_TXD=UART1_TXD
COM2_TXD=UART4_TXD
MODBUS_TXD=UART2_TXD
MODBUS_TXEN=UART2_TXEN
RS_485_TXD=UART3_TXD
RS_485_TXEN=UART3_TXEN
BT_RXD=UART0_TXD
BT_CTS=UART0_RTS
UART0_RXD=BT_TXD
UART0_CTS=BT_RTS
UART1_RXD=COM1_RXD
UART2_RXD=MODBUS_RXD
UART3_RXD=RS_485_RXD
UART4_RXD=COM2_RXD
TTYMAX0_RXD=UNCHANGED
TTYMAX0_CTS=UNCHANGED
TTYMAX1_RXD=UNCHANGED
TTYMAX1_CTS=UNCHANGED
TTYMAX2_RXD=UNCHANGED
TTYMAX2_CTS=UNCHANGED

In order to change any of the above assignments, use the named environment variables. For example, to set UART4 to the pins for the daughtercard interface, the following commands can be used:

root@ts7680:~# export DC_TXD=UART4_TXD
root@ts7680:~# export UART4_RXD=DC_RXD
root@ts7680:~# export COM2_TXD=GPIO  #This is used to prevent the COM2 port from transmitting the data that is sent on UART4
root@ts7680:~# tshwctl --set
root@ts7680:~# tshwctl --get
...
DC_TXD=UART4_TXD
...
COM2_TXD=GPIO
...
UART4_RXD=DC_RXD
...

At this point, /dev/ttyAPP4 will now transmit and receive on the DC_TXD and DC_RXD pins.