1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 <2023> 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 <2023> 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Cannot do successful RS-232 communication with baud rates <2400 with VME and IP module |
From: | Joel Sherrill via Tech-talk <tech-talk at aps.anl.gov> |
To: | Mark Rivers <rivers at cars.uchicago.edu> |
Cc: | Tech-talk <tech-talk at aps.anl.gov> |
Date: | Fri, 3 Nov 2023 14:57:42 -0500 |
Hi Joel,
The issue we are seeing does not involve “the other side”. It is a simple loopback to the same UART, so the divisor should not matter, it is using the same clock in an out, right?
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Joel Sherrill via Tech-talk
Sent: Friday, November 3, 2023 2:49 PM
To: Mrinal Bera <mrinalkb at uchicago.edu>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Cannot do successful RS-232 communication with baud rates <2400 with VME and IP module
If the CSR value is a divisor, it is possible that the clock rate division math ends up with a bit time a bit off what the other side is using. I've seen this at higher baud rates where the math results in a very small value but not a larger value.
Anyway, you could check the length of a character on a scope or just fiddle the divisor up/down a bit and see if it works.
--joel sherrill
RTEMS
On Fri, Nov 3, 2023 at 1:45 PM Mrinal Bera via Tech-talk <tech-talk at aps.anl.gov> wrote:
Hi Andrew,
Following your instructions, I have now added the 300 and 600 baud rates in the tyGSOctal.c code and recompile my apps. Interestingly, with both the baud rates (300 and 600) I could successfully communicate with loopback but the problem still exists with the 1200 baud rate. Does this indicate that noise problems only exist with a 1200 baud rate? How can check this noise in a scope trace?
Best,
Mrinal
On Nov 3, 2023, at 12:32 PM, Johnson, Andrew N. <anj at anl.gov> wrote:
Without seeing a scope trace I wouldn't completely rule out the possibility of noise from the VME chassis or the IP carrier board.
The driver code for setting the baud rate is the routine below from tyGSOctal.c. You could add options for 300 and 600 baud, those would need register values of 0x44 and 0x55 respectively (110 baud would be 0x11).
LOCAL STATUS tyGSOctalBaudSet(TY_GSOCTAL_DEV *dev, int baud)
{
SCC2698_CHAN *chan = dev->chan;
switch(baud) { /* NB: ACR[7]=1 */
case 1200:
chan->u.w.csr=0x66;
break;
case 2400:
chan->u.w.csr=0x88;
break;
case 4800:
chan->u.w.csr=0x99;
break;
case 9600:
chan->u.w.csr=0xbb;
break;
case 19200:
chan->u.w.csr=0xcc;
break;
case 38400:
chan->u.w.csr=0x22;
break;
default:
errnoSet(EINVAL);
return ERROR;
}
dev->baud = baud;
return OK;
}
- Andrew
--
Complexity comes for free, Simplicity you have to work for.