variable from TIM0_CAPT

Not solving your problem but did you notice what your code looks like? Italics, strange symbols?

You can edit your post and
type
** **[code]** **
before your code
type
** **[/code]** **
after your code