DNA/DNR-IRIG-650 IRIG Timing Layer
Chapter 3
39
Programming with the Low Level API
Tel: 508-921-4600
www.ueidaq.com
Vers:
4.6
Date: March 2019
DNx-IRIG-650 Chap3x.fm
© Copyright 2019
United Electronic Industries, Inc.
Event delay fields
<event_sub0_dly>
and
<event_sub1_dly>
specify
event subdelays:
Event source selected in the
CT650_EVT_CFG_ESRC
acts as a trigger that
initiates
DLY0/DLY1
counters; these counters provide a programmable delay
prior to the generating output pulse and/or interrupt. This behavior may be used
to create a sequence of events that are triggered by the same source but should
be separated in time by the pre-defined intervals. Two sub-events are provided,
thus allowing more flexible handling of the timing. Putting 0 into these registers
will result in the event pulse/interrupt delayed by 4-5 clocks from the time of the
event source due to the delays in the state machine and edge detector.
3.2.6.2
Synchronous
Programming
Event status can be received by using
ret = DqAdv650GetEventStatus(hd, devn, evt_chan, flags,
&event_sts);
Valid event channels
<evt_chan>
are [0..3] should correspond with event
channels used in
DqAdv650SetEvent()
to set up events.
Event status is stored in the following structure:
typedef struct {
uint32 event_sts;
// event status
uint32 event_tstamp;
// event timestamp (debug only)
uint32 event_ad;
// event address/data (debug only)
} EV650_STS, *pEV650_STS;
<event_sts>
: the event status register provides information about the current
condition of the event module, including number of processed events.
ESRC=EVT_CFG_ESRC_SBT
30-20
CT650_EVT_EMP1_SBD
Straight binary day of the year
19-0
CT650_EVT_EMP1_US
Number of microseconds for the SB and BCD time mode
(microseconds are always binary, 0-999999) that are used
in event generation
ESRC=EVT_CFG_ESRC_BCDT
19-0
CT650_EVT_EMP1_US
Number of microseconds for the SB and BCD time mode
(microseconds are always binary, 0-999999) that are used
in event generation
Bit
Name
Description
ESRC=EVT_CFG_ESRC_xxx
31-0
EVTDL
Event delay in system clocks
Bit
Name
Description
31
CT650_EVT_STS_SEARM
=1-if event is armed by the start trigger (or start trigger is
unused)
30
CT650_EVT_STS_SEVT1
=1-if subevent 1 counter is active
29
CT650_EVT_STS_SEVT0
=1-if subevent 0 counter is active