Hi Julian
I finally found a board to test your project. here is my testing result

here, I set breakpoint at FC161_Reset()
in Variable window: Time is 0x223
in Registers window: TPM2CNT is 0x0227
these two values are different. This is because the program runs from previous line to FC161_Reset() takes a few clock.
Please let me know what else you think abnormal.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------