Hello Eren,
Since you have not provided any of the relevant code, it is impossible to guess what is the cause of your problem. You would need to provide the initialisation code for the TPM module, plus the interrupt service code for the TPM channel you are using. You should also mention the HC9S08 derivative that you are using.
Regards,
Mac