Capture Principle with a Main Type

Overview

The capture function stores the current counter value when an external input signal is detected.

The capture function is available in Main type with the following modes:

oOne-shot

oModulo-loop

oFree-large

To use this function:

oconfigure the optional Capture input CAP

ouse the HSCGetCapturedValue function block to retrieve the captured value in your application.

Principle of a Capture

This graphic illustrates how the capture works in Modulo-loop mode:

G-RU-0010563.3.gif-high.gif

 

 

Stage

Action

1

When EN_Cap = 0, the function is not operational.

2

When EN_Cap = 1, the edge on CAP captures the current counter value, puts it into the Capture register, and triggers the rising edge of Cap_Flag.

3

Get the stored value using HSCGetCapturedValue.

4

While Cap_Flag = 1, any new edge on the physical input CAP is ignored.

5

The rising edge of HSCMain function block input ACK_Cap triggers the falling edge Cap_Flag output.

A new capture is authorized.