Hello,
Firstly, you do not show the setup code to make use of the crystal as an external reference. You will also need to set the ICG module for FBE mode (you cannot use FEE mode at 16MHz). On this basis, the use of the fixed frequency clock is not applicable. Using the bus clock as a clock source will give a frequency of 8MHz or lower, depending on lthe RDF setting within the ICGC2 register.
I notice that you are persisting to alter TPM1MOD to a very low value, yet you have a prescale setting (within TPM1SC) of 128. This does not make any sense - reduce the prescale setting to 1, and use a freerunning TPM1 counter (TPM1MOD = 0), or use a much higher TPM1MOD setting, if not freerunning mode.
Using a prescale of 1 with a bus frequency of 8MHz, the TPM overflow period would be 8.192 milliseconds in freerunning mode. This could be easily used to generate a one second delay, requiring a count value of 122.
You have some additional issues with the TPM1SC setting. CPWMS bit should remain at zero since you are not using centre aligned PWM mode for the module. You have also selected the external TPM clock source, which is not correct. Select the bus clock source.
Within the code for the delay loop, you should also consider periodically reseting the COP timer, to prevent timeout.
Regards,
Mac