BL4S200 User’s Manual
32
Interrupt, Counter, and Event Capture Setup
External interrupts on the BL4S200 configurable I/O pins are configured using the
setExtInterrupt()
function call. The interrupt can be set up to occur on a rising edge,
a falling edge, or either edge.
The counter readings can be obtained via the
getBegin()
or
getEnd()
function calls.
An input channel may be set up to count
events, with the count incrementing or
decrementing, using the rising edge, fall-
ing edge, or either edge as triggers to start/
end the count. This feature is configured
using the
setCounter()
function call.
A more extensive use of the timing abilities
of the BL4S200 configurable I/O can be
realized through the event capture function
call,
setCapture()
. Here the count of a
particular clock cycle is noted at the start of
the event and at the end of the event so that
the time between them can be determined.
This can be set up on one or two configu-
rable I/O channels. The event counter can
be reset with the
resetCounter()
func-
tion call.
Channel 0
Begin
Count
End
Count
Channel 1
Start
Event
End
Event