EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  <19981999  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  Index 1994  1995  1996  1997  <19981999  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 
<== Date ==> <== Thread ==>

Subject: Re: Greenspring rs422 support
From: "Joseph P. Sullivan" <[email protected]>
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Date: Tue, 10 Mar 1998 11:05:34 -0600
Ok, there were two things. 

The first fix _was_ in the transmit ISR logic. The code was wrong to only
check the status registers's TxRDY bit before executing the TX logic. The
interrupt mask register's (IMR) TxRDY bit needed to be checked also to assure
that a TX request had been made. The SR's TxRDY bit is going to be on
most of the time, whether it caused an interrupt or not. 

HiDEOS code segment...

void* OctualUartTask::ifunc(void *v)
{
.
.
	  // a byte needs to be sent
	  // if(sr&0x04) - original code. 
	  if ((qt->imr[st->block]&st->imr) && (sr&0x04))  
	  {
		// Start of TX logic 
.
.
}

Second, interrupts were not being masked out when the IMR's TxRDY bit was
set during the user's WRITE function. That left open a window when the
UART's data structure did not match the state of the chip. 

int OctalUartTask::Write(StringMsg* m)
{
.
.
>>>  lockKey = IntLockGet();	
   quad_table->imr[block]|=imr; // activate Tx interrupt
   regs->u.w.imr=quad_table->imr[block];	// enable Tx interrupt
>>>  IntLockRelease(lockKey);
.
.
}

We also decided it was safer not to output the first character from
the Write function. 


> Yes. Even though my driver had been signicantly restuctured - for example
> the multiple delimiter logic got moved into a programmer supplied
> drvSerial input framing routine. Most of what is common is the ISR logic
> and the UART configuration sections.


-Joe

Navigate by Date:
Prev: Re: Greenspring rs422 support Joseph P. Sullivan
Next: Re: A question about new SNL warning messages saa
Index: 1994  1995  1996  1997  <19981999  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 
Navigate by Thread:
Prev: Re: Greenspring rs422 support Joseph P. Sullivan
Next: Re: Greenspring rs422 support Peregrine M. McGehee
Index: 1994  1995  1996  1997  <19981999  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 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·