Yes you can. But it is not too easy.

Most major TPM manufacturers provide software to access the TPM, but there is little or no documentation on how to do it.

Infineon TPMs which are mostly...