g2: setting continuous mode frames in naother reg, and when changing from burst to continous

This commit is contained in:
maliakal_d 2020-09-18 17:58:39 +02:00
parent a7e24717a9
commit 7c21aa96a9
2 changed files with 9 additions and 0 deletions

View File

@ -152,6 +152,10 @@
#define ASIC_INT_EXPTIME_LSB_REG (0x04 * REG_OFFSET + BASE_ASIC)
#define ASIC_INT_EXPTIME_MSB_REG (0x05 * REG_OFFSET + BASE_ASIC)
/* ASIC Exptime 64bit Register */
#define ASIC_CONT_FRAMES_LSB_REG (0x06 * REG_OFFSET + BASE_ASIC)
#define ASIC_CONT_FRAMES_MSB_REG (0x07 * REG_OFFSET + BASE_ASIC)
/* Packetizer -------------------------------------------------------------*/
/* Packetizer Config Register */

View File

@ -824,6 +824,9 @@ void setNumFrames(int64_t val) {
LOG(logINFO,
("Setting number of frames %lld [Continuous mode]\n", val));
set64BitReg(val, SET_FRAMES_LSB_REG, SET_FRAMES_MSB_REG);
set64BitReg(val, ASIC_CONT_FRAMES_LSB_REG,
ASIC_CONT_FRAMES_MSB_REG);
}
// burst
else {
@ -2153,6 +2156,8 @@ int setBurstMode(enum burstMode burst) {
// continuous
if (burstMode == CONTINUOUS_INTERNAL || burstMode == CONTINUOUS_EXTERNAL) {
set64BitReg(framesReg, SET_FRAMES_LSB_REG, SET_FRAMES_MSB_REG);
set64BitReg(framesReg, ASIC_CONT_FRAMES_LSB_REG,
ASIC_CONT_FRAMES_MSB_REG);
set64BitReg(periodReg, SET_PERIOD_LSB_REG, SET_PERIOD_MSB_REG);
LOG(logINFO, ("\tFrames reg: %lld, Period reg: %lldns\n",
getNumFrames(), getPeriod()));