Re: RS485/COM2 Error in SBC84500 documentation
From: Frencia (jean.pierre.frencia_at_wanadoo.fr)
Date: 06/20/05
- Next message: linnix: "Re: Embedded Platform"
- Previous message: Himanshu: "Re: Embedded Platform"
- In reply to: Grant Edwards: "Re: rs485 on SBC84500"
- Next in thread: Floyd L. Davidson: "Re: RS485/COM2 Error in SBC84500 documentation"
- Reply: Floyd L. Davidson: "Re: RS485/COM2 Error in SBC84500 documentation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 20 Jun 2005 21:17:49 +0200
Hi
There is an error in the SBC84500 documentation concerning RS485/COM2 pins
assignment.
The signal is between pin 1 (DATA-) and pin 2 (DATA+) instead of pin 1 and
pin 3 as stated page 29 of the documentation.
I also have removed CRTSCTS flag when tuning the termios.
Here is my OpenDevice routine (if it could be helpful for somebody else).
int OpenDevice (char* device)
{
int fd;
fd = open(device, O_RDWR | O_NOCTTY );
if(fd<=0) {
fprintf(stderr, "Error opening %s\n", device);
exit(-1);
}
tcgetattr(fd,&oldtio); /* save current port settings */
tcgetattr(fd,&newtio); /* get current port settings */
newtio.c_cflag = BAUDRATE | CS8 | CLOCAL | CREAD;
// BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD does NOT work
newtio.c_cflag &= ~PARENB; /* no generation of parity bit */
newtio.c_cflag &= ~CSTOPB; /* 1 Stop bit */
newtio.c_iflag &= ~INPCK; /* no input parity check */
newtio.c_iflag = IGNPAR;
newtio.c_oflag = 0;
/* set input mode (non-canonical, no echo,...) */
newtio.c_lflag = 0;
newtio.c_cc[VTIME] = 10;
newtio.c_cc[VMIN]= 0;
tcflush(fd, TCIFLUSH);
tcsetattr(fd,TCSANOW,&newtio);
return(fd);
}
Grant Edwards wrote:
> On 2005-06-18, Frencia <jean.pierre.frencia@wanadoo.fr> wrote:
>
>> I'm trying to use the RS485/COM2 port on an embedded Axiom
>> SBC84500 card running kernel 2.4.26. I have configured the
>> JP9,JP10,JP10 according to the documentation but there is no
>> output signal when writing to /dev/ttyS1.
>
> You might have to assert RTS in order to enable the RS-485
> drivers.
>
>> I read somewhere that I should use ioctls to write to the port
>> instead of the standard write function.
>
> I really doubt that. I've been doing serial stuff under Unix
> for 15 years, and I've never heard of using ioctl() to write
> data to a serial port.
>
- Next message: linnix: "Re: Embedded Platform"
- Previous message: Himanshu: "Re: Embedded Platform"
- In reply to: Grant Edwards: "Re: rs485 on SBC84500"
- Next in thread: Floyd L. Davidson: "Re: RS485/COM2 Error in SBC84500 documentation"
- Reply: Floyd L. Davidson: "Re: RS485/COM2 Error in SBC84500 documentation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|