epics-modules / mrfioc2

EPICS driver for Micro Research Finland event timing system devices
http://epics-modules.github.io/mrfioc2/
Other
8 stars 30 forks source link

RFC: add EVR Phase Offset functionality #32

Closed krmpotic closed 4 years ago

krmpotic commented 4 years ago

introduced in firmware 0D0207 (20. May 2019) affected HW: mTCA-EVR-300 see p.72 of June 19. 2019 MRF Technical Reference for reg addresses. This commit adds records that can control phase offset of prescalers in degrees "PhasOffs-SP" or directly in Event Clock ticks "PhasOffs:Raw-SP"

I have tested both pairs of SP/RB.

krmpotic commented 4 years ago

I have tested this and don't have a problem with it, I have fixed what was wrong in the previous try (the % operator).

MRF Oy document January 31, 2020 mentions only register offsets (page 73). Register values of Prescaler # Phase Offset Register are in event clock ticks, this corresponds to record $(SN)PhasOffs:Raw-SP, there is also a $(SN)PhasOffs-SP record which takes degrees [0,360). Both of these have a corresponding -RB record, that trigger on any of the previous.

Behavior: After setting up the PS Phase Offset, a PSers need to be reset (PS reset event). If PS Divider is changed it resets PS Phase Offset to zero.

Can I change anything to get this merged?

mdavidsaver commented 4 years ago

Picked as 63bcdf8cd1de760c45988cbe23fd2af70be88c9d with changes to avoid need to modify the PreScaler base class.