lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Drp::Si570 Class Reference

Si570 device accessed as an array of 256 Pds::Mmhw::Reg registers. More...

#include <Si570.hh>

Public Member Functions

 Si570 ()
 Does nothing; empty body.
 
 ~Si570 ()
 Does nothing; empty body.
 
void reset ()
 Write 1 to register 135 and poll every 100 us until its bit 0 reads back clear (no timeout).
 
void program (int index=1)
 Call reset() and read(), then set bit 4 of register 137 (freeze DCO, per the code comment), write HS_DIV, N1 and RFREQ for setting index (0 or 1, default 1) into registers 7 to 12, clear that bit again, set bit 6 of register 135 and call read() once more.
 
double read ()
 Decode HS_DIV, N1 and RFREQ from registers 7 to 12 (logging each register) and return 156.25 * HS_DIV * (N1 + 1) * 2^28 / RFREQ, which the log message labels as MHz.
 

Detailed Description

Si570 device accessed as an array of 256 Pds::Mmhw::Reg registers.

The methods decode and set a frequency (logged in MHz) through registers 7 to 12, 135 and 137.

Constructor & Destructor Documentation

◆ Si570()

Drp::Si570::Si570 ( )

Does nothing; empty body.

◆ ~Si570()

Drp::Si570::~Si570 ( )

Does nothing; empty body.

Member Function Documentation

◆ program()

void Drp::Si570::program ( int  index = 1)

Call reset() and read(), then set bit 4 of register 137 (freeze DCO, per the code comment), write HS_DIV, N1 and RFREQ for setting index (0 or 1, default 1) into registers 7 to 12, clear that bit again, set bit 6 of register 135 and call read() once more.

The comments give the target as 1300/7 MHz (185.7 MHz).

◆ read()

double Drp::Si570::read ( )

Decode HS_DIV, N1 and RFREQ from registers 7 to 12 (logging each register) and return 156.25 * HS_DIV * (N1 + 1) * 2^28 / RFREQ, which the log message labels as MHz.

The code comment calls this reading the factory calibration for 156.25 MHz.

◆ reset()

void Drp::Si570::reset ( )

Write 1 to register 135 and poll every 100 us until its bit 0 reads back clear (no timeout).

The header comment says this goes back to factory defaults.


The documentation for this class was generated from the following file: