MCA-1K Data Server Reference

MCA-1K

Introduction

USB driver

MCA-2K Device

Data structures

Overview

Module Constants

ARM Data structures

Version

Status

Controls

Calibration

Histogram

Two-channel Logger

Pulse capture

Lossless listmode

Perceptron-powered PSD

API

Overview

MCA-1K Data Structure: arm_cal

Summary

The 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 structure

For 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.

arm_cal registers and fields
Register number and field nameDescription
0: lut_lenNumber of entries in the LUT; default is 20, 2..20 are allowed
1: lut_tminMinimum temperature in the lookup table; Typically -30°C
2: lut_dtTemperature step size in the lookup table; Typically 5°C
[3:23]: lut_ovChange of operating voltage vs temperature
[23:43]: –Reserved
[43:63]: –Change of led_target vs temperature (PMT-1000 only)
63: lut_modeint(lut_mode)&0x1 → lock bit, set to 1 to prevent the user from reading the arm_cal data from the MCA.
The arm_cal registers and fields.

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".

Factory reset arm_cal registers and fields
Register number and field nameDescription
0: lut_len20
1: lut_tmin-30°C
2: lut_dt5°C
[3:23]: lut_ovChange of operating voltage vs temperature
[23:43]: – Reserved
[43:63]: – Change of led_target vs temperature (PMT-1000 only)
63: lut_mode1: lock bit, set to 1 to prevent data read back.
The factory reset arm_cal registers and fields. Index ranges [a:b] include the first and last index.