How to use RS485 in .NET Compact framework

Hi,

We would like to use RS458 in .NET Compact framework but we can not set RTS control as RTS_CONTROL_TOGGLE. We can do it in native code but not in .NET. Do you maybe know how can we implement this?

Hi,

Yes there is a way to enable this. In registry please add this entries

[HKLM\Driver\BuiltIn\UARTX]
"RTSToggleAlwaysOn" = "dword:1"

If you want to also reverse the polarity of RTS you can add also this value

"RTSPol" = "dword:1"

Please replace UARTX with the UART port you are using.

Is there also support for RTS_CONTROL_TOGGLE on Apalis IMX6?

Support for RS-485 on i.MX6 is on our roadmap, but we don’t have a release date yet.

However, if you don’t have very strict timing requirements, you may be use our GPIO library to toggle the enable signal for your RS-485 port before and after each transmission.

The RTS_TOGGLE function would be very welcome.
We use modbus communication so timing can be an issue. On our board design we used the reference design for RS-485. It is possible to read the echo of the send data in c# so we can toggle the RTS pin but we have no assurance that it will toggle at the right moment.

Are there any other workarounds that will be more robust? We also looked into connecting the transmit pin to the nRE/DE pin.

Rising the priority of the thread performing the serial communication and GPIO toggling will reduce the chances that the two operation (completition of serial TX and toggling) have a large delay in between. You can’t prevent delays completely, but usually those can be in the less than 1ms range.

Rising the priority of the thread performing the serial communication and GPIO toggling will reduce the chances that the two operation (completition of serial TX and toggling) have a large delay in between. You can’t prevent delays completely, but usually those can be in the less than 1ms range.

Rising the priority of the thread performing the serial communication and GPIO toggling will reduce the chances that the two operation (completition of serial TX and toggling) have a large delay in between. You can’t prevent delays completely, but usually those can be in the less than 1ms range.

Rising the priority of the thread performing the serial communication and GPIO toggling will reduce the chances that the two operation (completition of serial TX and toggling) have a large delay in between. You can’t prevent delays completely, but usually those can be in the less than 1ms range.

We solved the problem on our board by changing the RS-485 chip from the reference design to this one: Intersil ISL83491IBZ and by connecting the Tx pin to the nRE/DE pin.

We fixed the problem on our board by replacing the RS-485 chip from the reference design with the Intersil ISL83491IBZ.
And by connecting the TX pin from the UART to the nRE/DE pin we are able to get it to work.
It is tested with 115k2 baudrate.

Thank you for sharing this information that may be useful for other customers.