EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Hytec DAC8402
From: "Sibley III, Coles" <[email protected]>
To: Eric Bjorklund <[email protected]>, EPICS tech-talk <[email protected]>
Date: Thu, 16 Jun 2005 18:58:19 -0400

Thanks Eric,

 

It’s in D16 A32 address space, an IP module on a carrier board.

 

Our bus analyzer ran out of memory recording the read access’s after ~32 msec, every 1.37 usec.

Hytec Electroncs called and suspects a wrong status bit getting (or not) set.

 

Coles

 


From: Eric Bjorklund [mailto:[email protected]]
Sent: Thursday, June 16, 2005 6:49 PM
To: EPICS tech-talk
Subject: Re: Hytec DAC8402

 

Coles,

 

Where does the DAC8402 reside in I/O space? We had a similar problem with a serial driver in A32 space a few years ago. As near as we could tell, the hardware was working fine, but the register data seemed like it was being cached (even though it looked like the mapping registers in the BSP were disabling caching for A32 space). Our fix was to insert a

cacheInvalidate (DATA_CACHE, (void *)statadr, 12);

call into the loop. We never really figured out whether this defeated the hardware cache, or just broke the loop out of the CPU instruction pipeline, but it worked.

 

You might try a bus-analyzer to see how many reads you really are issuing to the DAC.

 

Hope this helps...

 

-Eric Bj.

 

On Jun 16, 2005, at 10:47 AM, Sibley III, Coles wrote:

 

Hello,

 

We are using a Hytec DAC8402 at SNS for our beam loss monitor reference. The driver uses far too much CPU time when we update 8 dacs every 5 seconds. In fact it goes to 100% cpu usage. The offending code is below. We can fix the code but the question is why does it take so long to set 16 register?

 

The 8402 can be set to uses registers (for a typical dac application) or memory (for arbitrary waveforms). We need the typical dac configuration, not the arbitrary waveforms.

 

We are using a Motorola MVME5100 cpu.

 

The wait count goes to 600000 in our case, as if statadr was not declared as volatile or the 512K of memory is getting loaded, not just the 16 registers. Our WAITLIM has to be set to 1000000.

 

   while(((*statadr&CSR_ARM) !=0) && waitcount < WAITLIM)waitcount++;

 

    if( waitcount < WAITLIM )

    {

        /* set dac value and rearm  */

        card->pMem->Data[signal]=val;

        *statadr |=CSR_ARM;

    }

 

The manual says:

While the unit is ARMed the DACs are constantly refreshed with the contents of the registers which can be changed during this time. There is a delay which is fixed of approximately 32us after ARM is set, before all the outputs change together.”

 

The problem seems to be that the ARM stays high far longer than seems reasonable, as the count rate indicates.

 

The initialization in st.cmd is:

Hy8402Configure(1,1,0,0,0,0,0,0)

Hy8402Configure(2,1,1,0,0,0,0,0)

 

 

Any suggestions?

 

Coles Sibley

SNS – ORNL

Controls Hardware Engineer

865-241-8055

 

 

 

<><><><><><><><><><><><><><><><><><><><><><><><><><><><>

Eric Björklund

Los Alamos Neutron Science Center (LANSCE)

 

phone: 505-667-6031 email: [email protected]

<><><><><><><><><><><><><><><><><><><><><><><><><><><><>

TSPA :: DUSA=ADTO


Navigate by Date:
Prev: Re: Hytec DAC8402 Eric Bjorklund
Next: Re: Open source Real-time Oss / open source OS Noboru Yamamoto
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Hytec DAC8402 DAC Register Write Problem Darrell Nineham
Next: RE: Hytec DAC8402 DAC Register Write Problem Liyu, Andrei
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·