Hello Miroslav,
I test your project on my side , find there is a bug in the generated code of Init_TPM.
Please add these code in the file of "TPM0.C"
TPM0_C0SC = (TPM_CnSC_MSB_MASK | TPM_CnSC_ELSB_MASK);
and disable the original code of TPM0_C0SC :

After change the code, please choose " Don't Write Generated Component Modules":

Then build , run ...
I also attached the project which I changed .
Hope it helps
Have a great day,
Alice Yang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------