Hi,
I have a problem issuing CNAF control commands using a CES "CBD 8210
branch driver" from a VxWorks program. Can anyone help?
I'm running VxWorks on a Nat'l Instruments VXIcpu-030 sitting in
a VXI crate with the "CBD 8210 branch driver" (seeing the backplane
through a 73A-851 Adaptor Module from Colorado Data systems/Tektronix).
--------------------------------------------------------
Here is the story:
I can successfully use CNAF read and write commands by:
1) calculating an address as
address = (uint32 *)
(CAMBAS +
((uint16) b << CAMB) +
((uint16) c << CAMC) +
((uint16) n << CAMN) +
((uint16) a << CAMA) +
((uint16) f << CAMF) + BOARDADR + 2);
2)
and then read a value as
data_in = *(uint16 *) address;
or write a value as
*(uint16 *)address = data_out;
That works fine!!!
--------------------------------------------------------
The problem comes when I try to issue CNAF control commands, I.e.,
commands with function values: 8-15 and 24-31. The manual is rather
cryptic about the command functions; but what I read is that a command
function is like a read followed by the tst instruction.
Thus, I have tried the following things
a) data_in = *(uint16 *) address;
followed by a
asm("tstw %0": :"a"(*(uint16 *)address));
and
b) putting the read into an if statement, expecting that
a tst instruction will then be be generated:
if ( data_in = *(uint16 *) address ) {};
also tried
if ( *(uint16 *) address ) {};
None of them worked either!
-----------------------------
suggestions?
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Torben Lauritsen, Staff Scientist _/
_/ E-mail: [email protected] _/
_/ Snail mail: Argonne National Laboratory, Building 203, _/
_/ 9700 S. Cass Avenue, Argonne, IL 60439, USA. _/
_/ Phone: Office(+voice)/sec/fax: (630)252-4026/3663/6210 _/
_/ beeper-mail [email protected], reg page: 4-4026 _/
_/ URL: http://www.phy.anl.gov _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
- Replies:
- Re: CNAF control commands using a CES "CBD 8210 branch driver" Graham Waters
- Navigate by Date:
- Prev:
Recent features in ALH Steve Lewis
- Next:
Re: CNAF control commands using a CES "CBD 8210 branch driver" Graham Waters
- 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:
Recent features in ALH Steve Lewis
- Next:
Re: CNAF control commands using a CES "CBD 8210 branch driver" Graham Waters
- 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
|