![]() |
MCA-1K Data Server Reference |
||||||||||||||||||||||||||||||||||||
MCA-1KUSB driverData structuresARM Data structuresAPI |
MCA-1K Data Structure: arm_calSummaryThe arm_cal data structure contains the data used for gain stabilization. On power up, the MCA-1K loads the arm_cal structure from the non-volatile flash memory into RAM, where it is used for gain stabilization. The arm_cal data cannot be read back when the lock bit is set, cf below). Users and developers can write arm_cal data to RAM and flash memory as they wish. If they set the lock bit data cannot be read back. Note that in practice, arm_cal only exists in flash memory. A write or read of arm_cal from RAM is redirected to flash. The MCA-1K ships with a factory default of arm_cal, which has the lock bit set. Reading arm_cal data from the memory type "reset" causes the MCA-1K software to load the factory default data int RAM and flash memory. Since theses data are locked, the read will return only zeros. The data values of the default arm_cal depend on the assumed default optical sensor. For the PMT-1000 that is a Hamamatsu R6231 PMT; for the SiPM-1000 that is a Broadcom SiPM array. The default scintillator is NaI(Tl). This factory reset feature allows to restore working gain-stabilization, in case the user or developer overwrote the flash memory with non-ideal data. Data structureFor arm_cal there are 64 'register' and four named 'field' data in use. All register data are 32-bit floats (float32). The fields led_ov, led_dg, led_lut are lists of 2 to 20 float32 values. The first list entry corresponds to the lowest temperature (lut_tmin) of the lookup table. When using the lookup tables for gain stabilization, the ARM processor uses linear interpolation within the table and linear extrapolation for temperatures outside the table's temperature range. Note the lut_mode parameter at the very end of the data structure. It can be used to set a lock bit that prevents readback of the arm_cal data. This applies to arm_cal data in RAM and in flash memory. When arm_cal is locked, the MCA-1K will return zeros in response to a read request.
The MCA-1K ships with a factory-provided lookup table. Its content can be loaded into flash memory and RAM when reading arm_cal with memory type "reset".
|