I am looking to write and read data using DTR signal (RS485) from UART A port.
Please check below given settings :
c# Code part :
serialPort1.PortName = "COM1";
serialPort1.BaudRate = 9600;
serialPort1.ReadTimeout = 2000;
if (!serialPort1.IsOpen)
serialPort1.Open();
serialPort1.DtrEnable = true;
serialPort1.Write(sendbytes, 0, sendbytes.Length);
serialPort1.ReadTimeout = 2000;
byte[] readBytes = new byte[10];
serialPort1.DtrEnable = false;
Thread.Sleep(500);
serialPort1.Read(readBytes, 0, readBytes.Length);
serialPort1.DtrEnable = true;
Error : The operation has timed-out.
Registery setting for VF50 module :
HKEY_LOCAL_MACHINE\Drivers\BuitIn\UARTA
default setting nothing changes
Note : Same code is running quite ok on IMX6 module
Registory Settings for IMX6 :
HKEY_LOCAL_MACHINE\Drivers\BuitIn\COM1
RTSToggleAlwaysOn = dword:1
RTSPol = dword:1
RTSPin = dword:27
TXPin = dword:35
RXPin = dword:33
CTSPin = dword:25
DTRPin = dword:23
DSRPin = dword:29
please help if there is any pin or function code need to add in UART_A registry setting for DTR toggle or may be its required some extra code for DTR toggle using GPIO