WinCE, USART to RS485

This forum is for users of Atmel's SAM Series and who are interested in using WinCE OS.

Moderator: nferre

sebeksd
Posts: 1
Joined: Thu Jan 17, 2013 10:41 am

WinCE, USART to RS485

Thu Jan 17, 2013 11:11 am

Hello,

We are using WinCE and AT91SAM9260EK BSP sources as a base.

Our board is a custom design with RS485 on USART3 (conected through SP3485E).

If I'm right RS485 can be managed directly by AT uP after setting usart in RS485 mode (AT91C_US_USMODE_RS485).
In this mode processor will automatically use RTS to change Read/Write mode of SP3485E.

Problem is that after I changed this mode in HWOpen (Serial_SAM926X_HW.cpp file) nothing realy changes ...
Port still work only in one way :(

To check if port can be managed manually I've added ClearRTS/SetRTS to COM_Write function in driver and it works but:
- this is propably not the right way to do it
- port work grate for most of the time but when I use CERHost, probably because processor is in stress, port start to behave strange (it work slow, sometimes there are random data on it and so on)

To be sure it is a driver issue a I started same application on virtual RS485 (MOXA USB<->RS485) and it work ok (no delays, no strange data on it).

Can anyone help me with this problem, what I'm doing wrong ?
Maybe I should change something else, not only USART mode ?

If I misunderstood something, please correct me :)

Return to “WinCE”

Who is online

Users browsing this forum: No registered users and 1 guest