Experimental Physics and Industrial Control System
|
Hi,
when we were trying to use SIS3820 struck scalers with mca record on
a Linux CPU
using modified EPICS mca module, we run into a problem when we could
not enable all inputs
(signals) of the Struck scaler module in EPICS, which is probably
the most frequent
mode for this scaler readout. We tracked it down to the line# 480 in
drvSIS3820.cpp asyn driver
for SIS3820:
/* Disable channel in MCS mode. We enable
the first maxSignals_ inputs */ |
registers_->copy_disable_reg = 0xFFFFFFFF <<
maxSignals_; |
The result of the left-shift of a 32-bit variable by 32 bits in C
apparently is undefined, and it
happens to be 0 on our Motorolla VME controllers running VxWorks,
and 0xFFFFFFFF on
our Intel-based Linux controllers. Therefore, when we were enabling
all input signals, the
driver for Linux was actually disabling all of the signals. We
patched it using an if-statement and it
seems to work for us now for our customized version of the driver,
but it would probably be useful to do
something similar in the official driver.
disableMask = ( allEnabled << maxSignals_ );
if( maxSignals_ >= SIS38XX_MAX_SIGNALS ) disableMask = 0;
vmeWrite32((volatile unsigned int*)®isters_->copy_disable_reg, disableMask );
The same issue probably will arise at line# 521 (SCALER mode):
/* Disable channel in scaler mode. */ |
registers_->count_disable_reg = 0xFFFFFFFF <<
maxSignals_; |
Best,
Hovanes Egiyan
|
- Replies:
- RE: signal enable/disable in drvSIS3820 driver ulrik.pedersen
- Navigate by Date:
- Prev:
Re: Motor Record monitoring of Demand Value Pearson, Matthew R.
- Next:
Re: Unable to build support modules on Windows, with base 3.15.2 Ralph Lange
- 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
- Navigate by Thread:
- Prev:
RE: Motor Record monitoring of Demand Value giles.knap
- Next:
RE: signal enable/disable in drvSIS3820 driver ulrik.pedersen
- 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
|
ANJ, 16 Dec 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|