Cut and paste this URL to share the unmodified register and value:
https://regviz.com/r/stm32/stm32g4/STM32G474/HRTIM_TIMF/CPT2FR#0x0
Timerx Capture 2 Register
Timerx Capture 2 value
Timerx Capture 1 Direction status
https://github.com/modm-io/cmsis-svd-stm32