It is possible to configure the Colibri's UART as a RS485 interface by using the RTS signal as the send enable signal in the RS485 transceiver. On the Tegra modules this feature is supported in image 1.3 beta 1 and later. To use the RTS Signal in this mode, write your code to setup the DCB data structure for the serial port as follows:
dcb.fRtsControl = RTS_CONTROL_TOGGLE;
For more information visit the Win CE help and search for SetCommState or the DCB structure.
As you can not set directly the DCB structure in .Net, you can edit registry entry to enable the RTS_CONTROL_TOGGLE function.
[HKLM\Driver\BuiltIn\SerialX] "RTSToggleAlwaysOn" = "dword:1" "RTSPol" = "dowrd:0"
Tegra Only (Feature added with in image V2.0 beta 1): To reduce the RTS Toggle latency we introduced a registry key that can be used to control the drivers thread priority. Normally this can be controlled by the users application itself. In case you only have binary code and are not able to change the priority on your own, use this key:
[HKLM\Driver\BuiltIn\SerialX] "RTSThreadPriority256" = "dword:100" ; RTS Thread priority (0 - 256, lower value -> higher priority), ; Default value: 100
[HKLM\Driver\BuiltIn\UARTX] "RTSToggleAlwaysOn" = "dword:1" "RTSPol" = "dword:1"
[HKLM\Driver\BuiltIn\COMX] "RTSToggleAlwaysOn" = "dword:1" "RTSPol" = "dword:1" "RTSPin" = "dword:1b" ; module SODIMM/MXM3 pin number
The RTSPin must be specified to select what pin needs to be toggled when the device is sending data over the serial link for ports that don't use the standard colibri/apalis pinout (UARTC, UARTD, UARTE).
[HKLM\Driver\BuiltIn\COMX] "RTSToggleAlwaysOn" = "dword:1" "RTSPol" = "dword:1" "RTSPin" = "dword:1b" ; module SODIMM/MXM3 pin number