Hi jingpan,
1. The trig pin is set to right function.
2. Please check TPMx_CONF[TRGSEL], [TRGSRC] and TRGPOL is correct.
This two item should be correct.
Because right now I reset CNT to 0 when interrupt happen, I can capture a fixed CNT value when the duty of input signal is fixed, also I calculate the time depended on timer frequency and CNT value, it is same with the period of waveform.
void TPM0_IRQHandler(void)
{
TPM0->CNT = 0; //reset counter
TPM_ClearStatusFlags(TPM0,kTPM_Chnl0Flag);
}
3. The trigger input is ignored if the TPM counter is paused during debug mode or doze mode. This field
should only be changed when the TPM counter is disabled.
I change this field before starting timer.