Timer capture STM32

I have some questions about timer capture in the STM32. Is it possible to capture a digital signal? Like this:

Actually, I'd like to know how many clock ticks between rising and falling edge, in every pulse.

I would advise you to examine document submitted from Scott Seidman