Problem with RS485

Hi all,

I am actualy working on a embedded PC with a RS485 port. I am using devc-8250 as driver. Since this port is Half Duplex, the port is configured in receiver or sender regarding the situation. The hardware side should be able to do configure the port but the controler in my case doesn’t support this. I know it is possible to do that through software side setting and unsetting RTS signal.

I tried some code from the QNX Help, that changes RTS signal status. It works OK. So i can configure the port as a receiver and each time i want to send i change RTS, send data and change RTS again.

I would like to be able to send without taking care of RTS signal. So i thought of listening on the port IRQ. So i attached an ISR to this IRQ. The problem is that if a write something on the port while the port is configured as a receiver, the interrupt doesn’t appear.

Here is my question (finally): is there a way to know when somebody in writing on the port ? Is there a software interrupt for that ? I also tried to read the registers of the port with the function ‘in8s’ but i obtained bad values. I wouldn’t be using this function correctly ???

ThreadCtl(_NTO_TCTL_IO, NULL);
port = mmap_device_io(7, 0x2f8);
in8s(buf, 4, port); // i just want the 4 first registers

Well can somebody help me with that ?


Hi Cola-Rula,

Your answer is located at: … evctl.html

Good luck,


Well thx Freddy for replying. Actualy i had already tried this piece of code. It works. What i would like to do is to upgrade the devc-ser8250 driver so it can deal with RS485 tranparently for th user.

There is no other choice but to get the source to devc-ser8250 and modify it, or write you own. Other possibility is a hardware solution.


Well Mario, do you know where to find the source of devc-ser8250 ?


Ok, i found the source code. It is located in /usr/src/ddk-6.2.1/char/src/hardware/devc/ser8250/

I’ll try to work something out with this.


I am having problems compiling the driver’s source code. The file pm.h is missing and doesn’t seem to be on my hard drive.\

Any clue ?!