[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rs485 2-wire on devboard 82?
Thanks. I failed to disable "RS-485 on PA" in my kernel config. 2-wire is
now working over the RX pins.
----- Original Message -----
To: "Ken Klinner" <firstname.lastname@example.org>
Sent: Thursday, June 19, 2003 12:16 AM
Subject: Re: rs485 2-wire on devboard 82?
> ----- Original Message -----
> From: "Ken Klinner" <email@example.com>
> To: <firstname.lastname@example.org>
> Sent: Wednesday, June 18, 2003 11:54 PM
> Subject: rs485 2-wire on devboard 82?
> > I understand that rs485 in 2-wire mode will use only the RX pins but I
> > my transmissions on the TX pins and never on the RX pins. Any idea what
> > doing wrong? I am using the following code on a devboard 82 with kernel
> > 2.4.20 configured for rs485, fast timers and rs485_disable_receiver.
> > struct rs485_ctrl ctrl485;
> > struct rs485_wrt io485;
> > int result;
> > ctrl485.rts_on_send = 0;
> > ctrl485.rts_after_send = 1;
> > ctrl485.delay_rts_before_send = 0;
> > result = ioctl(fd, TIOCSERSETRS485, &ctrl485);
> > io485.outc_size = len;
> > io485.outc = data;
> > result = ioctl(fd, IOCSERWRRS485, &io485);
> > -Ken
> Looks ok, although there is a field ctrl485.enabled as well, that allows
> to use ordinary write() instead of ioctl() to write data.
> Seems like the RTS toggling isn't working for you,
> please verify that the /SERIAL_INIT pin on PA0 is set to 0:
> In the kernelconfig, make sure that the default value for PA0 is an output
> and the value 0
> also, make sure that you disable the following options ("RS-485 on PA")
> which shouldn't be enabled but they are in the 1.90 release:
> You can check the value of the PA pins in runtime from a shell using
> "hwtestserial -r" or "readbits -p a".
> Hope that helps